[Bug 520273] [NEW] cron doesn't send mail
Launchpad Bug Tracker
520273 at bugs.launchpad.net
Sat Apr 17 03:13:08 BST 2010
You have been subscribed to a public bug:
Binary package hint: cron
I have this as a test script called test_cron
_______________
#! /bin/bash
#
#if ! type promptYesNo > /dev/null 2>&1 ; then .
/home/woodnt/scripts/misc.sh ; fi
FILE=/tmp/cron.log
TIME=`date -d now "+%m-%d-%y@%H%M%S"`
if [ ! -f $FILE ] ; then
touch $FILE
fi
echo "Hello at $TIME from test_cron" |tee -a $FILE
_______________
>From the last line, one can see that that there is output.
It is trying to send mail as can be seen here:
_______________
root 29138 0.0 0.0 18708 988 ? Ss 23:00 0:00 cron
root 29166 0.0 0.0 91236 2192 ? S 23:01 0:00 \_ CRON
root 29167 0.0 0.0 91244 1300 ? S 23:01 0:00 | \_ CRON
woodnt 29168 0.0 0.0 0 0 ? Zs 23:01 0:00 | \_ [sh] <defunct>
woodnt 29193 0.0 0.0 37000 2100 ? S 23:01 0:00 | \_ /usr/sbin/sendmail -i -FCronDaemon -oem woodnt
woodnt 29194 0.0 0.0 36988 2096 ? S 23:01 0:00 | \_ /usr/sbin/postdrop -r
_______________
$ mail
No mail for woodnt
woodnt at toshiba-laptop /var/mail $
I have looked in /var/mail and it shows bupkis
woodnt at toshiba-laptop /var/mail $ sudo cat *
[sudo] password for woodnt:
woodnt at toshiba-laptop /var/mail $
checking out /var/log/mail.log shows nothing being sent from cron.
mail.err is empty. No evidence of cron sending anything in mail.info
either.
This works:
woodnt at toshiba-laptop /var/log $ echo hello|/usr/sbin/sendmail -i -FCronDaemon -oem woodnt
woodnt at toshiba-laptop /var/log $ mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/woodnt": 1 message 1 new
>N 1 woodnt at toshiba-la Wed Feb 10 23:10 13/437
&
So somewhere between cron sending the mail and it going through postfix
something is going wrong.
I have bsd-mailx installed which of course also installs postfix as a
depends.
I can't duplicate this problem on other systems.
Of note, I had installed ssmtp first for another reason, but uninstalled
thinking it might have been the problem. A purge uninstall then
reinstall of bsd-mailx didn't fix this. I am not sure if the culprit is
ssmtp configuring something and not undoing it on purge or if the fault
is in cron.
Thanks,
Narnie
** Affects: postfix (Ubuntu)
Importance: Undecided
Status: New
--
cron doesn't send mail
https://bugs.edge.launchpad.net/bugs/520273
You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in ubuntu.
More information about the Ubuntu-server-bugs
mailing list