Help - Search - Members - Calendar
Full Version: Deleting SPAM When it Arrives Script
The Planet Forums > Control Panels > Plesk > Plesk HOWTOs
KrazyBob
My Plesk 8.3 server is getting spammed to death and I want to take the step of forcing detected SPAM to be deleted. I know that some customers won't like this, but the server can only proess and write to disk so many messages an hour.

At any rate, I realize that I can go to each email address in Plesk 8.3 and check the box for "Delete spam mail when it comes to mailbox"

But how can I automate this or do it directly in mysql?

Also, in the process of tracking down spam we have determined that if the server was imported from Ensim 4.x an alias will be created root@"domainname" where Ensim had previously created a default user. SPAM being sent to root@"domainname" will appear as a process:

/var/qmail/bin/qmail-local.moved -- popuser /var/qmail/mailnames/"domainname"

Only by checking each email address for the domain have I been able to locate which email address has the alias added. Is there a file or mysql table that this is written to?
Squire
Bob you may want to check into some RPM's in the ART repo. I use a combination of clamd, razor-agents, dcc, pyzor, qmail-scanner, spam assassin and SA_DELETE from the ART repos and it seems to work very well. I leave psa-spamassassin installed so that users can set their own spam levels on the server via the control panel, but even if they don't set a max level (most don't) the server will still auto-delete any mail that comes in over the level I set in the qmail-scanner.ini file.

I don't get very aggressive with that, with the server default level being set to 7 and SA_DELETE being set to an additional 7, but even with that a ton of spam gets zapped automatically without bothering anyone because of the various checks being run.

The only downside I've seen is a slight pause when legitimate users are sending out mail through the server, since I've got it set up to check both incoming and outgoing via QS_SPAMASSASSIN in the smtp_psa and smtps_psa files. IMHO this a small price to pay for the amount of spam that's being headed off. And I've had nobody complain about it.

There are a few threads over on the ART forums about this combo. One that you'll need on an 8.3 server is this one since apparently Plesk changed the permissions on a file in 8.3. Root around a bit in that section of the forum and you'll get it all.
KrazyBob
Thank you very much fo0r your reply. I turned on DNSBL last night in Plesk and that seems to have helped. In the past, though, this backfired and we found our own servers blacklisted. I'll check out ART.

QUOTE (Squire @ Feb 7 2008, 09:58 AM) *
Bob you may want to check into some RPM's in the ART repo. I use a combination of clamd, razor-agents, dcc, pyzor, qmail-scanner, spam assassin and SA_DELETE from the ART repos and it seems to work very well. I leave psa-spamassassin installed so that users can set their own spam levels on the server via the control panel, but even if they don't set a max level (most don't) the server will still auto-delete any mail that comes in over the level I set in the qmail-scanner.ini file.

I don't get very aggressive with that, with the server default level being set to 7 and SA_DELETE being set to an additional 7, but even with that a ton of spam gets zapped automatically without bothering anyone because of the various checks being run.

The only downside I've seen is a slight pause when legitimate users are sending out mail through the server, since I've got it set up to check both incoming and outgoing via QS_SPAMASSASSIN in the smtp_psa and smtps_psa files. IMHO this a small price to pay for the amount of spam that's being headed off. And I've had nobody complain about it.

There are a few threads over on the ART forums about this combo. One that you'll need on an 8.3 server is this one since apparently Plesk changed the permissions on a file in 8.3. Root around a bit in that section of the forum and you'll get it all.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.