# This filter works on MIME headers in postfix. # It deletes (discards) all mails with attachments that are executable, or known # to contain virus. Especially it deletes all mails with a .zip attachment. # Use it by installing it in a file /etc/postfix/mime_header_checks.regexp # and add a line in /etc/postfix/main.cf (without the beginning '#'): # mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp # And then restart postfix with 'service postfix restart' # # Keld Simonsen keld@dkuug.dk 2004-01-31 /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|chm|com|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|xl))"?\s*$/ DISCARD Attachment type not allowed - possible virus. File "$2" has the unacceped extension "$3" /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(zip))"?\s*$/ REJECT Attachment type not allowed - possible virus. File "$2" has the unacceped extension "$3"