spam actions

Dhawal Doshy dhawal at NETMAGICSOLUTIONS.COM
Wed May 25 21:20:42 IST 2005


    [ The following text is in the "utf-8" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Kevin Miller writes:

> I've always forwarded my spam to an account on my exchange server
> (alphonse_spamdog) so I can forward false positives, and such.  But now I've
> installed MailWatch, so have the quarantine dir on my linux box which was
> previously unused.  I delete anything older than 2 weeks on Exchange but
> have to do that manually.  On the linux gateway is it safe to just run a
> cronjob to get rid of old messages?  What will that do to MailWatch/mysql?
> Will it care?
>
> Hope this isn't too off topic...
>
> ...Kevin

Its quite safe to run a cron for clean up, mailscanner includes it own cron
script to do that. As for mailwatch, you won't be able to view the message
content of quarantined mails that don't exist anymore (though the rest being
in the mysql db will work as usual).

You'll need the following 2 actions.

1. MailScanner has it's own cron for quarantine deletion, change
$days_to_keep to 14.
Check /etc/cron.daily/clean.quarantine OR
/opt/Mailscanner/bin/cron/clean.quarantine.cron

2. Run another script to trim the mailwatch database
minute hour * * * /path/to/mysql -u mailwatch_user
 --password=mailwatch_password < /path/to/mailwatch_mysql_mailtenance.sql

Content of /path/to/mailwatch_mysql_mailtenance.sql:
delete from maillog where timestamp < date_sub(curdate(), interval 14 day);
optimize table maillog;

Hope that helps,
 - dhawal

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list