Post Reply  Post Thread 
Filter attachments (.bat, .exe, etc..) in postfix
Author Message
admin
~CM~
*******


Posts: 147
Group: Administrators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
1 was given thank in 1 posts
Post: #1
Filter attachments (.bat, .exe, etc..) in postfix

Simple, In /etc/postfix/main.cf enable the body checks with this line:

Quote:
body_checks = pcre:/etc/postfix/body_checks


Now put something in this file (/etc/postfix/body_checks):

Quote:
/^(.*)name=\”(.*).(hta|vb[esx]|ws[fh]|js[e]|bat|cmd)\”$/ REJECT


This will filter attachments of various types. Remove from the above line, whatever you want to allow.Of course you can add some more lines to make postfix a simple spam filter:

Quote:
/special offer email/ REJECT
/mortgage rates/ REJECT
/other spam mail subjects/ REJECT


Thanks & Regards
------------------
~CM~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-25-2007 03:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
nikesh
Unregistered


Thank
was given thank in 0 posts
Post: #2
RE: Filter attachments (.bat, .exe, etc..) in postfix


ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

01-04-2008 10:19 PM
Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: