Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

When I schedule a job/command with at to be executed in the future, the standard output and error of the command is "mailed" to the user that did the scheduling.

So after my job runs, I get a message in the command prompt

You have mail in /var/spool/mail/mattb

which I can then read with mail.

Is it possible to have the output instead sent to my corporate mailbox (i.e. mattb@company.com), rather than the local user's /var/spool/mail?

How does at know which address to email the output of the command, or does it only know how to place a message in the user's /var/spool/mail?

share|improve this question
up vote 3 down vote accepted

at will typically use your installed mail transport agent (MTA) to deliver the mail. If you do not use local mail on the box at all, you can configure your MTA to forward all mail to another server.

Alternatively you can use a .forward file for a single user. If you put "mattb@company.com" in ~mattb/.forward then your MTA should forward your email there.

share|improve this answer
Thanks, this works perfectly! – matt b Nov 5 '10 at 2:07

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.