Delete Spam

General eFa discussion
Post Reply
darrelt
Posts: 5
Joined: 04 Feb 2016 09:11

Delete Spam

Post by darrelt »

Hi

Sorry for the very newbie question, but can anyone tell me how to either delete quarantined spam manually, or configure high spam to be deleted automatically. I saw an article about mailwatch that mentions /mailscanner/etc/rules/spamhigh.action.rules, but I can't see this file anywhere.

We seem to have been targeted by a denial of service attack, as we have had massive amounts of spam that brought down our mysql database by filling up the partition that holds the /var directory / mount point? I have increased the partition size and repaired the maillog database, but want to stop this filling up again.

Thanks
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Delete Spam

Post by shawniverson »

Deleting just high spam would require some SQL wizardry, but the simple fix is to simply reduce the retention days in MailWatch and let it purge emails.

Check settings in /var/www/html/mailscanner/conf.php for options.
darrelt
Posts: 5
Joined: 04 Feb 2016 09:11

Re: Delete Spam

Post by darrelt »

Thank you for the quick response. I have changed this line from 30 to 7:

define('QUARANTINE_DAYS_TO_KEEP', 7);

Your help is much appreciated.
darrelt
Posts: 5
Joined: 04 Feb 2016 09:11

Re: Delete Spam

Post by darrelt »

As a thought for the short term, your response about high spam and SQL wizardry, suggests that if as a one off measure, I want to delete all current spam, I could? How would I do this?

Thanks
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Delete Spam

Post by shawniverson »

1) You would need to do a SQL query on the maillog table for all spam
2) Delete all copies of email from the query in the filesystem
3) Use the results of the query to drop entries for spam in the maillog table

Of course, you do so at your own risk.
darrelt
Posts: 5
Joined: 04 Feb 2016 09:11

Re: Delete Spam

Post by darrelt »

Thanks again.

I have manged to get to where I want to be by reducing the relevant values and running quarantine_maint and db_clean.
Post Reply