## khop-sc-neighbors.cf v 20110321 ## Khopesh's syndication of SpamCop's top offenders and top offending networks. ## ## Spamassassin rules written by Adam Katz ## http://khopesh.com/Anti-spam ## khopesh on irc://irc.freenode.net/#spamassassin ## ## sa-update --gpgkey E8B493D6 --channel khop-bl.sa.khopesh.com ## ## These rules are Copyright 2001-2009 by Adam Katz ## Licensed under the Creative Commons Non-Commercial Share-alike License 2.0. ## The code that generated this output is GNU Affero General Public License v3. ## Source data (copyright Cisco subsidiary SpamCop.net) taken from links below. ## The author is receptive to relicensing requests for this and its generator. ## ## Frequent updates are needed for these rules, so they are marked 'nopublish' ## This keeps them from being automatically promoted to SpamAssassin proper ## from the testing system, which affirms their usefulness. You can check ## their efficiency at http://ruleqa.spamassassin.org/?rule=%2FKHOP_SC # http://spamcop.net/w3m?action=map;mask=4294967295;net=0;sort=56 # Due to the massive block size, this rule only examines the last untrusted header __KHOP_SC_CIDR8 X-Spam-Relays-Untrusted =~ /^[^\]]* (?:by|ip)=(?-xism:\b(?:1(?:22|87)|201|95)(?:\.[012]?\d{1,2}){3}\b) / # and gets cleaned up a bit meta KHOP_SC_CIDR8 __KHOP_SC_CIDR8 && !(__VIA_ML||__freemail_safe||__RCVD_IN_DNSWL||RCVD_IN_HOSTKARMA_WL) describe KHOP_SC_CIDR8 Relay CIDR /8 is among worst in SpamCop tflags KHOP_SC_CIDR8 nopublish score KHOP_SC_CIDR8 0.2 0.1 0.3 0.2 # spam/ham s/o corpus # 12.3692/1.0099 0.925 20100211 .2 .1 .3 .2 -> .1 .01 .1 .01 # 8.9412/1.1532 0.886 20100325 # 9.4362/0.4074 0.959 20100329 # 11.8281/0.4788 0.961 20100401 without meta # 11.8578/0.4495 0.961 20100402 half meta (oops). decreased worst 4/8->4/7 # 7.8856/0.1388 0.983 20100403 meta, net, solo=7.9236/0.4189 # changed from rank by spam count to rank by hosts reported, back to 4/8 # 12.1963/0.0356 0.997 20100406 (wow) solo=12.2454/0.0408@0.997 # 12.0753/0.0359 0.997 20100409 solo=12.1265/0.0412@0.997 # 12.1449/0.0139 0.999 20100410 net, solo=12.1966/0.0197@0.998, ->.2 .1 .3 .2 header __KHOP_SC_TOP_CIDR8 X-Spam-Relays-Untrusted =~ /^[^\]]* (?:by|ip)=(?-xism:\b1(?:17|78|89|90)(?:\.[012]?\d{1,2}){3}\b) / meta KHOP_SC_TOP_CIDR8 __KHOP_SC_TOP_CIDR8 && !(__VIA_ML||__freemail_safe||__RCVD_IN_DNSWL||RCVD_IN_HOSTKARMA_WL) describe KHOP_SC_TOP_CIDR8 Relay CIDR /8 leads SpamCop in worst /8s tflags KHOP_SC_TOP_CIDR8 nopublish score KHOP_SC_TOP_CIDR8 0.9 0.1 0.9 0.1 # spam/ham s/o corpus # 15.6795/0.1173 0.993 20100211 .5 .4 .8 .6 -> .6 .5 .8 .5 # 11.0578/0.3614 0.968 20100325 # 13.7809/0.4860 0.966 20100329 .9 .1 .9 .1 masscheck promoted # 14.1773/0.4799 0.967 20100401 # 14.1807/0.4960 0.966 20100402 without meta # 14.0841/0.0926 0.993 20100402 added meta (wow!) # 14.2553/0.0424 0.997 20100403 net, solo=14.3609/0.4888@0.967 # 11.6252/0.1263 0.989 20100406 solo=11.7104/0.5366@0.956 # 11.5987/0.1295 0.989 20100409 solo=11.6856/0.5731@0.953 # 11.6286/0.0475 0.996 20100410 net, solo=11.7224/0.6900@0.944, ->LE as above # http://www.spamcop.net/w3m?action=map;net=bmaxcnt;mask=16777215;sort=spamcnt header KHOP_SC_CIDR16 Received =~ /___ FAILED TO POPULATE ___/ describe KHOP_SC_CIDR16 Relay CIDR /16 is among worst in SpamCop tflags KHOP_SC_CIDR16 nopublish score KHOP_SC_CIDR16 1.6 0.5 1.6 0.5 # spam/ham s/o corpus # 0.7444/0.0129 0.983 20100211 # 0.5943/0.0139 0.977 20100325 .6 .5 .9 .75 # 0.8767/0.0167 0.981 20100329 1.6 .5 1.6 .5 masscheck promoted # 0.6952/0.0011 0.998 20100401 increased worst offenders 6/12->9/15 @ 20100401 # 0.6814/0.0149 0.979 20100402 # 0.4399/0.0008 0.998 20100403 net run # 0.2102/0.0011 0.995 20100406 # 0 /0 0 20100409 (wha!?) # crap, still empty 20100410 bad scrape, script failed to populate rule header KHOP_SC_TOP_CIDR16 Received =~ /(?-xism:\b(?:1(?:1(?:3\.165|8\.96)|25\.160)|41\.141)(?:\.[012]?\d{1,2}){2}\b)/ describe KHOP_SC_TOP_CIDR16 Relay CIDR /16 leads SpamCop in worst /16s tflags KHOP_SC_TOP_CIDR16 nopublish score KHOP_SC_TOP_CIDR16 2.0 0.5 2.0 0.5 # spam/ham s/o corpus # 0.8862/0.0008 0.999 20100211 # 0.5738/0.0008 0.999 20100325 .9 .8 1.3 1.2 # 0.6658/0 1.000 20100329 2 .5 2 .5 masscheck promoted # 0.8374/0 1.000 20100401 # 1.1534/0 1.000 20100402 # 1.2077/0.0145 0.988 20100403 net run # 1.2155/0.0142 0.988 20100406 # 1.2779/0.0142 0.989 20100409 # 1.0611/0.0009 0.999 20100410 net # http://spamcop.net/w3m?action=map;net=cmaxcnt;mask=65535;sort=spamcnt header KHOP_SC_CIDR24 Received =~ /(?-xism:\b(?:1(?:9(?:8\.106\.26|5\.161\.9)|13\.162\.240|78\.49\.255|21\.54\.54)|2(?:1(?:(?:3\.233|8\.248)\.64|7\.118\.(?:81|90))|00\.4\.167)|9(?:5\.129\.166|1\.203\.67|8\.139\.91)|8(?:5\.2(?:5\.13|6\.22)5|0\.65\.16)|77\.232\.14[23]|41\.137\.24|62\.183\.85)\.[012]?\d{1,2}\b)/ describe KHOP_SC_CIDR24 Relay CIDR /24 is among worst in SpamCop tflags KHOP_SC_CIDR24 nopublish score KHOP_SC_CIDR24 2.5 0.6 2.5 0.6 # spam/ham s/o corpus # 0.1350/0 1.000 20100211 # 0.0798/0 1.000 20100325 .9 .8 1.3 1.2 # 0.0159/0 1.000 20100329 2.5 .6 2.5 .6 masscheck promoted # 0.1577/0 1.000 20100401 # added top host-count /24s, increased worst offenders 6/12->8/15 @ 20100401 # 0.1223/0 1.000 20100402 (oops, too small a pool) # host-count 84/64->84/50, offenders 8/15->10/20 @ 20100402 # 0.2547/0 1.000 20100403 net # 0.2126/0 1.000 20100406 # 0.2960/0 1.000 20100409 # 0.2905/0 1.000 20100410 net header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:8(?:5\.(?:26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|115\.248)|1\.192\.(?:2(?:1[15]|38)|199)|3\.149\.(?:38?|21)|2\.178\.69|8\.190\.12)|2(?:1(?:3\.(?:87\.(?:1(?:28|36)|74)|186\.38|233\.64)|7\.(?:118\.(?:83|90)|66\.146|8\.225))|0(?:(?:2\.152\.24|0\.80\.1)3|3\.82\.95))|1(?:22\.55\.106|95\.91\.70)|9(?:5\.154\.240|6\.44\.171)|6(?:0\.199\.201|1\.19\.66)|41\.(?:254\.1|95\.4))\.[012]?\d{1,2}\b)/ describe KHOP_SC_TOP_CIDR24 Relay CIDR /24 leads SpamCop in worst /24s tflags KHOP_SC_TOP_CIDR24 nopublish score KHOP_SC_TOP_CIDR24 2.7 0.6 2.7 0.6 # spam/ham s/o corpus # 0.2528/0.0092 0.965 20100211 # 0.2231/0.0112 0.952 20100325 1.7 1.5 1.9 1.8 # 0.0249/0 1.000 20100329 2.7 .6 2.7 .6 masscheck promoted # 0.1594/0 1.000 20100401 # 0.6448/0 1.000 20100402 (wow!) # 0.6896/0 1.000 20100403 net # 0.6255/0.0045 0.993 20100406 # 0.7261/0.0045 0.994 20100409 # 0.7447/0.0054 0.993 20100410 net # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:9(?:0\.(?:2(?:0(?:2\.100\.188|5\.182\.81)|45\.157\.211|5\.242\.179|16\.41\.94)|79\.205\.152|30\.236\.34|4\.48\.130)|5\.(?:16(?:1\.(?:40\.10|9\.2)|0\.253\.4)|62\.62\.243)|3\.(?:(?:120\.102\.12|251\.78\.9)3|42\.152\.4)|4\.(?:225\.28\.20|79\.151\.)2|8\.106\.26\.(?:37|72))|2(?:\.(?:1(?:55\.164\.16|99\.5\.)2|52\.153\.246)|2\.(?:169\.249\.87|252\.234\.75)|5\.239\.163\.103|0\.50\.43\.204|4\.243\.13\.16|3\.27\.79\.11)|1(?:3\.1(?:60\.196\.110|72\.147\.178)|4\.108\.101\.244|9\.224\.140\.107|0\.139\.57\.173|7\.103\.89\.169|5\.113\.53\.35|6\.50\.210\.90)|8(?:7\.(?:141\.(?:102\.198|84\.87)|66\.16\.83)|8\.154\.157\.104|9\.214\.136\.173|0\.230\.249\.62|4\.78\.117\.100|3\.99\.46\.115)|7(?:8\.(?:49\.255\.104|32\.64\.195|5\.121\.163)|3\.(?:165\.165\.117|210\.25\.146)|5\.115\.92\.120)|09\.(?:121\.130\.78|66\.119\.189|73\.85\.184)|(?:51\.100\.65\.16|\.55\.6\.23)8|64\.124\.106\.142)|8(?:8\.(?:1(?:(?:64\.68\.23|77\.32\.6)2|82\.201\.89|90\.12\.240)|255\.153\.106)|4\.(?:1(?:09\.238\.83|11\.22\.198|5\.191\.254)|229\.109\.253|50\.91\.98)|1\.(?:2(?:41\.242\.152|52\.81\.165|7\.223\.13)|181\.40\.18|93\.6\.24)|0\.(?:1(?:4\.198\.55|3\.41\.20|22\.6\.6)|85\.98\.133|65\.16\.71)|2\.(?:1(?:45\.151\.100|93\.140\.168)|2(?:22\.12\.58|33\.64\.26))|9\.(?:1(?:01\.165\.150|61\.189\.62)|2(?:16\.215\.160|37\.26\.2))|3\.(?:2(?:44\.146\.194|21\.231\.3)|142\.111\.228|71\.162\.149)|5\.(?:1(?:9\.146\.248|35\.19\.14)|25\.135\.200)|7\.(?:126\.253\.24|245\.3\.98)|6\.42\.6\.206)|2(?:0(?:0\.(?:8(?:7\.145\.212|0\.13\.66)|4\.16(?:4\.205|7\.56)|21\.18\.189)|1\.(?:1(?:16\.224\.244|59\.20\.115)|232\.85\.222|55\.165\.134)|(?:2\.131\.235\.12|3\.248\.186\.7|8\.131\.186\.)2|7\.118\.195\.219|4\.188\.168\.11|9\.26\.153\.3)|1(?:3\.(?:1(?:58\.140\.136|86\.38\.38)|57\.148\.124)|2\.(?:1(?:99\.29\.14|75\.170\.)5|85\.101\.94)|8\.2(?:22\.209\.67|48\.44\.196)|9\.(?:70\.222\.183|88\.76\.236)|7\.(?:41\.13\.74|26\.6\.97)|0\.122\.170\.6|1\.147\.3\.74)|4\.218\.163\.223|22\.252\.223\.2)|6(?:2\.(?:1(?:19\.245\.122|40\.253\.15)|(?:83\.172\.15|45\.208\.4)9|219\.136\.238|77\.185\.17)|7\.(?:1(?:(?:67\.53\.21|5\.97\.8)2|74\.247\.101)|230\.181\.234)|9\.(?:199\.1(?:64\.222|8\.28)|59\.101\.142|64\.155\.181)|6\.(?:1(?:43\.148\.249|58\.48\.2)|58\.243\.150)|0\.(?:199\.201\.120|32\.127\.131|234\.63\.6)|5\.(?:183\.197\.46|75\.94\.243)|4\.148\.129\.140|8\.202\.42\.141|1\.76\.140\.18)|9(?:4\.(?:2(?:00\.54\.242|36\.202\.13)|1(?:74\.158\.4|85\.199\.6)5)|6\.(?:44\.171\.1(?:5[012345678]|4[56789])|226\.4\.60)|5\.(?:1(?:70\.183\.255|54\.240\.98)|86\.7\.37)|3\.(?:91\.196\.99|27\.202\.6)|2\.126\.214\.177|1\.89\.76\.118|8\.193\.40\.31)|7(?:9\.(?:1(?:7(?:8\.12\.74|9\.39\.95|6\.5\.98)|35\.234\.184|80\.65\.188)|87\.209\.93)|8\.(?:1(?:55\.2(?:40\.145|2\.36)|11\.205\.158)|36\.17\.164)|2\.(?:46\.215\.108|243\.69\.45)|6\.(?:16\.124\.157|0\.150\.140)|0\.166\.229\.75|7\.232\.83\.2)|41\.(?:13(?:(?:7\.(?:24|30|56)\.|3\.128\.25)4|2\.241\.65)|224\.8\.126)|58\.150\.55\.59)\b)/ describe KHOP_SC_TOP200 Relay listed in SpamCop top 200 spammer IPs tflags KHOP_SC_TOP200 nopublish score KHOP_SC_TOP200 4 0 4 0 # unnecessary if DNSBLs work # spam/ham s/o corpus # 1.2552/0 1.000 20100211 # 0.8558/0 1.000 20100325 3.4 3.2 3.7 3.5 # 0.1265/0 1.000 20100329 4 0 4 0 masscheck promoted # 0.7066/0 1.000 20100401 # 0.6558/0 1.000 20100403 net # 0.6211/0 1.000 20100406 # 0.5307/0 1.000 20100409 # 0.5617/0 1.000 20100410 net # Spamhaus DROP, http://www.spamhaus.org/drop/ header KHOP_SPAMHAUS_DROP X-Spam-Relays-Untrusted =~ /(?-xism: (?:by|ip)=(?:1(?:9(?:8\.(?:1(?:8(?:3\.(?:3[23456789]|6[0123]|[45]\d)|6\.(?:1[6789]|3[01]|2\d))|2\.(?:3[23456789]|6[0123]|[45]\d)|3\.(?:[023456789]|1[012345]?)|62\.2(?:2[0123]|0[89]|1\d)|43\.1(?:[345]\d|2[89])|51\.15[2345])|2(?:52\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|3\.(?:3[23456789]|4[01234567])|04\.[01234567])|57\.(?:6[456789]|7\d))|5\.(?:1(?:9(?:1\.10[23]|0\.157)|4(?:\.11[23]|9\.88)|14\.[89]|62\.[67]|82\.57)|2(?:2(?:6\.(?:197|220)|5\.17[6789])|3(?:4\.159|8\.242)|\.21[23])|8(?:8\.(?:1(?:4[45]|9[01])|22[67])|0\.1(?:4[89]|5[01])|5\.204)|9(?:3\.(?:18[45]|20[89])|5\.15[15])|5(?:4\.17[01]|\.161)|7(?:8\.10|4\.8)[89])|9\.(?:1(?:6(?:5\.(?:3[23456789]|6[0123]|[45]\d)|6\.20[0123])|98\.1(?:[678]\d|9[01])|20\.163)|2(?:30\.(?:6[456789]|10[0123]|[789]\d)|4(?:5\.138|6\.215))|3(?:4\.1(?:[345678]\d|2[89]|9[01])|3\.145)|46\.(?:3[23456789]|6[0123]|[45]\d)|84\.(?:6[456789]|9[012345]|[78]\d)|5\.15[23]|60\.102)|3\.(?:1(?:0(?:4\.(?:1(?:[47]6|10|2)|[39]4|253|41)|5\.(?:1(?:[78]4|32|41)|2(?:07|45))|6\.3[2345])|6(?:9\.25[01]|\.100)|4(?:2\.244|8\.47)|10\.136|78\.172|86\.9)|2(?:3(?:\.126(?:\.30)?|8\.[0123])|2(?:7\.24[01]|8\.145)|7\.2(?:3[23]|4[67])|01\.19[23])|4(?:3\.134|6\.211|1\.38))|2\.(?:2(?:23\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|19\.(?:2(?:1[012345]|0\d)|1[23456789]\d)|6\.25)|1(?:0(?:1\.(?:2(?:0[01234567]|4\d)|177)|0\.5)|12\.1(?:1[23456789]|2[01234567])|60\.44|97\.87)|43\.1(?:5[3456789]|7[56789]|8[01234]|60)|31\.21[23]|67\.16|86\.85)|4\.(?:1(?:4(?:6\.20[4567]|3\.13[01]|0\.229)|1(?:0\.16[0123]|6\.14[67])|26\.(?:193|251)|65\.[45]|\.22[01])|2(?:8\.4[4567]|47\.58)|8\.(?:25[01]|7[45])|0\.2(?:21|45)|54\.15[6789]|63\.14[4567])|6\.(?:1\.1(?:7[6789]|9[01]|8\d)|32\.2(?:1[6789]|2[0123])))?|1(?:0\.(?:44\.1(?:4[0123]|2[89]|3\d)|232\.1(?:7[012345]|6\d))|6\.(?:68\.1(?:3[6789]|4[0123])|199\.1(?:[345]\d|2[89]))|3\.20\.1(?:[678]\d|9[01]))?|8(?:8\.(?:2(?:29\.(?:9[012345]|[45678]\d|1[36789]|2[0123]|35)|12\.(?:[023456789]|1[012345]?))|1(?:70\.19[23456789]|30\.25[01])))?|2(?:(?:1\.4|9\.7)6\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|2\.202\.(?:1(?:2[01234567]|[01]\d)|9[6789])|8\.1(?:68|99))?|4(?:\.1(?:\.(?:1(?:2[01234567]|[01]\d)|9[6789])|02\.1(?:[678]\d|9[01]))|8\.(?:1(?:05|78)|248)|3\.(?:(?:13|9)5|49)|0\.170)?|5(?:7\.2(?:32\.(?:1(?:[3456789]|2[01234567]?|[01]\d?)?|[23456789]\d?|0)|26)|(?:1\.1|9\.2)23|0\.(?:141|230)|2\.147|5\.190)?|3(?:4\.(?:1(?:27|72)|2(?:09|3)|33)|2\.(?:2(?:32|40)|145)|0\.(?:2(?:01|22)|51)|6\.228|9\.167|8\.43)?|6(?:9\.131\.(?:2(?:5[012345]|[01234]\d)|1(?:[3456789]\d|2[89]))|7\.(?:28|97)|2\.125|8\.151)?|7(?:3\.225\.1(?:1[23456789]|2[01234567])|4\.138\.1(?:4[456789]|5\d)|0\.(?:[27]5|120|67))?|0(?:9\.94\.21[2345])?)?|2(?:[23456789]|0(?:4\.(?:1(?:87\.(?:2(?:2[456789]|5[01234]|[34]\d)|1(?:5[56789]|[678]\d|9[01]))|94\.1(?:8[456789]|9[01])|26\.24[45]|07\.208)|2(?:36\.(?:[0456789]|[12]\d?|3[01]?)|8\.1(?:0[456789]|1[01]))|48\.(?:6[456789]|9[012345]|[78]\d)|63\.1(?:4[456789]|5[01])|52\.255|89\.224)|0\.(?:1(?:2(?:5\.1(?:7[012345]|6[89])|3\.2(?:2[456789]|3\d)|4\.16[01234567])|15\.(?:1(?:2[01234567]|[01]\d)|9[6789])|06\.1(?:4[0123]|2[89]|3\d))|50\.(?:2(?:2[0123]|[01]\d)|19[23456789])|22)|5\.(?:2(?:03\.2(?:2[456789]|5[012345]|[34]\d)|3(?:5\.(?:6[456789]|7\d)|6\.189)|14\.1(?:[345]\d|2[89]))|1(?:4(?:4\.(?:[023456789]|1[012345]?)|2\.10[4567])|72\.24[4567]))|6\.(?:2(?:2(?:7\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|4\.1(?:[678]\d|9[01]))|01\.(?:6[0123]|4[89]|5\d))|197\.(?:17[567]|2[89]))|9\.2(?:05\.(?:19[23456789]|2[0123]\d)|36\.(?:1(?:1[01]|0\d)|9[6789])|13\.(?:6[0123]|4[89]|5\d))|7\.18(?:3\.(?:2(?:2[0123]|[01]\d)|19[23456789])|9\.(?:[0456789]|[12]\d?|3[01]?))|8\.(?:8[12]\.1(?:3[6789]|4[0123])|90\.[01234567]|64\.20[0123])|1\.71\.(?:[023456789]|1[012345]?)|3\.3(?:1\.8[89]|4\.7[01])|2\.(?:59\.236|61\.127))?|1(?:6\.(?:2(?:45\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|12\.(?:2(?:2[0123]|[01]\d)|19[23456789]))|4(?:9\.(?:[0789]|[12345]\d?|6[0123]?)|7\.(?:3[23456789]|4[01234567]))|151\.(?:19[23456789]|20[01234567]))|3\.(?:109\.(?:1(?:7[6789]|9[01]|8\d)|2(?:2[0123]|0[89]|1\d)|9[6789])|247\.(?:[0456789]|[12]\d?|3[01]?))|8\.75\.1(?:[345]\d|2[89]))?)?|9(?:1\.(?:2(?:0(?:1\.(?:[4567]|1(?:2[4567]|9[6789])|2(?:1[2345]|3[6789]))|0\.(?:1(?:6[4567]|8[89]|9[01])|2(?:4[012389]|5[01]))|9\.(?:1(?:8[346]|4)|(?:[45]|23)8)|4\.(?:5[01]|4\d)|8\.(?:162|228|0)|3\.9[2345]|5\.4[0123]|7\.11[67])|1(?:2\.(?:1(?:2[37]|3[25]|07|63|98)|2(?:01|20)|4[15]|65)|3\.(?:1(?:7[45]|21)|2(?:17|9)|7[25]|9[34])|1\.(?:6[4567]|8[89]|9[01])|6\.(?:1(?:4?1|22)|232|7?3)|0\.17[2345]|7\.249)|2(?:0\.(?:62|90)|2\.6[4567]))|19(?:(?:3\.19|6\.23)[2345]|8\.(?:1(?:09|27)|217)|9\.1(?:12|23|57)|7\.9[6789]|4\.[01]))|4\.(?:1(?:5(?:4\.1(?:[345678]\d|2[89]|9[01])|8\.2(?:5[012345]|4\d))|26\.1(?:7[6789]|8[0123])|3[01])|232\.2(?:5[012345]|4[89])|63\.24[0134567])|3\.1(?:20\.(?:3[23456789]|6[0123]|[45]\d)|7(?:5\.2(?:5[012345]|4\d)|4\.164)|68\.(?:2[012345]|1[89])|88\.16[01234567])|5\.(?:21(?:[67]|5\.1(?:4[0123]|9[2345]))|64\.(?:9[89]|109?|61)))?|6(?:[013]|4\.(?:1(?:12\.(?:1(?:[012345678]\d?|9[01]?)?|[23456789]\d?|0)|5\.(?:[023456789]|1[012345]?))|28\.1(?:7[6789]|9[01]|8\d)|44)|7\.21(?:0\.(?:[023456789]|1[012345]?)|[18]\.2(?:2[0123]|0[89]|1\d)|3\.1(?:4[0123]|2[89]|3\d))|6\.(?:98\.1(?:1[23456789]|2[01234567])|119\.2(?:2[456789]|3\d))|2(?:\.1(?:22\.(?:3[23456789]|7[23])|82\.15[23456789]))?|9\.8\.1(?:7[6789]|9[01]|8\d))?|7(?:9\.1(?:10\.(?:1(?:4[456789]|[678]\d?|9[01]?|5\d)|6[0123]|[25]\d|3[01]|4[89])|74\.(?:[0456789]|[12]\d?|3[01]?)|35\.1(?:[345]\d|2[89]))|2\.(?:50\.(?:2(?:2[0123]|[01]\d)|19[23456789])|13\.(?:1[6789]|3[01]|2\d)|2\.1(?:7[6789]|9[01]|8\d))|8\.(?:31\.1(?:8[456789]|9[01])|155\.22[01]))?|8(?:5\.2(?:02\.(?:1(?:9[23456789]|7[012345]|6\d)|20[01234567])|55\.1(?:1[23456789]|2[01234567]))|8\.(?:135\.(?:6[456789]|7\d)|214\.211)|1\.22\.15[23]|6\.55\.243|9\.114\.9)?|4(?:[02345789]|6(?:\.(?:252\.1(?:3[0123]|2[89])|51\.10[0123]))?|1(?:\.221\.1(?:1[23456789]|2[01234567]))?)?|5(?:[012345679]|8(?:\.83\.(?:[89]|1[012345]))?)?|3\d?|0)\b)/ describe KHOP_SPAMHAUS_DROP Relay listed in Spamhaus Don't Route Or Peer List tflags KHOP_SPAMHAUS_DROP nopublish #score KHOP_SPAMHAUS_DROP 3 0 3 0 score KHOP_SPAMHAUS_DROP 0.5 0 0.5 0 # testing, see also final stanza header KHOP_SPAMHAUS_DROP_LE X-Spam-Relays-External =~ /^[^]]*(?-xism: (?:by|ip)=(?:1(?:9(?:8\.(?:1(?:8(?:3\.(?:3[23456789]|6[0123]|[45]\d)|6\.(?:1[6789]|3[01]|2\d))|2\.(?:3[23456789]|6[0123]|[45]\d)|3\.(?:[023456789]|1[012345]?)|62\.2(?:2[0123]|0[89]|1\d)|43\.1(?:[345]\d|2[89])|51\.15[2345])|2(?:52\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|3\.(?:3[23456789]|4[01234567])|04\.[01234567])|57\.(?:6[456789]|7\d))|5\.(?:1(?:9(?:1\.10[23]|0\.157)|4(?:\.11[23]|9\.88)|14\.[89]|62\.[67]|82\.57)|2(?:2(?:6\.(?:197|220)|5\.17[6789])|3(?:4\.159|8\.242)|\.21[23])|8(?:8\.(?:1(?:4[45]|9[01])|22[67])|0\.1(?:4[89]|5[01])|5\.204)|9(?:3\.(?:18[45]|20[89])|5\.15[15])|5(?:4\.17[01]|\.161)|7(?:8\.10|4\.8)[89])|9\.(?:1(?:6(?:5\.(?:3[23456789]|6[0123]|[45]\d)|6\.20[0123])|98\.1(?:[678]\d|9[01])|20\.163)|2(?:30\.(?:6[456789]|10[0123]|[789]\d)|4(?:5\.138|6\.215))|3(?:4\.1(?:[345678]\d|2[89]|9[01])|3\.145)|46\.(?:3[23456789]|6[0123]|[45]\d)|84\.(?:6[456789]|9[012345]|[78]\d)|5\.15[23]|60\.102)|3\.(?:1(?:0(?:4\.(?:1(?:[47]6|10|2)|[39]4|253|41)|5\.(?:1(?:[78]4|32|41)|2(?:07|45))|6\.3[2345])|6(?:9\.25[01]|\.100)|4(?:2\.244|8\.47)|10\.136|78\.172|86\.9)|2(?:3(?:\.126(?:\.30)?|8\.[0123])|2(?:7\.24[01]|8\.145)|7\.2(?:3[23]|4[67])|01\.19[23])|4(?:3\.134|6\.211|1\.38))|2\.(?:2(?:23\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|19\.(?:2(?:1[012345]|0\d)|1[23456789]\d)|6\.25)|1(?:0(?:1\.(?:2(?:0[01234567]|4\d)|177)|0\.5)|12\.1(?:1[23456789]|2[01234567])|60\.44|97\.87)|43\.1(?:5[3456789]|7[56789]|8[01234]|60)|31\.21[23]|67\.16|86\.85)|4\.(?:1(?:4(?:6\.20[4567]|3\.13[01]|0\.229)|1(?:0\.16[0123]|6\.14[67])|26\.(?:193|251)|65\.[45]|\.22[01])|2(?:8\.4[4567]|47\.58)|8\.(?:25[01]|7[45])|0\.2(?:21|45)|54\.15[6789]|63\.14[4567])|6\.(?:1\.1(?:7[6789]|9[01]|8\d)|32\.2(?:1[6789]|2[0123])))?|1(?:0\.(?:44\.1(?:4[0123]|2[89]|3\d)|232\.1(?:7[012345]|6\d))|6\.(?:68\.1(?:3[6789]|4[0123])|199\.1(?:[345]\d|2[89]))|3\.20\.1(?:[678]\d|9[01]))?|8(?:8\.(?:2(?:29\.(?:9[012345]|[45678]\d|1[36789]|2[0123]|35)|12\.(?:[023456789]|1[012345]?))|1(?:70\.19[23456789]|30\.25[01])))?|2(?:(?:1\.4|9\.7)6\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|2\.202\.(?:1(?:2[01234567]|[01]\d)|9[6789])|8\.1(?:68|99))?|4(?:\.1(?:\.(?:1(?:2[01234567]|[01]\d)|9[6789])|02\.1(?:[678]\d|9[01]))|8\.(?:1(?:05|78)|248)|3\.(?:(?:13|9)5|49)|0\.170)?|5(?:7\.2(?:32\.(?:1(?:[3456789]|2[01234567]?|[01]\d?)?|[23456789]\d?|0)|26)|(?:1\.1|9\.2)23|0\.(?:141|230)|2\.147|5\.190)?|3(?:4\.(?:1(?:27|72)|2(?:09|3)|33)|2\.(?:2(?:32|40)|145)|0\.(?:2(?:01|22)|51)|6\.228|9\.167|8\.43)?|6(?:9\.131\.(?:2(?:5[012345]|[01234]\d)|1(?:[3456789]\d|2[89]))|7\.(?:28|97)|2\.125|8\.151)?|7(?:3\.225\.1(?:1[23456789]|2[01234567])|4\.138\.1(?:4[456789]|5\d)|0\.(?:[27]5|120|67))?|0(?:9\.94\.21[2345])?)?|2(?:[23456789]|0(?:4\.(?:1(?:87\.(?:2(?:2[456789]|5[01234]|[34]\d)|1(?:5[56789]|[678]\d|9[01]))|94\.1(?:8[456789]|9[01])|26\.24[45]|07\.208)|2(?:36\.(?:[0456789]|[12]\d?|3[01]?)|8\.1(?:0[456789]|1[01]))|48\.(?:6[456789]|9[012345]|[78]\d)|63\.1(?:4[456789]|5[01])|52\.255|89\.224)|0\.(?:1(?:2(?:5\.1(?:7[012345]|6[89])|3\.2(?:2[456789]|3\d)|4\.16[01234567])|15\.(?:1(?:2[01234567]|[01]\d)|9[6789])|06\.1(?:4[0123]|2[89]|3\d))|50\.(?:2(?:2[0123]|[01]\d)|19[23456789])|22)|5\.(?:2(?:03\.2(?:2[456789]|5[012345]|[34]\d)|3(?:5\.(?:6[456789]|7\d)|6\.189)|14\.1(?:[345]\d|2[89]))|1(?:4(?:4\.(?:[023456789]|1[012345]?)|2\.10[4567])|72\.24[4567]))|6\.(?:2(?:2(?:7\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|4\.1(?:[678]\d|9[01]))|01\.(?:6[0123]|4[89]|5\d))|197\.(?:17[567]|2[89]))|9\.2(?:05\.(?:19[23456789]|2[0123]\d)|36\.(?:1(?:1[01]|0\d)|9[6789])|13\.(?:6[0123]|4[89]|5\d))|7\.18(?:3\.(?:2(?:2[0123]|[01]\d)|19[23456789])|9\.(?:[0456789]|[12]\d?|3[01]?))|8\.(?:8[12]\.1(?:3[6789]|4[0123])|90\.[01234567]|64\.20[0123])|1\.71\.(?:[023456789]|1[012345]?)|3\.3(?:1\.8[89]|4\.7[01])|2\.(?:59\.236|61\.127))?|1(?:6\.(?:2(?:45\.(?:1(?:2[01234567]|[01]\d)|6[456789]|[789]\d)|12\.(?:2(?:2[0123]|[01]\d)|19[23456789]))|4(?:9\.(?:[0789]|[12345]\d?|6[0123]?)|7\.(?:3[23456789]|4[01234567]))|151\.(?:19[23456789]|20[01234567]))|3\.(?:109\.(?:1(?:7[6789]|9[01]|8\d)|2(?:2[0123]|0[89]|1\d)|9[6789])|247\.(?:[0456789]|[12]\d?|3[01]?))|8\.75\.1(?:[345]\d|2[89]))?)?|9(?:1\.(?:2(?:0(?:1\.(?:[4567]|1(?:2[4567]|9[6789])|2(?:1[2345]|3[6789]))|0\.(?:1(?:6[4567]|8[89]|9[01])|2(?:4[012389]|5[01]))|9\.(?:1(?:8[346]|4)|(?:[45]|23)8)|4\.(?:5[01]|4\d)|8\.(?:162|228|0)|3\.9[2345]|5\.4[0123]|7\.11[67])|1(?:2\.(?:1(?:2[37]|3[25]|07|63|98)|2(?:01|20)|4[15]|65)|3\.(?:1(?:7[45]|21)|2(?:17|9)|7[25]|9[34])|1\.(?:6[4567]|8[89]|9[01])|6\.(?:1(?:4?1|22)|232|7?3)|0\.17[2345]|7\.249)|2(?:0\.(?:62|90)|2\.6[4567]))|19(?:(?:3\.19|6\.23)[2345]|8\.(?:1(?:09|27)|217)|9\.1(?:12|23|57)|7\.9[6789]|4\.[01]))|4\.(?:1(?:5(?:4\.1(?:[345678]\d|2[89]|9[01])|8\.2(?:5[012345]|4\d))|26\.1(?:7[6789]|8[0123])|3[01])|232\.2(?:5[012345]|4[89])|63\.24[0134567])|3\.1(?:20\.(?:3[23456789]|6[0123]|[45]\d)|7(?:5\.2(?:5[012345]|4\d)|4\.164)|68\.(?:2[012345]|1[89])|88\.16[01234567])|5\.(?:21(?:[67]|5\.1(?:4[0123]|9[2345]))|64\.(?:9[89]|109?|61)))?|6(?:[013]|4\.(?:1(?:12\.(?:1(?:[012345678]\d?|9[01]?)?|[23456789]\d?|0)|5\.(?:[023456789]|1[012345]?))|28\.1(?:7[6789]|9[01]|8\d)|44)|7\.21(?:0\.(?:[023456789]|1[012345]?)|[18]\.2(?:2[0123]|0[89]|1\d)|3\.1(?:4[0123]|2[89]|3\d))|6\.(?:98\.1(?:1[23456789]|2[01234567])|119\.2(?:2[456789]|3\d))|2(?:\.1(?:22\.(?:3[23456789]|7[23])|82\.15[23456789]))?|9\.8\.1(?:7[6789]|9[01]|8\d))?|7(?:9\.1(?:10\.(?:1(?:4[456789]|[678]\d?|9[01]?|5\d)|6[0123]|[25]\d|3[01]|4[89])|74\.(?:[0456789]|[12]\d?|3[01]?)|35\.1(?:[345]\d|2[89]))|2\.(?:50\.(?:2(?:2[0123]|[01]\d)|19[23456789])|13\.(?:1[6789]|3[01]|2\d)|2\.1(?:7[6789]|9[01]|8\d))|8\.(?:31\.1(?:8[456789]|9[01])|155\.22[01]))?|8(?:5\.2(?:02\.(?:1(?:9[23456789]|7[012345]|6\d)|20[01234567])|55\.1(?:1[23456789]|2[01234567]))|8\.(?:135\.(?:6[456789]|7\d)|214\.211)|1\.22\.15[23]|6\.55\.243|9\.114\.9)?|4(?:[02345789]|6(?:\.(?:252\.1(?:3[0123]|2[89])|51\.10[0123]))?|1(?:\.221\.1(?:1[23456789]|2[01234567]))?)?|5(?:[012345679]|8(?:\.83\.(?:[89]|1[012345]))?)?|3\d?|0)\b)/ describe KHOP_SPAMHAUS_DROP_LE Relay listed in Spamhaus Don't Route Or Peer List tflags KHOP_SPAMHAUS_DROP_LE nopublish score KHOP_SPAMHAUS_DROP_LE 0.1 0 0.1 0 # this adds to KHOP_SPAMHAUS_DROP # PSBL-neighbors: any /24 with 73+ (2/7, 29%) IPs in the PSBL (not SpamCop), # as obtained from rsync://psbl-mirror.surriel.com::psbl/psbl.txt header KHOP_PSBL_CIDR24 X-Spam-Relays-Untrusted =~ /(?-xism:\b(?:1(?:1(?:3\.1(?:62\.(?:2(?:2[578]|38|44)|1(?:3[23]|18))|0\.16[3458])|0\.(?:49\.(?:193|205)|53\.2[4567])|4\.112\.2(?:4[256789]|51)|6\.121\.230|7\.242\.148)|2(?:5\.23(?:4\.144|5\.192)|4\.217\.201|2\.55\.106)|9(?:6\.202\.214|5\.91\.70)|80\.149\.(?:12|8)|78\.49\.255)|2(?:1(?:3\.(?:87\.(?:1(?:14|28|36)|8[789]|9[012]|74)|(?:108\.17|226\.6)3)|7\.(?:8\.2(?:3[68]|25)|118\.(?:83|90)|66\.146))|0(?:1\.191\.19[58]|2\.152\.243|0\.85\.24|3\.82\.95))|8(?:5\.(?:26\.(?:1(?:6[45]|8[36]|55)|2(?:3[2345]|41))|115\.248)|3\.149\.(?:[89]|3[468]?|4[1456]|21)|1\.192\.(?:2(?:1[15]|38)|199)|9\.204\.1(?:37|53)|0\.83\.23[89]|2\.178\.69)|41\.(?:95\.(?:[48]|12)|254\.[12]|59\.[05])|6(?:1\.19\.6[567]|2\.183\.85|6\.87\.0)|5(?:9\.9(?:8\.152|9\.153)|8\.64\.187)|91\.203\.67)\.[012]?\d{1,2}\b)/ describe KHOP_PSBL_CIDR24 Relay's IP/24 CIDR contains many PSBL hits tflags KHOP_PSBL_CIDR24 nopublish score KHOP_PSBL_CIDR24 1.8 0.8 1.8 0.8 # spam/ham s/o corpus # 0.5363/0 1.000 20100401 # 0.7486/0 1.000 20100402 # 0.7317/0 1.000 20100403 net run. min hosts 73->65 # 0.9316/0 1.000 20100406 # 0.9473/0 1.000 20100409 # 0.9545/0 1.000 20100410 net # test for ruleqa, 20100409, http://ruleqa.spamassassin.org/?rule=/KHOP_SPAMMY meta __KHOP_SPAMMY_CIDR24 KHOP_PSBL_CIDR24||KHOP_SC_CIDR24||KHOP_SC_TOP_CIDR24 # est. 1.2/0.0050@.996, floor: 1.0/0.0112@.989, ceiling: 1.4/0@1 # spam/ham s/o corpus # 1.2645/0.0054 0.996 20100410 net # 1.1562/0.0058 0.995 20100417 net meta __KHOP_SPAMMY_CIDR16 KHOP_SC_CIDR16||KHOP_SC_TOP_CIDR16 # est. 1.4/0.02@.986, floor: 1.3/0.0312@.977, ceiling: 2.0/0.0150@.993 # spam/ham s/o corpus # 1.0611/0.0009 0.999 20100410 net # 1.9539/0.0152 0.992 20100417 net meta __KHOP_SPAMMY_CIDR8 KHOP_SC_CIDR8||KHOP_SC_TOP_CIDR8 # est. 23.7/0.15@.994, floor: 23/0.2685@.988, ceiling: 26.5/0.0789@.997 # spam/ham s/o corpus # 23.7686/0.0614 0.997 20100410 net # 22.2300/0.0616 0.997 20100417 net meta __KHOP_SPAMMY_SUBNET __KHOP_SPAMMY_CIDR24||__KHOP_SPAMMY_CIDR16 # est. 26.2/0.175@.993, floor: 24.5/0.5@.980, ceiling: 30.1/0.1@.997 # spam/ham s/o corpus # 25.6744/0.0677 0.997 20100410 net, beat estimated ceiling (for ham)! # 23.7846/0.0826 0.997 20100417 net, beat ceiling ham, but beat floor spam # 23.7505/0.1041 0.996 20100418 too much ham, nixing /8, new est. 3.0/.02@.993 # Bump these up to compensate for expected but absent overlap (94+% noted below) if (! plugin(Mail::SpamAssassin::Plugin::DNSEval) ) score KHOP_SC_CIDR8 (0) (0.1) (0) (0.2) # BRBL(98%) score KHOP_SC_TOP_CIDR8 (0) (0.9) (0) (0.9) # BRBL(98%) score KHOP_SC_CIDR16 (0) (1.5) (0) (1.5) # BRBL(99%), PBL(98%) score KHOP_SC_TOP_CIDR16 (0) (1.7) (0) (1.7) # BRBL(99%), PBL(94%) score KHOP_SC_CIDR24 (0) (1.9) (0) (1.9) # SC(99) BRBL(96) MSPIKE(96) score KHOP_SC_TOP_CIDR24 (0) (2.1) (0) (2.1) # MSPIKE(99) SC(98) BRBL(97) ... # PSBL(97) HOSTKARMA(97) score KHOP_SC_TOP200 (0) (4.4) (0) (4.4) # SC(99) PSBL(99) ... # HOSTKARMA(99) SEMBLACK(99) BRBL(98) MSPIKE(94) #score KHOP_SPAMHAUS_DROP (0) (3) (0) (2) # SBL(100) score KHOP_SPAMHAUS_DROP (0) (0.3) (0) (0.1) # SBL(100) score KHOP_PSBL_CIDR24 (0) (1.5) (0) (1.5) # BRBL(98) XBL(95) endif