[Mailman-Users] Move away Spamassassin marked E-Mails per cron

Bernhard Reiter bernhard at intevation.de
Mon Aug 26 16:13:10 CEST 2002


Maybe somebody finds this little cronscript piece useful.
You need to add it to the crontab for the user running "mailman".

It is useful for people that use Spamassassin to mark all mail
in the header. If you put X-Spam-Status: Yes in your header to hold,
then these message will be placed on hold. This might place a burden
on you, if you get a lot of spam, because you have to discard them
all manually via the web-interface.

The script will periodically move the marked spam away 
in a directory ~mailman/data/marked_spam. Thus if you enter the
admindatabase you will see a message one like Message #901 lost.

Of course the ~mailman/data/marked_spam directory has to exist.

	Bernhard
ps.: Please copy me on relevant replies. I'm not subscribed to the list.
-------------- next part --------------
# crontab addition for the mailman user
# 	mv mail held for moderation and marked as spam into a spamfolder
#	note that the simple test using grep is not limited to header lines.
# 
@hourly grep --no-messages -l '^X-Spam-Status: Yes, hits=' $HOME/data/heldmsg-*-* | xargs --replace mv {} $HOME/data/marked_spam/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://mail.python.org/pipermail/mailman-users/attachments/20020826/2749f210/attachment.pgp 


More information about the Mailman-Users mailing list