What I want to do is pretty simple - I want the output from cron on an EC2 instance to go to an external e-mail address. I've clearly done some wrong things, though, and am confused.
I've configured exim4 to use gmail as a smart host, but somehow I've managed to do something to get the e-mails from the cron daemon to come as From: Cron Daemon <email address from /etc/exim4/passwd.client>
. Why has cron decided to run as me?
I have
root: external@email.com
user-account: external@email.com
in /etc/aliases. However, I get emails sent to that say
Delivery to the following recipient failed permanently:
root@domu-____.compute-1.internal
Why is exim4 trying to reach root by such a weird-looking e-mail address? I could theoretically add domu-(redacted).compute-1.internal as a local domain in the exim4 config, but these are dynamically provisioned instances, and that would be a real pain, and I also don't know where in the world that domain is coming from - hostname -f gives ip-11-11-11-11.ec2.internal. What have I done to make cron do something other than just send to root@localhost (which given my config would work fine)?