ブログ - 特定のX-MailerにSPAMスコアを高くする
これまでSpamAssasinのスコア調整をしてきたけど,どうしてもすり抜けるものがある.その中で私の管理しているメールサーバでは確実にスパム判定できるX-Mailerがあるので,これを登録することにした.
まず,ここ2ヶ月くらいに受け取った迷惑メールのX-Mailerを抽出.
Microsoft Outlook Express 6.00が圧倒的.ビルド番号が違うものも含めたらもっとたくさんある.
それと以前調べたSupmailerや,うちでは定番のFoxmailが出ていたり,2012年で開発終了しているWindows Live Mailも出てます.今回は,これらを全てスパム判定に変更.
X-Mailerの判定部分は,72_active.cfという定義ファイルに格納されている.
まずはメーラの定義.
やっぱりOutlook Express 6.0のビルド番号でバリエーションが作られている模様.これらに以下を追加.
もう面倒なのでMicrosoft Outlook Express 6.00は全て対象.
設定したX-Mailerがスパムだと判定するには,SPAMMY_XMAILERを設定.まずは変更前を確認.
次のように変更.
これで常連のX-MailerもSPAMスコアの加点対象になるでしょう.
まず,ここ2ヶ月くらいに受け取った迷惑メールのX-Mailerを抽出.
$ grep X-Mailer INBOX |sort|uniq -c|sort -r > /var/tmp/xmailer.txt🆑
$ head -n 15 /var/tmp/xmailer.txt🆑
290 X-Mailer: Microsoft Outlook Express 6.00.2900.5512
73 X-Mailer: Supmailer 38.2.0
26 X-Mailer: Microsoft Windows Live Mail 16.4.3505.912
26 X-Mailer: Microsoft Outlook Express 6.00.2900.5931
19 X-Mailer: Microsoft Outlook 16.0
19 X-Mailer: Foxmail 7, 0, 1, 91[cn]
12 X-Mailer: Microsoft Outlook 15.0
10 X-Mailer: Microsoft Outlook 14.0
8 X-Mailer: Microsoft Windows Live Mail 15.4.3508.1109
8 X-Mailer: Microsoft Outlook Express 6.00.2900.2180
8 X-Mailer: Microsoft Outlook Express 6.00.2800.1106
6 X-Mailer: Supmailer 37.0.3
6 X-Mailer: Microsoft Office Outlook 11
5 X-Mailer: ClickM@iler
5 h=From:To:Subject:Date:MIME-Version:X-Mailer:Content-Type;
$
それと以前調べたSupmailerや,うちでは定番のFoxmailが出ていたり,2012年で開発終了しているWindows Live Mailも出てます.今回は,これらを全てスパム判定に変更.
X-Mailerの判定部分は,72_active.cfという定義ファイルに格納されている.
まずはメーラの定義.
9933 header __XM_MS_IN_GENERAL X-Mailer =~ /\bMSCRM\b|Microsoft (?:CDO|Outlook|Office Outlook)\b/
9934
9935 header __XM_OL_10_0_4115 X-Mailer =~ /^Microsoft Outlook, Build 10.0.4115$/
9936
9937 header __XM_OL_28001441 X-Mailer =~ /^Microsoft Outlook Express 6.00.2800.1441$/
9938
9939 header __XM_OL_28004682 X-Mailer =~ /^Microsoft Outlook Express 6.00.2800.4682$/
9940
9941 header __XM_OL_48072300 X-Mailer =~ /^Microsoft Outlook Express 5.50.4807.2300$/
9942
9943 header __XM_OL_4_72_2106_4 X-Mailer =~ /^Microsoft Outlook Express 4.72.2106.4$/
9944
9945 header __XM_OUTLOOK_EXPRESS X-Mailer =~ /^Microsoft Outlook Express \d/
9946
9947 header __XM_PHPMAILER_FORGED X-Mailer =~ /PHPMailer\s.*version\D+$/
9948
9949 header __XM_RANDOM X-Mailer =~ /q(?!(?:q|box|i\s)?mail|\d|[-\w]*=+;)[^u]/i
9950
9951 header __XM_SKYRI X-Mailer =~ /^SKYRiXgreen/
9945 header __XM_UJP001 X-Mailer =~ /^Microsoft Outlook Express 6.00.$/
9946 header __XM_UJP002 X-Mailer =~ /^Supmailer$/
9947 header __XM_UJP003 X-Mailer =~ /^Microsoft Windows Live Mail$/
9948 header __XM_UJP004 X-Mailer =~ /^Foxmail$/
設定したX-Mailerがスパムだと判定するには,SPAMMY_XMAILERを設定.まずは変更前を確認.
3960 ##{ SPAMMY_XMAILER
3961
3962 meta SPAMMY_XMAILER (__XM_OL_28001441||__XM_OL_48072300||__XM_OL_28004682||__XM_OL_10_0_4115||__XM_OL_4_72_2106_4)
3963 describe SPAMMY_XMAILER X-Mailer string is common in spam and not in ham
3964 ##} SPAMMY_XMAILER
3965
3962 meta SPAMMY_XMAILER (__XM_UJP001||__XM_UJP002||__XM_UJP003||__XM_UJP04||__XM_OL_28001441||__XM_OL_48072300|
|__XM_OL_28004682||__XM_OL_10_0_4115||__XM_OL_4_72_2106_4)
3963 describe SPAMMY_XMAILER X-Mailer string is common in spam and not in ham
3964 ##} SPAMMY_XMAILER