{"id":1254,"date":"2008-10-17T10:04:12","date_gmt":"2008-10-17T14:04:12","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=1254"},"modified":"2008-10-17T10:04:12","modified_gmt":"2008-10-17T14:04:12","slug":"spam-5","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/10\/17\/spam-5\/","title":{"rendered":"Spam"},"content":{"rendered":"<p>It almost seems like the amount of spam I get has been decreasing:<\/p>\n<img decoding=\"async\" src=\"http:\/\/ttwagner.com\/cgi-bin\/mailgraph.cgi?3-e\" \/>\n<p>The labels on that graph are deceptive; the &#8220;spam&#8221; and &#8220;virus&#8221; labels refer to things measured with a tool I don&#8217;t use, and mail shouldn&#8217;t be bounced; that refers to an initial configuration error. But the number of rejected e-mails is the volume of spam. (Technically, it&#8217;d include mail sent to non-existent addresses&#8230; But the only people who&#8217;ve done that are spammers.)<\/p>\n<p>Oh, and check out my <a href=\"http:\/\/n1zyy.com\/n1zyy\/spam.php\">spam map<\/a>, which I threw together a while ago. It uses <a href=\"http:\/\/www.maxmind.com\/app\/geolitecountry\">MaxMind&#8217;s databases<\/a> of IP-to-country mappings to determine the country each message originates from, counts the number of entries for each country, and then plots it using the <a href=\"http:\/\/code.google.com\/apis\/chart\/\">Google Chart API<\/a>. It has a rather distinctive shape, but for those of you wondering about that dark blue one in the Middle East, it&#8217;s Turkey, and it&#8217;s topped the list of spammers for a while now, for some reason. Russia is also a pretty notable spammer, as is, of course, China. But you can see that spam is hardly a problem that comes from just a few countries: the US is a fairly dark shade of blue, as are quite a few South American nations.<\/p>\n<p>I&#8217;m increasingly wanting to write my own plugin for Postfix. Currently, my mailbox doesn&#8217;t get any spam, but one mailbox on another domain gets a small volume, maybe one message week. SpamAssassin catches it (usually giving it a score of something like 25, with a score of 5 being needed to classify it as spam), but SpamAssassin takes a couple seconds for each message. (Much of this, actually, is that it goes off and queries several DNSBLs, so it&#8217;s waiting on remote servers to respond.)<\/p>\n<p>There are two things that are actually very effective against spam that I don&#8217;t use: rejecting mail based on DNS blacklists, and requiring HELOs to be fully-qualified domain names. The trouble with the former is that historically, many blacklists have gotten full of themselves and started listing whole networks, aiming for &#8220;collateral damage&#8221; to make companies get rid of spammers, but causing mailservers to reject innocent mail. Requiring HELOs to be FQDNs caught way more spam than I&#8217;d have expected, but I grew concerned that, strictly speaking, it didn&#8217;t set spammers apart: a not-so-hotly configured legitimate mailserver could identify itself with a short name (&#8220;exchange1&#8221; instead of &#8220;exchange1.example.com&#8221; for example).<\/p>\n<p>What SpamAssassin (the software that scans the body of a message for &#8216;spamminess&#8217; after it&#8217;s accepted) does is scoring. It does lots and lots of checks, and each check has a predefined score. Some things only increment the score a tiny bit, others increment it a lot. Some actually decrease the score, when it identifies things that usually occur only in non-spam. I want to write a plugin for Postfix that does that. Being in <a href=\"http:\/\/www.spamhaus.org\/\">Spamhaus<\/a>&#8216; blacklists might increase your score by 3, whereas the <a href=\"http:\/\/www.dnswl.org\/\">DNSWL<\/a> would be -10. A site known for being a little more aggressive, like <a href=\"http:\/\/www.uceprotect.net\/en\/index.php\">UCE-Protect<\/a>, might be +1.5 or so. A non-FQDN HELO might be +2.5. And then I can route mail accordingly. Anyone with a negative score would be accepted and automatically whitelisted; anyone over 5 would be rejected and blacklisted, and anything in between would just be accepted. I&#8217;m actually surprised this sort of thing doesn&#8217;t exist. You can get very accurate results anyway, but I find it hard to believe that the idea of &#8220;scoring&#8221; mail during the SMTP session itself is something I invented.<\/p>","protected":false},"excerpt":{"rendered":"<p>It almost seems like the amount of spam I get has been decreasing: The labels on that graph are deceptive; the &#8220;spam&#8221; and &#8220;virus&#8221; labels refer to things measured with a tool I don&#8217;t use, and mail shouldn&#8217;t be bounced; &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/10\/17\/spam-5\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1254","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=1254"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1254\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=1254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=1254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=1254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}