no mail from cron

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
jamma
Posts: 5
Joined: Sun Jan 13, 2019 10:03 am

no mail from cron

Postby jamma » Mon Jan 21, 2019 7:43 pm

Hi there,

I've set up a Zimbra server for a local initiative. We're quite pleased with it.

I've also set up a backup script and noticed that I'm not getting any e-mail from cron. The system runs on "CentOS Linux release 7.6.1810 (Core)", Zimbra version is "8.8.10_GA_3716.FOSS". Crond is provided by "cronie-1.4.11-20.el7_6.x86_64".

On another server I had to install mailx so cron could send me mail, but that did not help here. I'm not getting any mail from cron. Example crontab (/etc/cron.d/backup-system):

Code: Select all

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin;/opt/zimbra/common/sbin/;/opt/zimbra/common/bin
MAILTO=admin@buerger-meissen.de

12 3 * * * root /root/backup-system.sh
28 20 21 1 * root echo "test mail from cron"

The cronjobs are executed just fine: (excerpt from /var/log/cron)
Jan 21 20:28:01 bi crond[3395]: (*system*) RELOAD (/etc/cron.d/backup-system)
Jan 21 20:28:02 bi CROND[21593]: (zimbra) CMD (/opt/zimbra/libexec/zmstatuslog > /dev/null 2>&1)
Jan 21 20:28:02 bi CROND[21594]: (root) CMD (echo "test mail from cron")
Jan 21 20:28:02 bi CROND[21589]: (root) CMDOUT (test mail from cron)
Jan 21 20:30:01 bi CROND[23019]: (zimbra) CMD (/opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1)

But no mail from cron anywhere. No error either (not in cron's log, not in /var/log/maillog).

I also tried symlinking /opt/zimbra/common/sbin/sendmail to /usr/sbin - no effect.

Any hints, ideas and pointers are welcome!


Jordack
Posts: 28
Joined: Sat Sep 13, 2014 2:15 am

Re: no mail from cron

Postby Jordack » Wed Jan 23, 2019 11:00 pm

I had a similar issue. Don’t remember the actual fix, sorry for not being more useful. If I recall; the mail was stuck in the queue.

The postfix log gave me more insight on why it was getting denied.
jamma
Posts: 5
Joined: Sun Jan 13, 2019 10:03 am

Re: no mail from cron

Postby jamma » Wed Feb 13, 2019 8:54 pm

After lots of head-scratching I figured it out: cronie needs to find a /usr/sbin/sendmail on startup and doesn't provide any helpful error messages whatsoever.

Aftr all, this worked:
ln-s /opt/zimbra/common/sbin/sendmail /usr/sbin
systemctrl restart crond
Jordack
Posts: 28
Joined: Sat Sep 13, 2014 2:15 am

Re: no mail from cron

Postby Jordack » Sat Feb 16, 2019 3:33 pm

That’s for the update and the fix.

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot] and 8 guests