From nobody@FreeBSD.org  Fri Jul 18 15:40:13 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 116E31065670
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Jul 2008 15:40:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E8F478FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Jul 2008 15:40:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6IFeCGm069062
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Jul 2008 15:40:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m6IFeCU6069061;
	Fri, 18 Jul 2008 15:40:12 GMT
	(envelope-from nobody)
Message-Id: <200807181540.m6IFeCU6069061@www.freebsd.org>
Date: Fri, 18 Jul 2008 15:40:12 GMT
From: Schiz0 <Schiz0phrenic21@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Cron Not Mailing Output
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         125753
>Category:       bin
>Synopsis:       cron(8) not mailing output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 18 15:50:01 UTC 2008
>Closed-Date:    Sat May 15 22:24:23 UTC 2010
>Last-Modified:  Sat May 15 22:24:23 UTC 2010
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Aug 7 01:41:49 UTC 2008 
State-Changed-Why:  
I know that during the pre-release of 7.0 various people had issues 
like these. Now that 7.0 has been out in the field for a couple of 
months, and I can't reproduce the issue on it, I'm going to ask you 
the dreaded question: Does it still happen for you? 


http://www.freebsd.org/cgi/query-pr.cgi?pr=125753 
State-Changed-From-To: feedback->closed 
State-Changed-By: jilles 
State-Changed-When: Sat May 15 22:24:22 UTC 2010 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125753 
>Unformatted:
