DebianのvolatileにSpamAssassin3.2.3が入ってきた。最近のSpamAssassinにはsa-update,sa-compileというものがついているようなのでちょっと調べてみた。
man sa-update
NAME
sa-update - automate SpamAssassin rule updates
man sa-copmile
NAME
sa-compile - compile SpamAssassin ruleset into native code
sa-updateでスパムのruleファイルを自動更新させることが出来、それを事前にsa-compileを実行する事によってre2cでコンパイル、ネイティブコードにしておきパターンマッチングを高速化するものらしい。
sa-update
sa-compile
ruleファイルをアップデート、コンパイルしておく。
man-sacompile
Note that running this, and creating a compiled ruleset, will have no
effect on SpamAssassin scanning speeds unless you also edit your
"v320.pre" file and ensure this line is uncommented:
loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
とあるので/etc/spamassassin/v320.preを編集して有効にする。
/etc/init.d amavis restart
しておく。
これで一応コンパイルされた物で実行されているはず。
自動更新については、SpamAssassinのREADME.Debian.gzによると
[...]
Init scripts are provided with this package in
/etc/init.d/spamassassin. To change the command line options, please
edit /etc/default/spamassassin.
[...]
/etc/default/spamassassinのCRONの設定で、/etc/cron.daily/spamassassinの毎日ruleのアップデートとspamd再起動が実行されるようになっているようです。
うちではspamdを使わずamavisd-newの再起動が必要なので、このCRONは無効にし、
/usr/bin/sa-update && /usr/bin/sa-compile && /etc/init.d/amavis restart
がcronで実行されるようにしておく。
メールの量が少ないので効果のほどはよくわかりません。(^^;