April 25, 2009

How to Block zip or pdf files in Postfix ?

Block zip or pdf files attachments under Postfix Mail

Use mime_header_checks postfix config directive

Login as the root, enter:

# vi /etc/postfix/main.cf

mime_header_checks = regexp:/etc/postfix/block_attachments

:wq!


Open /etc/postfix/block_attachments file and append code as follows:

# vi /etc/postfix/block_attachment

/name=[^>]*\.(pdf|zip)/ REJECT

:wq!


Restart the postfix services.

No comments:

Post a Comment