Auto-deletion of SPAMs
Posted: Tue Dec 21, 2004 3:45 pm
Well, I'm back
Continuing a discussion from the old forum sort of... I've went from the PSA-supplied anti-spam stuff to qmail-scanner and now back. I'm just curious if anyone has any words of wisdom or pointers. Qmail-scanner bogged my server down too much because it scanned all emails for SPAMminess whether it was addressed to a valid account or not. I've disabled it and went back to the more-or-less stock PSA way of doing things. I have though replaced their .qmail files in all my users mail dirs with ones of my own:
.qmail:
| true
| /usr/local/psa/bin/psa-spamc -f -u user@domain.com -U /tmp/spamd_full.sock | procmail -p -m delete-high.rc
delete-high.rc:
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*
/dev/null
:0
| /usr/bin/maildir ./Maildir/
My SPAM threshhold is set to 5 so anything from 5 to 8 gets to me tagged as SPAM and anything 9 or higher is silently dropped into the bit bucket and is gone...
My problem now though is kind of like it was with qmail-scanner, overloaded server. I have a bunch of spamassassin rules which are very intense but very good at catching difficult SPAMs. I could trim those down and it could keep up with the onslaught but lots more would get through. I want my cake and eat it too! I want the rules to be intense and very tight and to not bog the server down too much.
So, I was wondering. Previously I devised a way to watch the logs from qmail-scanner and iptables reject connections from heavy spammers. Does anyone have any suggestions of a means of doing the same thing with this setup? Perhaps from procmail if the SPAM score is >15 or something like that? I know how to do simple stuff with procmail and that's about it... It's very powerful though so I'm sure it could do it. Pull out the IP of the connecting SMTP server and pass it as a parameter to iptables. Any ideas? Thoughts on other ways to accomplish this? Post on a procmail forum?
Thanks!
PS. Scott... I helped a friend setup PSA 7.04 on a RedHat Enterprise 3 AS server the other day. I had to hardcode yum.conf to claim it was ES to get packages from you. WS=Workstation, AS=Application Server, ES=Enterprise Server. All the same thing but marketed differently with different support and with different extra packages included. You might want to symlink WS and AS to the ES directory.

.qmail:
| true
| /usr/local/psa/bin/psa-spamc -f -u user@domain.com -U /tmp/spamd_full.sock | procmail -p -m delete-high.rc
delete-high.rc:
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*
/dev/null
:0
| /usr/bin/maildir ./Maildir/
My SPAM threshhold is set to 5 so anything from 5 to 8 gets to me tagged as SPAM and anything 9 or higher is silently dropped into the bit bucket and is gone...
My problem now though is kind of like it was with qmail-scanner, overloaded server. I have a bunch of spamassassin rules which are very intense but very good at catching difficult SPAMs. I could trim those down and it could keep up with the onslaught but lots more would get through. I want my cake and eat it too! I want the rules to be intense and very tight and to not bog the server down too much.
So, I was wondering. Previously I devised a way to watch the logs from qmail-scanner and iptables reject connections from heavy spammers. Does anyone have any suggestions of a means of doing the same thing with this setup? Perhaps from procmail if the SPAM score is >15 or something like that? I know how to do simple stuff with procmail and that's about it... It's very powerful though so I'm sure it could do it. Pull out the IP of the connecting SMTP server and pass it as a parameter to iptables. Any ideas? Thoughts on other ways to accomplish this? Post on a procmail forum?
Thanks!
PS. Scott... I helped a friend setup PSA 7.04 on a RedHat Enterprise 3 AS server the other day. I had to hardcode yum.conf to claim it was ES to get packages from you. WS=Workstation, AS=Application Server, ES=Enterprise Server. All the same thing but marketed differently with different support and with different extra packages included. You might want to symlink WS and AS to the ES directory.