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

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » Email » Exim

I don't wish to see the hostname in my emails "on behalf of"Last Modified: Aug 29, 2019, 4:38 pm
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 user@server.hostname.com.  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 user@domain.com

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:


Related Helpfiles
Setup a per-user php.ini to allow open_basedir with suPhp

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST