<quote who="Sonia Hamilton"> > * On Wed, Jan 10, 2007 at 02:02:12PM +1100, Dean Hamstead wrote: > > I recently blocked .jpg and .gif attachments on our server here at > > bong.com.au (which also serves fragfest.com.au) <snip> > > > > We also block .exe .com .scr .doc .xls .ppt > > I see you run Exim - any postfix users got ideas on how to do this in > Postfix (ie block the mentioned type of attachments).
Postfix for the win. In /etc/postfix/mime_header_checks.regexp: /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 type /^\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]|wmf|xl))"?\s*$/ REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3" In /etc/postfix/main.cf: mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp - Jeff -- Open CeBIT 2007: Sydney, Australia http://www.opencebit.com.au/ No pants is good pants. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
