Page 1 of 1

Quarantine Not Adhering To 30 Day Limit?

Posted: 14 Jul 2016 20:39
by EFAUser1
My /var got into critical levels of disk free today (<5%). Found that /var/spool/MailScanner/quarantine was not adhering to the 30 day cleanup rule. Any common reasons why it might get off track?

Re: Quarantine Not Adhering To 30 Day Limit?

Posted: 15 Jul 2016 16:48
by shawniverson
There is a cron job that should be running from a daily cron...

Code: Select all

/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_maint.php --clean
If you run this manually do you see any errors?

Also,

Do you have this defined in /var/www/html/mailscanner/conf.php

Code: Select all

define('QUARANTINE_DAYS_TO_KEEP', 30);

Re: Quarantine Not Adhering To 30 Day Limit?

Posted: 18 Jul 2016 14:35
by EFAUser1
Double checked days to keep in conf.php and apparently I had been even more aggressive than I thought and changed it to 15.

Went to the location of that cron job and just executed it (no clean). Checked the quarantine folder and no cleanup (as expected at this point). In WinSCP, I added --clean to my execute command "./!" (so ".!/" --clean) and then tried running that. Seemed like it was running for a few seconds, then I received a message from WinSCP that the remote host was not communicating. I exited, then relaunched WinSCP and checked the quarantine folder...success. Unfortunately other than the "host is not communicating" I didn't seem to get much in terms of errors. Is there supposed to be an output file somewhere?

Thanks so much for your help and your work with EFA!

Re: Quarantine Not Adhering To 30 Day Limit?

Posted: 19 Jul 2016 15:02
by EFAUser1
Did some digging. Here's what is in /etc/cron.daily/EFA-Daily-cron

/usr/local/sbin/EFA-SA-Update -cron >> /var/log/EFA/EFA-SA-Update.log 2>&1
/usr/local/sbin/EFA-MS-Update -cron >> /var/log/EFA/EFA-MS-Update.log 2>&1

Don't see anything about a maintenance job in there, just checking for updates.

Edit: /etc/cron.daily/mailwatch here are its contents:
#!/bin/bash
/usr/local/bin/mailwatch/tools/Cron_jobs/db_clean.php >> /dev/null 2>&1
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_maint.php --clean >> /dev/null 2>&1
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php >> /dev/null 2>&1