I have cron and sometimes at on an ubuntu 14.04.

jobs output should be mail to me, but failed.

I make a .forward in my home dir. mail explicitly send to local unix user is forwarded to my corp mail fine.

 echo archemar@mycompany.com > .forward
 date | mail archy

I receive the mail at archemar@mycompany.com.

however, cron and at sends mail to (non existing) archy@mycompany.com

What am I missing here ?

edit: mailer is postfix


for cron you can to add a line to your crontab:


maybe there is already a wrong MAILTO line in your crontab?

But it might be better to find a universal solution, such as this:

Add line(s) to /etc/aliases (one for each user for which you wish to substitute a destination email address):

root: archemar@mycompany.com

Rebuild the database with newaliases

Reload postfix with postfix reload

  • I use the MAILTO option, that was so simple ...
    – Archemar
    Mar 18 '15 at 10:48
  • make sure you do this for root account, etc. too. crontab -e for user, sudo crontab -e for root.
    – endolith
    Feb 19 '16 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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