I know that you can change the from address in *nix mail by specifying command-line options. However, is there a way to set it globally, so that it is respected by forwarding?
I tried modifying the $REPLYTO
environment variable, but this did not help.
Background
I have set up my Raspbian mail to forward by configuring /etc/aliases
. However, for external email recipients, the sender is pi@bar.com
, where pi
is the Linux login name. I want to find a way to specify the username manually, to match my email account, foo@bar.com
.
My exim4 configuration is specified here. N.B. there is an option to specify the sender domain ("Visible domain name for local users: bar.com"), but not a way to specify the username for each account.
/usr/ucb/Mail
is, but I think I'm using exim4. Emails are sent by the server internally to local mail, and also forwarded externally, as per the second link. – Sparhawk Oct 29 '14 at 00:18