Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here's my crontab:

MAILTO=michael
02 11 * * * bash /home/michael/projectname/nightly_tests.sh
* * * * * python /home/michael/projectname/throwaway/hello.py

My username is specified correctly:

-bash-4.1$ whoami michael

Here's what I'm trying to run every minute:

-bash-4.1$ cat /home/michael/projectname/throwaway/hello.py
print "hello world"

My mail file is empty:

-bash-4.1$ ll /var/mail/michael 
-rw-rw---- 1 michael mail 0 Feb 19 23:04 /var/mail/michael

Why is no mail being sent? What can I do to fix this?

I'm on CentOS (3.7.5-linode48).

EDIT The maillog says this:

-bash-4.1$ sudo tail /var/log/maillog
Apr 13 11:49:01 servername postfix/sendmail[6989]: warning: the Postfix sendmail command must be installed without set-uid root file permissions
Apr 13 11:50:01 servername postfix/sendmail[6996]: warning: the Postfix sendmail command has set-uid root file permissions
Apr 14 11:50:01 servername postfix/sendmail[6996]: warning: or the command is run from a set-uid root process
Apr 13 11:50:01 servername postfix/sendmail[6996]: warning: the Postfix sendmail command must be installed without set-uid root file permissions
Apr 13 11:51:01 servername postfix/sendmail[7003]: warning: the Postfix sendmail command has set-uid root file permissions
Apr 13 11:51:01 servername postfix/sendmail[7003]: warning: or the command is run from a set-uid root process
Apr 13 11:51:01 servername postfix/sendmail[7003]: warning: the Postfix sendmail command must be installed without set-uid root file permissions
Apr 13 11:52:01 servername postfix/sendmail[7008]: warning: the Postfix sendmail command has set-uid root file permissions
Apr 13 11:52:01 servername postfix/sendmail[7008]: warning: or the command is run from a set-uid root process
Apr 13 11:52:01 servername postfix/sendmail[7008]: warning: the Postfix sendmail command must be installed without set-uid root file permissions

Going to go Google for what that means now.

share|improve this question
    
What does your maillog say? –  Jenny D Apr 13 '13 at 11:34
    
Ah, this is helpful. Please have a look at my updated question. Thank you. –  misha Apr 13 '13 at 11:48
add comment

2 Answers

This is a bug in CentOS with the combination of cron and postfix. See this bug report. As far as I can see, there's no fix for it yet, but you could try installing an older version of cron and see if that helps matters.

share|improve this answer
add comment

I got in touch with the admin of the server. This is what he had to say:

No, it's even more basic than that - the mailserver doesn't run by default. I've turned it on and enabled it now, so you should get a ton of email coming through that will have just been spooled.

FACEPALM

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.