Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Network Troublshooting => Linux Servers Support => Topic started by: rajesh.bahl on November 01, 2007, 07:05:13 PM
-
Dear All,
Need your help in resolving a problem:-
Our mail server is running on Postfix on CentOS 4.5.
Working is okay, but we need two more functionalities:-
1. The attachment size is 1MB maximum for any mail. Can we increase the maximum size of attachments to say 3 MB ?
2. We need to ban the sending/receiving of attachments having files like exe,bat,vbs etc. etc.
Can we do the same in postfix ?
Thanking In Advance
rajesh.bahl
-
The attachment size isn't controlled with postfix. You need to set the attachment size in your imap / pop server settings, might be courier or dovecot.
To filter out attachments I found the following example
In the postfix main.cf add
mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp
In mime_header_checks_regexp
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"?\s*$/
REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"