Hi,
I have a cronjob that executes a script that has some echo statements in it and the commands in it also generate output (it copies files, reloads services, etc...).
Recently, cron stopped sending its output by e-mail. I restarted cron, without success. Any ideas where I shoud start to debug this?
Regards,
Ugo
On 7/24/06, Ugo Bellavance ugob@camo-route.com wrote:
Hi,
I have a cronjob that executes a script that has some echo statements
in it and the commands in it also generate output (it copies files, reloads services, etc...).
Recently, cron stopped sending its output by e-mail. I restarted cron,
without success. Any ideas where I shoud start to debug this?
While it shouldn't happen, it's possible that the behavior changed during an update. Do you have a MAILTO line in your crontab? If so, is it defined, or an empty set?
Jim Perrin wrote:
On 7/24/06, Ugo Bellavance ugob@camo-route.com wrote:
Hi,
I have a cronjob that executes a script that has some echo
statements in it and the commands in it also generate output (it copies files, reloads services, etc...).
Recently, cron stopped sending its output by e-mail. I
restarted cron, without success. Any ideas where I shoud start to debug this?
While it shouldn't happen, it's possible that the behavior changed during an update. Do you have a MAILTO line in your crontab? If so, is it defined, or an empty set?
Yes, I had a mailto line. I removed it and I'm testing right now.
Ugo Bellavance wrote:
Jim Perrin wrote:
On 7/24/06, Ugo Bellavance ugob@camo-route.com wrote:
Hi,
I have a cronjob that executes a script that has some echo
statements in it and the commands in it also generate output (it copies files, reloads services, etc...).
Recently, cron stopped sending its output by e-mail. I
restarted cron, without success. Any ideas where I shoud start to debug this?
While it shouldn't happen, it's possible that the behavior changed during an update. Do you have a MAILTO line in your crontab? If so, is it defined, or an empty set?
Yes, I had a mailto line. I removed it and I'm testing right now.
It didn't change anything, and the last update to vixie-cron was in april.
Is cron supposed to send both standard input and output?
Have you checked your /var/log/maillog and /var/log/cron? This will let you figure out if cron is actually not sending mails anymore, or if it is and they're simply not getting past sendmail. It's possible that your ISP has a new policy that is rejecting your mails due to blacklisting or DNS issues. That's just a guess though, your logs will tell you more.
Cian
Cian Cullinan wrote:
Have you checked your /var/log/maillog and /var/log/cron? This will let you figure out if cron is actually not sending mails anymore, or if it is and they're simply not getting past sendmail. It's possible that your ISP has a new policy that is rejecting your mails due to blacklisting or DNS issues. That's just a guess though, your logs will tell you more.
I found something.
The script does a -HUP on sendmail, so here is what I see in maillog is:
Jul 26 10:00:02 server sendmail[19016]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[19018]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sm-msp-queue[19032]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[25475]: k6QE01aW025475: from=root, size=0, class=0, nrcpts=0, relay=root@localhost Jul 26 10:00:02 server sendmail[25579]: starting daemon (8.13.7): queueing@00:15:00 Jul 26 10:00:02 server sendmail[25581]: starting daemon (8.13.7): SMTP
It looks like sendmail may not be ready yet...
Any ideas?
Cian
Ugo Bellavance schrieb:
I found something.
The script does a -HUP on sendmail, so here is what I see in maillog is:
Why does it do so?
Jul 26 10:00:02 server sendmail[19016]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[19018]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sm-msp-queue[19032]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[25475]: k6QE01aW025475: from=root, size=0, class=0, nrcpts=0, relay=root@localhost
That is not really a mail: it has zero size and zero recipient. Could be a script that probes whether the MTA is alife.
Jul 26 10:00:02 server sendmail[25579]: starting daemon (8.13.7): queueing@00:15:00 Jul 26 10:00:02 server sendmail[25581]: starting daemon (8.13.7): SMTP
It looks like sendmail may not be ready yet...
Sendmail restarts as to what the log says.
Any ideas?
`mailq -Ac -v' has content? Then there is a problem with mail submission, as cron directly injects the mail.
Alexander
Alexander Dalloz wrote:
Ugo Bellavance schrieb:
I found something.
The script does a -HUP on sendmail, so here is what I see in maillog is:
Why does it do so?
Because the script's purpose is to sync sendmail configs among many mail servers.
Jul 26 10:00:02 server sendmail[19016]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[19018]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sm-msp-queue[19032]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[25475]: k6QE01aW025475: from=root, size=0, class=0, nrcpts=0, relay=root@localhost
That is not really a mail: it has zero size and zero recipient. Could be a script that probes whether the MTA is alife.
Ok.
Jul 26 10:00:02 server sendmail[25579]: starting daemon (8.13.7): queueing@00:15:00 Jul 26 10:00:02 server sendmail[25581]: starting daemon (8.13.7): SMTP
It looks like sendmail may not be ready yet...
Sendmail restarts as to what the log says.
Any ideas?
`mailq -Ac -v' has content? Then there is a problem with mail submission, as cron directly injects the mail.
/var/spool/clientmqueue is empty Total requests: 0
Thanks for your input,
Ugo
Alexander
Ugo Bellavance wrote:
Alexander Dalloz wrote:
Ugo Bellavance schrieb:
I found something.
The script does a -HUP on sendmail, so here is what I see in maillog is:
Why does it do so?
Because the script's purpose is to sync sendmail configs among many mail servers.
Jul 26 10:00:02 server sendmail[19016]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[19018]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sm-msp-queue[19032]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[25475]: k6QE01aW025475: from=root, size=0, class=0, nrcpts=0, relay=root@localhost
That is not really a mail: it has zero size and zero recipient. Could be a script that probes whether the MTA is alife.
Ok.
Jul 26 10:00:02 server sendmail[25579]: starting daemon (8.13.7): queueing@00:15:00 Jul 26 10:00:02 server sendmail[25581]: starting daemon (8.13.7): SMTP
It looks like sendmail may not be ready yet...
Sendmail restarts as to what the log says.
Any ideas?
`mailq -Ac -v' has content? Then there is a problem with mail submission, as cron directly injects the mail.
/var/spool/clientmqueue is empty Total requests: 0
Any ideas how I could make my script so that I can submit the mail without problem even if I do a killall -HUP sendmail during the script?
Regards,
Ugo
Ugo Bellavance wrote:
Ugo Bellavance wrote:
Alexander Dalloz wrote:
Ugo Bellavance schrieb:
I found something.
The script does a -HUP on sendmail, so here is what I see in maillog is:
Why does it do so?
Because the script's purpose is to sync sendmail configs among many mail servers.
Jul 26 10:00:02 server sendmail[19016]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[19018]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sm-msp-queue[19032]: restarting /usr/sbin/sendmail due to signal Jul 26 10:00:02 server sendmail[25475]: k6QE01aW025475: from=root, size=0, class=0, nrcpts=0, relay=root@localhost
That is not really a mail: it has zero size and zero recipient. Could be a script that probes whether the MTA is alife.
Ok.
Jul 26 10:00:02 server sendmail[25579]: starting daemon (8.13.7): queueing@00:15:00 Jul 26 10:00:02 server sendmail[25581]: starting daemon (8.13.7): SMTP
It looks like sendmail may not be ready yet...
Sendmail restarts as to what the log says.
Any ideas?
`mailq -Ac -v' has content? Then there is a problem with mail submission, as cron directly injects the mail.
/var/spool/clientmqueue is empty Total requests: 0
Any ideas how I could make my script so that I can submit the mail without problem even if I do a killall -HUP sendmail during the script?
I finally found that the sendmail HUP was the problem.
Regards,
Ugo