1

Topic: Blocking some attachments help

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: xubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
====

I edited etc/postfix/main.cf to uncomment the header_checks line to use it
in the header_checks file i put in the attachments i wanted blocked
/name=[^>]*\.(exe|com|dll|bat|vbs)/   REJECT

and it works however it stops the email fully and gives the sender a message from their postmaster saying my server generated a 5.7.1 error message content rejected.

is it possible to stop attachments but allow the email to come through or to tell the sender something better then 5.7.1 error.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Blocking some attachments help

Just show the reject reason like this:

/name=[^>]*\.(exe|com|dll|bat|vbs)/   REJECT Your email contains disallowed attachment

For more details, please read Postfix document:
http://www.postfix.org/access.5.html