Page 1 of 1

Increase frequency of quarantine reports

Posted: 08 Dec 2016 15:53
by cphillips
All,

At present, my users are receiving their quarantine reports at around 4am everyday. Is there a way to add an additional report that is sent out around 2pm so that they can release mails that may be being held back from the morning?

Re: Increase frequency of quarantine reports

Posted: 11 Dec 2016 21:57
by cphillips
Anyone able to assist with this? I've taken a look in Webmin and can't locate the job but can see the job in cron.daily:

Code: Select all

[root@mail cron.daily]# cat mailwatch
#!/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
However, I'm not able to determine how to change the time at which it runs! (it's currently running at around 03:55 every day)

Any pointers?

Re: Increase frequency of quarantine reports

Posted: 12 Dec 2016 06:27
by shenglinn
In my case, I wish the quarantine report to be sent every 4 hours,
I use crontab
---------------------
2 1,5,9,13,17,21 * * * /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php >> /dev/null 2>&1
--------------------
And of course, every content of the quarantine report shows only this 4 hours,
Modify /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php

change " a.date >= DATE_SUB(CURRENT_DATE(), INTERVAL " . QUARANTINE_REPORT_DAYS . " DAY)"; "
to " a.timestamp >= DATE_SUB(NOW(), INTERVAL 4 HOUR)"; "

remove this line "/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php >> /dev/null 2>&1" in /etc/cron.daily/mailwatch,
For your reference

Re: Increase frequency of quarantine reports

Posted: 16 Dec 2016 11:28
by cphillips
shenglinn wrote:In my case, I wish the quarantine report to be sent every 4 hours,
I use crontab
---------------------
2 1,5,9,13,17,21 * * * /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php >> /dev/null 2>&1
--------------------
And of course, every content of the quarantine report shows only this 4 hours,
Modify /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php

change " a.date >= DATE_SUB(CURRENT_DATE(), INTERVAL " . QUARANTINE_REPORT_DAYS . " DAY)"; "
to " a.timestamp >= DATE_SUB(NOW(), INTERVAL 4 HOUR)"; "

remove this line "/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php >> /dev/null 2>&1" in /etc/cron.daily/mailwatch,
For your reference
That worked well, thank you. I've changed my reports to only be sent once a day at 9am.

I couldn't work out how to change the text in the report that says:

Code: Select all

In the last 7 day(s) you have received 1 e-mails that have been quarantined and are listed below. All messages in the quarantine are automatically deleted 60 days after the date that they were received.
I would like it to say 1 day but couldn't work out how to do that (without doing it manually!).