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.
I have set up my Raspbian mail to forward by configuring
/etc/aliases. However, for external email recipients, the sender is
pi is the Linux login name. I want to find a way to specify the username manually, to match my email account,
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.