Attachment filtering in Postfix

How to configure postfix to filter mail attachments based on file extension? This was one of the question has been lurking in my mind for past few days. Finally i got the solution from my fren "google". Its can be done by 3 simple steps as follow

1) Edit main.cf and add this line > mime_header_checks = regexp:/etc/postfix/mime_header_checks
2) Edit mime_header_checks file and add /name=[^>]*\.(bat|com|exe|dll|vbs|jpg)/ REJECT
It means that, all the file extension listed will be rejected during file attachment.You can add more file extensions by adding this line with |.
3) Postmap mime_header_checks

You are done. Now try to attach the rejected file extension and you will see a pop up message on attachment filtering.

0 comments: