{"id":187,"date":"2008-06-03T09:36:32","date_gmt":"2008-06-03T14:36:32","guid":{"rendered":"http:\/\/bitpost.com\/news\/2008\/06\/03\/crushing-my-spam-with-postfix-cyrus-spamassassin\/"},"modified":"2011-04-06T19:23:42","modified_gmt":"2011-04-07T00:23:42","slug":"crushing-my-spam-with-postfix-cyrus-spamassassin","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2008\/crushing-my-spam-with-postfix-cyrus-spamassassin\/","title":{"rendered":"Crushing my spam with Postfix + Cyrus + Spamassassin"},"content":{"rendered":"<p>After checking my webmaster and root emails (and my dad&#8217;s email account, that he shares with EVERYONE :>  ) and finding 65 THOUSAND spam messages in the Junk folders, I decided it was time to throw down the gauntlet.  I&#8217;m proud to say that now I&#8217;m absolutely crushing spam.<\/p>\n<p>I am using rules from razor2, dcc, pyzor, <a href=\"http:\/\/www.rulesemporium.com\/\">SARE<\/a> and the <a href=\"http:\/\/www.stearns.org\/sa-blacklist\/\">sa-blacklist<\/a>, updated daily, along with Bayesian filtering.<\/p>\n<p>SpamAssassin rates incoming email using the rules, and adds the spamscore to the header.  If the spamscore is high enough (4 or more in my case), it puts SPAM in the title and safely wraps the content.  I then use a sieve rule to dump SPAM-titled mails into each user&#8217;s Junk folder at the end of the processing.<\/p>\n<p>I took it a step further because I was PISSED at the volume I&#8217;m getting.  I have NEVER gotten a false positive in all my checking, so I updated postfix to DISCARD emails with a spamscore of 10 or higher.  With the high quality rules I&#8217;m using, I now have the good fortune to never even see the obvious spam anymore.<\/p>\n<p>To configure postfix to drop high-scoring spam, add a line to main.cf to do header checking:<\/p>\n<pre><code>header_checks = regexp:\/etc\/postfix\/throw_away_high_score_spam<\/code><\/pre>\n<p>Then create throw_away_high_score_spam and add this:<\/p>\n<pre><code>\/^X-Spam-Level: \\*{10}\/ DISCARD<\/code><\/pre>\n<p>PISS OFF SPAMMERS!  \ud83d\ude1b<\/p>\n<p><strong>UPDATE<\/strong>: A few spams were slipping through at scores around 3.5, I&#8217;m dropping my SPAM score trigger to 2.0.  I still have yet to get a false positive.<\/p>\n<p>UPDATE <strong>UPDATE<\/strong>: My first and only false positive, on Bruce Schneier&#8217;s August 2008 Cryptogram newsletter.  He&#8217;s always causing trouble.  :>  Steady on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After checking my webmaster and root emails (and my dad&#8217;s email account, that he shares with EVERYONE :> ) and finding 65 THOUSAND spam messages in the Junk folders, I decided it was time to throw down the gauntlet. I&#8217;m proud to say that now I&#8217;m absolutely crushing spam. I am using rules from razor2, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[10],"tags":[63,91,81],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-tricks-tips-tools","tag-cyrus-imap","tag-postfix","tag-spamassassin"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-31","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":6,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":1159,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/187\/revisions\/1159"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}