Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

CentOS 5

I have setup /etc/crontab and can get emails with outputs whenever any tasks run by crond. But if I use mail program send email to same email, I CAN'T receive the email. (with command this: mail -s "test email" "") Is there any way to check what's happened?

Below is what is working and not:

  • crond can send email to (this is just an example, I actually sending to company email)

  • mail can send email to gmail/yahoo/hotmail account

  • mail CAN'T send email to

share|improve this question
It would be helpful if you posted error messages or log messages. Are you getting reject responses? What does type -a mail (Bash) tell you? – Dennis Williamson Oct 14 '10 at 14:06
up vote 2 down vote accepted

If mail can send to a gmail account, there are mails leaving. In the logs (possibly in /var/log/maillog) you should see, whether your mails to your company are leaving or not. Dependend on that, one has to think about the difference in the path of the mails, which arrive and those which don't.

share|improve this answer

make sure your crons have PATH set or us the absolute path on mail, also need to make sure that your mail server will accept email from this host (may be blocked since it could appear as a spam box)

share|improve this answer
the cron mailler is called in a different place from where ever your script calls mail, so it has different path info – Jimsmithkka Oct 14 '10 at 11:21

Your Answer


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.