1

I followed this instruction to setup an email client, http://zackreed.me/articles/39-send-system-email-with-gmail-and-ssmtp

All works fine but when I use at / crontab.

for example,

at now

abcd1234

Since there is no such command, an email saying abcd1234 not found is sent to linux-user-name@gmail-username@gmail.com instead of expected gmail-username@gmail.com

Is there any way to override the return address for error/system message on ssmtp instead of setting MAILTO on crontab?

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
user3204729
  • 317
  • 1
  • 13

1 Answers1

0

try adding "username: your@email.address" to /etc/aliases, where username is the username that your at job or cron job is running as.

mti2935
  • 11,465
  • 3
  • 29
  • 33
  • Thanks, but /etc/aliases doesn't help – user3204729 May 18 '14 at 05:03
  • I got this failure delivery email in my gmail account. Email title = Output from your job 44, Delivery to the following recipient failed permanently: linuxusername@gmailusername@gmail.com sh: 27: dwdwdwdwd: not found – user3204729 May 18 '14 at 15:07