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 [email protected], where pi is the Linux login name. I want to find a way to specify the username manually, to match my email account, [email protected].
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.