Block ..rar files in amavisd

@lbutlr kremels at
Mon Jan 22 23:28:41 CET 2018

On 12 Jan 2018, at 06:24, Jonathan Sélea <jonathan at> wrote:
> I want to block .rar files on my server:

I do this during the SMTP transaction phase so the mail server never even receives files on my restricted list

I have a file mime_headers.pcre in postfix:
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.*\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|hlp|hta|inf|ins|isp|js|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ops|pcd|pif|prf|reg|scf|scr\??|sct|shb|shs|shm|swf|vb[esx]?|vxd|wsc|wsf|wsh))(\?=)?"?\s*(;|$)/x REJECT Attachment name "$2" may not end with ".$3”
mime_header_checks = pcre:$config_directory/mime_headers.pcre

(My list is a lot shorter than yours, but that’s not the point)

I've never seen religious faith move mountains, but I've seen what it does
to skyscrapers.

More information about the amavis-users mailing list