Bug 468575

Summary: MAILTO= in crontab causes bogus erroring when installing crontab
Product: Red Hat Enterprise Linux 5 Reporter: David Cantrell <dcantrell>
Component: vixie-cronAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED UPSTREAM QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-22 10:00:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Cantrell 2008-10-26 07:22:44 UTC
On RHEL 5.2, if I run 'crontab -e' and use this for my crontab file:

    MAILTO=

    # update rawhide trees daily at 6:00 AM HST
    0 6 * * * /home/released/sync

I get this error when crontab tries to install the new crontab file:

    [root@tenon released]# crontab -e
    crontab: installing new crontab
    "/tmp/crontab.XXXXIhC21M":1: bad minute
    errors in crontab file, can't install.
    Do you want to retry the same edit?

But I use this for the crontab file:

    MAILTO=""

    # update rawhide trees daily at 6:00 AM HST
    0 6 * * * /home/released/sync

crontab is happy.  I know the manpage says to either define MAILTO to something or use MAILTO="", but on other Unix systems (such as Solaris), you can set MAILTO= and it has the same effect.  I wouldn't consider this a huge bug, just a user experience issue.  This is the kind of thing that would likely end up on a Solaris admin's blog under something titled "why I hate RHEL..." because he spent a good portion of his day trying to figure out why crontab was choking.  Well, that's just a theory anyway.

Comment 1 Marcela Mašláňová 2010-01-22 10:00:22 UTC
All cronjobs are checked for invalid syntax and warning is printed into logs since cronie (replacement for vixie-cron). I suppose this could also fix your issue, because you have been warned ;-)