1

How can I configure cron to send a local email only to the crontab owner with the cron job output.

This worked with Lion, could check the cron emails by just running mail in the terminal so I don't know what changed or how to reimplement that behavior.

2
  • /usr/bin/mail will send actual mail over the internet from the command line to real mail addresses. Would that be OK or do you need it to only send mail to an account on the local host?
    – bmike
    Commented Mar 2, 2014 at 23:05
  • I only want it sent to the account on the localhost
    – zoran119
    Commented Mar 2, 2014 at 23:26

1 Answer 1

1

This should be working and is certainly working on my Mavericks box.

If you don't have a "MAILTO" line in the crontab then output should get sent to the owner of the crontab.

Are you sure the job actually outputs something? Have you tried putting a job in the crontab that will be sure to have some output such as

*/10 * * * * *  /bin/echo "Working fine"

Are you sure you don't have a .forward file in the user home directory?

Have you tried using sendmail to send some mail to the account and see if it gets through.

2
  • What does */10 do?
    – SilverWolf
    Commented Aug 23, 2018 at 22:29
  • The "*/10" runs the command every ten minutes. man -s 5 crontab at the command line will get you a good manual of the format. Commented Aug 29, 2018 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .