Add to Favourites Add to Favourites    Print this Article Print this Article

I don't wish to see the hostname in my emails "on behalf of"

Exim by default will not trust any sending Users on your system (doesn't apply to mail sent via smtp).  This means that any email sent as a User from a script will have the from address be set to  If you wish to allow your Users to set the From address, and not have exim rewrite it, you can do so by setting this option:

untrusted_set_sender = *

in the top section of your exim.conf (possibly "local_from_check = false").  This option is similar to the trusted_users option, except it doesn't give complete trust in the User.. it simply allows the User to set the sender as they desire.

Related exim documentation on this:

If you're using suPhp, this can only be overridden with the use of a per-user php.ini file.
In that User's php.ini file, add the following code:

[mail function]
sendmail_path = /usr/sbin/sendmail -t -i -f

Add this to the acl_script ACL:

  warn         condition = ${if !eq {$acl_m_uid}{${extract{2}{:}{${lookup{majordomo}lsearch{/etc/passwd}{$value}}}}}{yes}{no}}
               remove_header = From
               add_header = "Sender: $h_from"
               add_header = "From: $h_from"

just below the "acl_script:" line.   If you have exim.conf 4.5.x, you can instead add this code to:


Was this answer helpful?

Also Read