El 23/12/15 a las 13:29, Olivier CALVANO escribió:
Hi
it's possible to deny a attachment extension directly into postfix ?
and create a database :
domaine1.com <http://domaine1.com> .exe;.bat;.cab
domaine2.com <http://domaine2.com> .exe
?
thanks for your help
Olivier
Yes, but to do it per destination domain I think you'll need to write an
own filter. However, if you want to configure it generally for any
recipient, you should do something like this:
main.cf:
----------
mime_header_checks = regexp:/etc/postfix/mime_header_checks
/etc/postfix/mime_header_checks
---------------------------------------------
/name=[^>]*\.(com|exe|dll|vbs)/ REJECT Attachment extension not allowed
Reload Postfix and that's it.
In man (5) header_checks you'll also find a more complex example with
some very useful extensions to block (with the header_checks parameter
instead of mime_header_checks, though).
Regards,
Nicolás