Rewrite Sender: header to match From: header

lorio

Well-Known Member
Feb 25, 2004
313
22
168
cPanel Access Level
Root Administrator
I have an email account and many forwarder addresses.

I still haven't found a way to prevent that EXIM sets a sender header (my email account address). I set the From Line to one of my forwarder addresses but the sender header is always set. The settings in EXIM WHM are set not helping. "Set SMTP Sender: headers" is off.

I need the reverse behavior from this option "Rewrite From: header to match actual sender". Or at least a suppressing of the sender header.

What is the best place to add rewrite rules to rewrite the sender header?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Could you provide an example of an entry in a message header as it appears on your system when you reproduce the behavior, and another example of how you'd like it to appear?

Thank you.
 

lorio

Well-Known Member
Feb 25, 2004
313
22
168
cPanel Access Level
Root Administrator
Don't think it is a bug. I want to force EXIM to use the From Header (which I manually enter in my email client via the From field) and not add the Sender Header with the emailaddress of the sending account.
That would prevent Outlook from showing both emailadresses with "on behalf of" .

Adding or changing settings via GUI WHM seems not enough. Suppressing the sender header seems to be not possible without editing files directly.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Here's a list of options in "WHM >> Exim Configuration Manager >> Basic Editor" that relate to the sender field in the header:

EXPERIMENTAL: Rewrite From: header to match actual sender
Set SMTP Sender: headers
Enable Sender Rewriting Scheme (SRS) Support
Query Apache server status to determine the sender of email sent from processes running as nobody
Trust X-PHP-Script headers to determine the sender of email sent from processes running as nobody

Have you tried setting "EXPERIMENTAL: Rewrite From: header to match actual sender" to "disable"?

Thank you.
 

lorio

Well-Known Member
Feb 25, 2004
313
22
168
cPanel Access Level
Root Administrator
Thanks for the list. I'm aware of the available options.

Query Apache server status to determine the sender of email sent from processes running as nobody
Trust X-PHP-Script headers to determine the sender of email sent from processes running as nobody
Since there is no script involved (I send the Emails via Outlook and just enter an emailaddress in the from field), I don't see these settings as relevant.

Have you tried setting "EXPERIMENTAL: Rewrite From: header to match actual sender" to "disable"?
Yes, this setting is already set to disable.

To sum it up: How can I suppress the "Sender" header and force EXIM to just write a "From" header.
That would solve the issue.

Perhaps I have overlooked a discussion.
Thanks for your time.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

I don't believe that's supported with any options offered in the basic editor. Here's some information from Exim's documentation that you may find helpful:

When a message is submitted locally (that is, not over a TCP/IP connection) by an untrusted user, Exim removes any existing Sender: header line, and checks that the From: header line matches the login of the calling user and the domain specified by qualify_domain.

Note: An unqualified address (no domain) in the From: header in a locally submitted message is automatically qualified by Exim, unless the -bnq command line option is used.

You can use local_from_prefix and local_from_suffix to permit affixes on the local part. If the From: header line does not match, Exim adds a Sender: header with an address constructed from the calling user’s login and the default qualify domain.

If local_from_check is set false, the From: header check is disabled, and no Sender: header is ever added. If, in addition, you want to retain Sender: header lines supplied by untrusted users, you must also set local_sender_retain to be true.

These options affect only the header lines in the message. The envelope sender is still forced to be the login id at the qualify domain unless untrusted_set_sender permits the user to supply an envelope sender.

For messages received over TCP/IP, an ACL can specify “submission mode” to request similar header line checking. See section 46.16, which has more details about Sender: processing.
Additionally, review the sections on "untrusted_set_sender" at:

14. Main configuration

Thank you.
 

lorio

Well-Known Member
Feb 25, 2004
313
22
168
cPanel Access Level
Root Administrator
I don't expect this kind of modification in the WHM GUI EXIM.
Thanks for extracting relevant parts of the EXIM documentation. But that's not your job ;-) Digging EXIM documentation for the lazy ones. My opening question was not good enough. Perhaps that way: How do modify the EXIM config on parts, that are not open via GUI EXIM. Directly editing the file is the road to hell. Any paths/filename to place custom stuff, so that cpanel 66 get along with it?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
How do modify the EXIM config on parts, that are not open via GUI EXIM. Directly editing the file is the road to hell. Any paths/filename to place custom stuff, so that cpanel 66 get along with it?
Hello,

Is there a particular value you are unable to add or edit using the "Advanced Editor" tab in "WHM >> Exim Configuration Manager"?

Thank you.