I changed the mail server on one of my machines from Postfix to Exim a couple of days ago and discovered it adds a “sender” header by default if the “from” header is not the same as the user that sent the email. This results in the “on behalf of” sort of from address in Outlook. This post looks at the setting to prevent the extra sender header from being added.
Example error message
The sort of thing in Outlook I’m meaning is when you see this:
Apache [firstname.lastname@example.org]; on behalf of; Chris Hope [email@example.com]
This comes from having both a From: header and a Sender: header in the email, which Exim adds by default.
Stop the extra header being added by Exim
To stop the Sender: header from being added by Exim add the following to your exim.conf configuration file and restart exim:
no_local_from_check untrusted_set_sender = *
When I first tried this I added it to the end of the file and when I restarted I got this error message:
Starting exim: 2009-02-24 10:57:42 Exim configuration error in line 840 of /etc/exim/exim.conf: authenticator name missing
I moved the settings from the end of the file to the top section directly before the “ACL CONFIGURATION” section starts, restarted Exim and there were no further errors.