Dropping X-Mailers in Header Checks
Header checks with Postfix can be used to deal with unwanted mail before your server wastes time with it. Created the file /etc/postfix/header_checks and then add this line in your main.cf.
header_checks = pcre:/etc/postfix/header_checks
The format line for each header check follows this pattern:
/^HEADER:.*content_for_review/ ACTION
The HEADER that you usually will act on is the Subject header. However, you can also filter headers based on the X-Mailer. One idea is to DISCARD all mail that comes from typical X-Mailers that a Spammer will use. Here is a list of X-Mailers that you could place in your header_checks file. Note that often you will use REJECT to send a message back to the user but with these known mailers you probably do not want to send anything back to them. Note also, that this method is bound to create some false positives, so test it for yourself before you make any final decisions.
# Following is a list of known mass mailer programs.
/^X-Mailer: 0001/ DISCARD
/^X-Mailer: 007 Direct Email Easy/ DISCARD
/^X-Mailer: Advanced Mass Sender/ DISCARD
/^X-Mailer: Aristotle / DISCARD
/^X-Mailer: Aureate Group Mail/ DISCARD
/^X-Mailer: Avalanche/ DISCARD
/^X-Mailer: commercialmail / DISCARD
/^X-Mailer: Copia emailFacts / DISCARD
/^X-Mailer: Crescent Internet Tool/ DISCARD
/^X-Mailer: CyberCreek/ DISCARD
/^X-Mailer: DiffondiCool/ DISCARD
/^X-Mailer: Dynamic Opt-In Emailer / DISCARD
/^X-Mailer: DMailer / DISCARD
/^X-Mailer: eGroups Message Poster / DISCARD
/^X-Mailer: E-Mail Delivery Agent/ DISCARD
/^X-Mailer: Emailer Platinum/ DISCARD
/^X-Mailer: E-mail sender / DISCARD
/^X-Mailer: e-Merge / DISCARD
/^X-Mailer: Entity/ DISCARD
/^X-Mailer: Extractor/ DISCARD
/^X-Mailer: Floodgate/ DISCARD
/^X-Mailer: GMail2 / DISCARD
/^X-Mailer: GOTO Software Sarbacane/ DISCARD
/^X-Mailer: Inet_Mail_Out / DISCARD
/^X-Mailer: jfmailer / DISCARD
/^X-Mailer: Mail Bomber / DISCARD
/^X-Mailer: MailWorkz/ DISCARD
/^X-Mailer: MassE-Mail/ DISCARD
/^X-Mailer: MaxBulk.Mailer/ DISCARD
/^X-Mailer: MailKing / DISCARD
/^X-Mailer: Mailloop / DISCARD
/^X-Mailer: MailXSender / DISCARD
/^X-Mailer: MassE-Mail / DISCARD
/^X-Mailer: MultiMailer / DISCARD
/^X-Mailer: NetMasters SMTP / DISCARD
/^X-Mailer: Opt-In Lightning / DISCARD
/^X-Mailer: PersMail / DISCARD
/^X-Mailer: PLAUZIUM / DISCARD
/^X-Mailer: Power CGI Bulk / DISCARD
/^X-Mailer: Prospect Mailer / DISCARD
/^X-Mailer: News Breaker Pro/ DISCARD
/^X-Mailer: SmartMailer/ DISCARD
/^X-Mailer: Sparc12 / DISCARD
/^X-Mailer: StormPort/ DISCARD
/^X-Mailer: SuperMail-2/ DISCARD
/^X-Mailer: Super-Duper-FastMail/ DISCARD
Posted by mike 

Trackbacks
Saturday, 26 December, 2009
Social comments and analytics for this post…
This post was mentioned on Twitter by markwaters: added ‘Dropping X-Mailers in Header Checks’ in #postfix – http://bit.ly/4Dj1L7...
You must be logged in to post a comment.