Last Update: "2008/02/29 09:30:31 makoto"

spamassassin

SpamAssassinにスパムを学習させる。IMAPとMaildirを活用 (2004/11)
http://www.13hz.jp/2004/11/spamassassin.html
スパムアサシン(spamassassin)の設定メモ
http://staff.miyakyo-u.ac.jp/~m-taira/Lecture/spamassassin.html
spam assassin は次のようにして用意します。これを MTA (sendmail) から呼べるようにするには spamass-milter を使うと便利です。

pkg_add

===========================================================================
Installing files needed by spamassassin-3.1.0nb2:

        /usr/pkg/etc/spamassassin/init.pre
            [/usr/pkg/share/examples/spamassassin/init.pre]

        /usr/pkg/etc/spamassassin/local.cf
            [/usr/pkg/share/examples/spamassassin/local.cf]

        /usr/pkg/etc/spamassassin/user_prefs.template
            [/usr/pkg/share/spamassassin/user_prefs.template]

        /usr/pkg/etc/spamassassin/v310.pre
            [/usr/pkg/share/examples/spamassassin/v310.pre]

===========================================================================
===========================================================================
The following files should be created for spamassassin-3.1.0nb2:

        /etc/rc.d/spamd (m=0755)
            [/usr/pkg/share/examples/rc.d/spamd]

===========================================================================
===> Please note the following:

===========================================================================
$NetBSD: MESSAGE,v 1.10 2005/11/13 22:48:32 heinz Exp $

If you upgrade from an earlier version *PLEASE* take a look at the file
UPGRADE in

        /usr/pkg/share/doc/spamassassin/

Some configuration options were changed and some features are now provided
by plugins (they may not be enabled after installation).

For more information see 'perldoc Mail::SpamAssassin::Conf' and the man
pages for 'spamassassin', 'spamd'/'spamc', 'sa-learn' and 'sa-update'.
Please check that your existing mail configuration still works.
===========================================================================
sudo  cp -p /usr/pkg/share/examples/rc.d/spamd  /etc/rc.d/spamd
sudo env spamd=YES /etc/rc.d/spamd start

sa-learn

ttyp2:root@st4200 11:51:16/061218(...user/username)# sa-learn --spam Trash/
Learned tokens from 211 message(s) (213 message(s) examined)
ttyp2:root@st4200 12:09:41/061218(...user/username)# 

local.cf

share/examples/spamassassin/local.cf	記述例
etc/spamassassin/local.cf		実運用設定
有効にするには spamd を再起動
sudo /etc/rc.d/spamd restart