1 (edited by schnappi 2016-07-11 01:01:20)

Topic: Email for cleanup_amavisd_db.py

Hi,

On an older installation of iRedMail get an email every day regarding the cron script cleanup_amavisd_db.py. On a new installation do not get this email even though cleanup_amavisd_db.py is a valid cron job.

Maybe this is more of a distribution question, not sure, but why does the older server send an email every day for cleanup_amavisd_db.py when the new install does not?

Thought that only get emails for cron job scripts when there is an error.

Any help appreciated.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Email for cleanup_amavisd_db.py

You can check root user's cron job, it has a output redirection like this:

... .../cleanup_amavisd_db.py >/dev/null

This will redirect standard output to /dev/null, but if there's error message, it will be mailed to root user.

If you want to receive the daily log, just remove '>/dev/null' in this cron job.

3 (edited by schnappi 2016-07-16 06:46:42)

Re: Email for cleanup_amavisd_db.py

Get an email like this every day at root address. Do not know where the error is. Any suggestions?

* [2016-07-15 02:01:01] Backend: mysql
* [2016-07-15 02:01:01] SQL server: 127.0.0.1:3306
* [2016-07-15 02:01:01] Delete quarantined mails which older than 7 days
* [2016-07-15 02:01:01] Delete incoming/outgoing emails which older than 3 days
* [2016-07-15 02:01:01]     [-] Deleting 100 records
* [2016-07-15 02:01:01]     [-] Deleting 170 records
* [2016-07-15 02:01:01] Delete unreferenced records from table `msgrcpt`.
* [2016-07-15 02:01:01] Delete unreferenced records from table `quarantine`.
* [2016-07-15 02:01:01] Delete unreferenced records from table `maddr`.
* [2016-07-15 02:01:01]     [-] Deleting 89 records from table `maddr`
* [2016-07-15 02:01:01] Delete unreferenced records from table `mailaddr`.
* [2016-07-15 02:01:01]
* [2016-07-15 02:01:01] Remained records:
* [2016-07-15 02:01:01]
* [2016-07-15 02:01:01]       `msgs`: 657   
* [2016-07-15 02:01:01] `quarantine`:       
* [2016-07-15 02:01:01]      `maddr`: 383   
* [2016-07-15 02:01:01]   `mailaddr`:       
* [2016-07-15 02:01:02] Log cleanup status.

Cron entry:
1   2   *   *   *   python /usr/share/apache2/iredadmin/tools/cleanup_amavisd_db.py >/dev/null

4

Re: Email for cleanup_amavisd_db.py

No error at all, it's just normal info.

5 (edited by schnappi 2016-07-20 01:41:06)

Re: Email for cleanup_amavisd_db.py

One server sends an email while another does not...even though both have the same cron entry.

Server with this cron entry sends an email:
1   2   *   *   *   python /usr/share/apache2/iredadmin/tools/cleanup_amavisd_db.py >/dev/null

While this server does not:
1   2   *   *   *   python /opt/www/iredadmin/tools/cleanup_amavisd_db.py >/dev/null

6

Re: Email for cleanup_amavisd_db.py

*) Run them manually first, any difference on terminal output?
*) Are you running the same iRedAdmin(-Pro) release?

7

Re: Email for cleanup_amavisd_db.py

I have this same issue once I upgraded from 0.9.4 to 0.9.5-1.

I've run the job manually and don't see any errors.  I do see the job running in the cron logs.

8

Re: Email for cleanup_amavisd_db.py

Removing the "> /dev/null" worked for me.