On 21-Sep-2009, at 08:54, Pirate wrote:
I trying to filter out unwanted mails with no bat, exe and other potential unwanted files.

main.cf:
mime_header_checks = pcre:$config_directory/mime_headers.pcre

mime_headers.pcre:
/^\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"

(this is all one line)

No reason to ever accept an email with these attachments.

A lot of mailadmins add the MS Office suffixes as well, as they can contain macro-viruses.

--
"You see, in this world there's two kinds of people, my friend: Those
        with loaded guns and those who dig. You dig."

Reply via email to