Specific file extension block in postfix :


How to block attachment file extension in Postfix (OS= Debian)


Step 1. Add the following line on main.cf

# vim /etc/postfix/main.cf

mime_header_checks = regexp:/etc/postfix/mime_header_checks

:wq!                 Save and close the file.



Step 2. Add following line on /etc/postfix/mime_header_checks file:

# vim /etc/postfix/mime_header_checks

 /name=[^>]*\.(bat|exe|dll|eml|vbs)/ REJECT    ### File ext that you want to block ####

:wq!                 Save and close the file.



3. Restart Postfix service and check with mail log.

/etc/init.d/postfix restart




Check with mail log
tail -f /var/log/mail.log

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console