Home | Comics | Gallery | (Amazon| ThinkGeek) wishlist | Donations | Impressum | The Book of Postfix | Postfix - Einrichtung, Betrieb und Wartung | Blog
In main.cf you must use:
body_checks = regexp:/etc/postfix/body_checks.regexpAnd /etc/postfix/body_checks.regexp (download it here) contains:
/^TVqQAAMAAAAEAAAA\/\/8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA$/ REJECT Keep your executables!The leading spaces before REJECT are important! Note: This pattern seems to match all DOS executables. It may not be what you want!
Dr. Bieringer created another pattern:
/^RSLxwtYBDB6FCv8ybBcS0zp9VU5of3K4BXuwyehTM0RI9IrSjVuwP94xfn0wgOjouKWzGXHVk3qg$/ DISCARD Keep your viruses (sobig.f)which may be more precise!
Don't forget "postfix reload"!
The log should look like this now:
Aug 20 09:31:44 mail postfix/cleanup[11686]: 435B715C01F: reject: body ... snipped ... from gate2.ks.se[193.10.63.101]; from=<sender@example.com> to=<spamtrap@example.com> proto=ESMTP helo=<PC443377>: Keep your viruses (sobig.f)The use of REJECT is safe, because:
mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexpAnd /etc/postfix/mime_header_checks.regexp (download it here) contains:
/filename=\"?(.*)\.(bat|chm|cmd|com|do|exe|hta|jse|rm|scr|pif|vbe|vbs|vxd|xl)\"?$/ REJECT For security reasons we reject attachments of this typeGeorg Gell recommends that you could also use:
mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexpand /etc/postfix/mime_header_checks.regexp (download it here) contains:
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"?\s*$/ REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"The leading spaces before REJECT are important in both cases!
Don't forget "postfix reload"!
This file was last modified 18. Feb 2008 by root