When I schedule a command with 'at', can I change where the output is mailed to?
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
Is it possible to have the output instead sent to my corporate mailbox (i.e.
email@example.com), rather than the local user’s
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
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 “firstname.lastname@example.org” in ~mattb/.forward then your MTA should forward your email there.