Date: Fri, 18 Jul 2008 15:40:12 GMT From: Schiz0 <Schiz0phrenic21@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/125753: Cron Not Mailing Output Message-ID: <200807181540.m6IFeCU6069061@www.freebsd.org> Resent-Message-ID: <200807181550.m6IFo114073293@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125753 >Category: bin >Synopsis: Cron Not Mailing Output >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 18 15:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Schiz0 >Release: 7.0-RELEASE-p2 >Organization: >Environment: FreeBSD youcant.tastetherainbow.ws 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #0: Wed Jun 25 16:14:45 EDT 2008 root@youcant.tastetherainbow.ws:/usr/obj/usr/src/sys/TTR i386 >Description: Cron is not emailing the output from commands, both in /etc/crontab and users crontabs. When a cronjob is run and output SHOULD be emailed, I get the following message in my /var/log/maillog: Jul 18 15:35:00 youcant sendmail[48850]: m6IFZ0wX048850: from=User, size=0, class=0, nrcpts=0, msgid=<200807181535.m6IFZ0wX048850@youcant.tastetherainbow.ws>, relay=User@localhost So, for some reason, sendmail thinks the size=0 and that there are no recipients. I have no idea why this is happening. This also happens when I run a shell script from cron (As opposed to the command in the crontab itself). The output from the script itself is not mailed, and I get the same message in maillog. I am running sendmail from the base system, not from ports. In my /etc/make.conf, I have: CFLAGS=-O -pipe >How-To-Repeat: Put the following lines in /etc/crontab: MAILTO="root" */5 * * * * root echo "Hello!" >Fix: This isn't really a fix, but a work around. Pipe everything to /usr/bin/mail, such as the following: */5 * * * * root echo "Hello!" | /usr/bin/mail -s "Cron Output" email@address.tld >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807181540.m6IFeCU6069061>