This filter adds support for discarding or holding spam
sent to the mailing list. It contacts a spamd daemon
(from SpamAssassin -- http://spamassassin.taint.org\) to
score the message.
If the score is above a certain threshold (default 10),
the message is discarded and an entry is written to the
If the score is above another lower threshold (default
5), the message is held for moderation.
The SpamAssassin.py file should be installed in
Mailman/Handlers/. The LIST_PIPELINE variable in
Mailman/Handlers/HandlerAPI.py should be modified to
include a 'SpamAssassin' item (I put it just after the
existing 'SpamDetect' item).
To change the defaults, the following can be added to
the mm_cfg.py file:
SPAMASSASSIN_HOST = 'host:port' # how to contact SA
SPAMASSASSIN_DISCARD_SCORE = 10
SPAMASSASSIN_HOLD_SCORE = 5
If you don't want to discard messages, then
DISCARD_SCORE can be set to something very high (1000
should do it).
It looks the MM2.1 filter APIs have changed a bit, so
this filter will need some modifications to work with
that version. When I get round to upgrading, I might
look into updating it.