Page 1 of 1

Delete Spam

Posted: 04 Feb 2016 23:03
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

Re: Delete Spam

Posted: 05 Feb 2016 00:13
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.

Re: Delete Spam

Posted: 05 Feb 2016 09:15
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.

Re: Delete Spam

Posted: 05 Feb 2016 09:27
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

Re: Delete Spam

Posted: 07 Feb 2016 15:49
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.

Re: Delete Spam

Posted: 07 Feb 2016 17:33
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.