ブログ - (2号機) SpamAssasinにホワイトリスト設定
当サイトへの不正ログインモニタリングの通知メールが,SpamAssasinによってスパム扱いを受けるようになった.

スパムヘッダはこれ.
不正ログイン通知の検知本文情報によるのかなぁ.
設定ファイルは以下の通り.
どれだ?!
タイムスタンプを確認.
差分を確認.
macOS Serverの管理画面を確認.

サーバの設定を見ると,スコアが6.0なので一致.
ホワイトリストを設定するため,まずは現在設定をコピー.
ホワイトリストにしたいメアドやドメインを登録.
保存したら文法チェック.
これで様子見かな.

スパムヘッダはこれ.
X-Spam-Flag: YES
X-Spam-Score: 7.269
X-Spam-Level: *******
X-Spam-Status: Yes, score=7.269 tagged_above=2 required=6
tests=[BITCOIN_SPAM_07=3.499, BITCOIN_XPRIO=0.001,
FORGED_SPF_HELO=2.297, NORMAL_HTTP_TO_IP=0.001,
NUMERIC_HTTP_ADDR=0.001, PDS_BTC_ID=0.498, SPF_HELO_PASS=-0.001,
SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001]
autolearn=no autolearn_force=no
設定ファイルは以下の通り.
$ locate spamassassin|grep local.cf🆑
/Applications/Server.app/Contents/ServerRoot/private/etc/mail/spamassassin/local.cf.default
/Library/Server/Mail/Config/spamassassin/local.cf
/Library/Server/Mail/Config/spamassassin/local.cf.default
/Library/Server/Mail/Data/scanner/spamassassin/3.004001/updates_spamassassin_org/local.cf
$
タイムスタンプを確認.
$ ls -la /Library/Server/Mail/Config/spamassassin/local.cf🆑
-rw-r--r-- 1 root wheel 2725 5 16 2020 /Library/Server/Mail/Config/spamassassin/local.cf
$ ls -la /Library/Server/Mail/Config/spamassassin/local.cf.default
-rw-r--r-- 1 root wheel 2706 9 13 2018 /Library/Server/Mail/Config/spamassassin/local.cf.default
$
$ diff /Library/Server/Mail/Config/spamassassin/local.cf.default /Library/Server/Mail/Config/spamassassin/local.cf🆑
99a100,101
>
> required_hits 6.0
$

サーバの設定を見ると,スコアが6.0なので一致.
ホワイトリストを設定するため,まずは現在設定をコピー.
$ sudo cp -p /Library/Server/Mail/Config/spamassassin/local.cf /Library/Server/Mail/Config/spamassassin/local.cf.20210127🆑
$ ls -la /Library/Server/Mail/Config/spamassassin/local.cf*
-rw-r--r-- 1 root wheel 2725 5 16 2020 /Library/Server/Mail/Config/spamassassin/local.cf
-rw-r--r-- 1 root wheel 2725 5 16 2020 /Library/Server/Mail/Config/spamassassin/local.cf.20210127🈁
-rw-r--r-- 1 root wheel 2706 9 13 2018 /Library/Server/Mail/Config/spamassassin/local.cf.default
$
$ tail /Library/Server/Mail/Config/spamassassin/local.cf
# shortcircuit BAYES_00 ham
endif # Mail::SpamAssassin::Plugin::Shortcircuit
required_hits 6.0
whitelist_from *@xxxxx.or.jp🈁
whitelist_from *@yyy.jp🈁
whitelist_from *@mail.xxx.jp🈁
$
sh-3.2# spamassassin --lint🆑
sh-3.2#
これで様子見かな.