Not receiving certain admin e-mails

(David P) #21

I don’t know how the e-mails were originally setup to send, it always worked as part of the original install.

(David P) #22

I’m wondering if there is a config I could restore from backup or should I just do a full on backup and reload?

(Giacomo Sanchietti) #23

There is no real config on that: cron generates an email for any output on stderr and stdout.

(David P) #24

Ok, so now I’m curious what happened that I am not getting those emails any more.

(David P) #25

Is it possible to repair or reinstall cron to see if the e-mails start generating?

(David P) #26

Actually /etc/crontab is empty as far as jobs go. But that hasn’t changed since June 9th 2014

(Markus Neuberger) #27

You can disable cron mailing in /etc/sysconfig/crond, see this link.
To compare, my /etc/sysconfig/crond:

# Settings for the CRON daemon.
# CRONDARGS= :  any extra command-line startup arguments for crond

I don’t think it’s about the cron package but you may try:

yum reinstall cronie

(David P) #28

I will check that thanks.

(David P) #29

So, I checked that config and CRONDARGS is empty I’m going to try and reinstall cronie.

(David P) #30

I reinstalled cronie and still not getting those e-mails. Any other suggestions?

(Markus Neuberger) #31

Are the cronjobs being processed? Do you see current ones in /var/log/cron?

Found a cron troubleshooting guide:

(David P) #33

I know the cron jobs are processing, because backups are happening and a couple. Below is the most recent cron entries.

Jan 30 17:47:01 sektor CROND[26020]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)
Jan 30 17:48:01 sektor CROND[26037]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)
Jan 30 17:49:01 sektor CROND[26087]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)
Jan 30 17:50:01 sektor CROND[26169]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)

(Markus Neuberger) #34

Your log example shows a cronjob where mailing is disabled, see here.
Please post a cron job from the log where you expect to get a mail but don’t get one.

As regards the backup mail, let’s check the config:

config show backup-data

For missing “Yum: Updates installed on” mails please post the yum-cron config:

config show yum-cron

(David P) #35

here is backup-data



Here is an entry that says e-mail

Dec 31 02:00:01 sektor CROND[7242]: (root) CMD (/sbin/e-smith/backup-data-wrapp$

(David P) #36

Any other thoughts on what might have happened? I’m wondering if it would be worth my time to do a backup and reload of the whole os?

(Marc) #37

a possible test could be:

# dummy cronjob
echo '* * * * * root /usr/bin/echo "tuxy"' >> /etc/crontab

# (optional) monitor cron jobs, cancel once cronjob executed
tail -f /var/log/cron

# after cronjob ran (a minute), search for e-mail
grep -r tuxy /var/lib/nethserver/vmail/root/Maildir/ /var/spool/mail/root

After the test, remove the dummy cronjob from crontab.

(Federico Ballarini) #38

I have tested now on my server applying my settings like your configuration and email are delivered correctly.
Could you check if email are in your queue or not?

And in your /var/log/maillog you should see something like this (my emails to root@ are stored in admin@ and it is the only difference)

Feb 11 00:44:58 mail postfix/pickup[29588]: 221372011925F: uid=0 from=<root>

Feb 11 00:44:58 mail postfix/cleanup[1326]: 221372011925F: message-id=<>

Feb 11 00:44:58 mail opendkim[4336]: 221372011925F: no signing table match for ''

Feb 11 00:44:58 mail postfix/qmgr[4989]: 221372011925F: from=<>, size=1481, nrcpt=1 (queue active)

Feb 11 00:44:58 mail postfix/cleanup[1326]: 33B4B2015D5BC: message-id=<>

Feb 11 00:44:58 mail postfix/local[1330]: 221372011925F: to=<>, orig_to=<root@localhost>, relay=local, delay=0.25, delays=0.21/0.01/0/0.04, dsn=2.0.0, status=sent (forwarded as 33B4B2015D5BC)

Feb 11 00:44:58 mail postfix/qmgr[4989]: 33B4B2015D5BC: from=<>, size=1628, nrcpt=1 (queue active)

Feb 11 00:44:58 mail postfix/qmgr[4989]: 221372011925F: removed

Feb 11 00:44:58 mail dovecot: lmtp(1332): Connect from local

Feb 11 00:44:58 mail dovecot: lmtp( iCF0D3q3YFw0BQAAD+y26w: sieve: msgid=<>: stored mail into mailbox 'INBOX'

Feb 11 00:44:58 mail postfix/lmtp[1331]: 33B4B2015D5BC: to=<>, orig_to=<root@localhost>,[/var/run/dovecot/lmtp], delay=0.15, delays=0.04/0.01/0.01/0.1, dsn=2.0.0, status=sent (250 2.0.0 <> iCF0D3q3YFw0BQAAD+y26w Saved)

Feb 11 00:44:58 mail dovecot: lmtp(1332): Disconnect from local: Successful quit

Feb 11 00:44:58 mail postfix/qmgr[4989]: 33B4B2015D5BC: removed

(David P) #39

I have checked that, but I can’t find anything unusual, nothing stuck in the queue.

I will double check a little later.

(David P) #40

I will try that.

(David P) #41

Ok here is what I am seeing

Feb 11 13:19:01 sektor crond[18247]: (system) RELOAD (/etc/crontab)
Feb 11 13:19:01 sektor CROND[20529]: (root) CMD (/usr/bin/echo “tuxy”)
Feb 11 13:19:01 sektor CROND[20528]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)
Feb 11 13:20:01 sektor CROND[20563]: (root) CMD (/usr/bin/echo “tuxy”)
Feb 11 13:20:01 sektor CROND[20565]: (sogo) CMD (/usr/sbin/sogo-ealarms-notify > /dev/null 2>&1)

[root@sektor ~]# grep -r tuxy /var/lib/nethserver/vmail/root/Maildir /var/spool/mail/root
/var/lib/nethserver/vmail/root/Maildir/cur/,S=971,W=997:2,:Subject: Cron root@sektor /usr/bin/echo “tuxy”
/var/lib/nethserver/vmail/root/Maildir/cur/,S=971,W=997:2,:Subject: Cron root@sektor /usr/bin/echo “tuxy”
/var/lib/nethserver/vmail/root/Maildir/cur/,S=971,W=997:2,:Subject: Cron root@sektor /usr/bin/echo “tuxy”
/var/lib/nethserver/vmail/root/Maildir/new/,S=971,W=997:Subject: Cron root@sektor /usr/bin/echo “tuxy”
Binary file /var/lib/nethserver/vmail/root/Maildir/dovecot.index.cache matches
grep: /var/spool/mail/root: No such file or directory

And I am seeing those e-mails, so what happened with the rest of my cron jobs?