"On behalf of" added to the sender mail address goes to spam


Jul 24, 2012
cPanel Access Level
Root Administrator
Cpanel + exim + suphp

when send a mail using php mail() the exim add envelope-from ( [email protected] )
this cause on gmail/hotmail mark as spam/junk the message.

using phpmail() with fifth parameter (-f)the problem is solved.. for example:
mail($to, $subject, $message, $headers, "[email protected]");

but i can't force to all my users to change your scripts and add -f parameter to mail()

how we can set to exim to trust the mail header_from and not add return_path(envelope-from) ?

we test.. set off the tweak setting and exim header verify

** Always set the "Sender:" header when the sender is changed from the actual sender. Unchecking this will stop "On behalf of" data in Microsoft® Outlook, but may limit your ability to track abuse of the mail system.

** Set SMTP Sender: headers [?] OFF

** Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?] OFF