Add SpamAssassin filter to mail pipeline
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Confirmed
|
Low
|
Unassigned |
Bug Description
This filter adds support for discarding or holding spam
sent to the mailing list. It contacts a spamd daemon
(from SpamAssassin -- http://
score the message.
If the score is above a certain threshold (default 10),
the message is discarded and an entry is written to the
vette log.
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/
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_
SPAMASSASSIN_
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.
[http://
There is a fairly easy optimisation for this filter that I
missed when writing it. It calls str() on the message
object twice. It would be quicker to call str() on the
message once.