A long time ago (19 Nov 2005) I sent a message to this list when I was having trouble setting up simcontrol to my liking. Specifically, I wanted to pass_thru spam, flagging it in the subject line if with a level of 5, and rejecting it outright with a level of 10.

Someone replied to me off-list, and in working with them I resolved the issue. I never replied to the list to let everyone know what the solution was. The trick is to add --enable-spam-hits when you configure simscan:

./configure --enable-user=clamav \
--enable-clamav=y \
--enable-spam=y \
--enable-spam-passthru=y \
--enable-per-domain=y \
--enable-ripmime \
--enable-attach=y \
--enable-received=y \
--enable-spam-hits

Then:
echo ":clam=yes,spam=yes,spam_hits=10,attach=.vbs:.lnk:.scr:.wsh:.hta:.pif" > /var/qmail/control/simcontrol

Note that it is not necessary to add spam_passthru to your simcontrol file, since it is overridden by spam_hits. Also note that if you compile with spam-hits but do not include it in your simcontrol, it won't take effect.

Adding SPAM to the subject line is handled in /etc/mail/spamassassin/local.cf :
echo "rewrite_header Subject ***SPAM***" >> /etc/mail/spamassassin/local.cf

This has worked really well for me. I've since tuned it down to spam_hits=8 and required_score 4.5 and I haven't gotten any false positives (or complaints for legitimate mail being bounced).

Thanks again Bill for the wonderful toaster. The only thing left to do is get maildrop working - not only for spam, but for intelligent mail->foldler maintenance at the server end.

Reply via email to