How to block attachment file extension in Postfix (OS= Debian)?
vim /etc/postfix/main.cf
Add the following line.
mime_header_checks = regexp:/etc/postfix/mime_header_checks
Save and close the file.
Now open /etc/postfix/mime_header_checks file:
vim /etc/postfix/mime_header_checks
Append following line:
/name=[^>]*\.(bat|exe|dll|eml|vbs)/ REJECT ### File ext that you want to block ####
Save and close the file.
Restart Postfix service and check with mail log.
:) :) :) Thank you for post. It was very useful.
ReplyDelete