With Postfix you can define mine header checks, to block certain email attachments
like *.exe or *.bat etc. You can enable this bij doing the following:
Open main.cf file:
user@linuxsource.nl# nano /etc/postfix/main.cf
Append the mime_header_checks directive as follow on the bottom of the file:
mime_header_checks = regexp:/etc/postfix/mime_header_checks
Save and close the file with crtl+x and choose yes
Then create the postfix lookup table for mime_header_checks file:
user@linuxsource.nl# nano/etc/postfix/mime_header_checks
Now open the /etc/postfix/mime_header_checks file:
user@linuxsource.nl# nano /etc/postfix/mime_header_checks
Add following line to block the file extensions:
/name=[^>]*.(bat|com|exe|dll|vbs)/ REJECT
Save and close the file. (control+x and choose yes)
Restart postfix:
user@linuxsource.nl# /etc/init.d/postfix restart
You should see rejected mail log in /var/log/maillog file by entering the following:
user@linuxsource.nl# tail -f /var/log/maillog