Sending as different users [Postfix works, Exchange works, how can I do this in Exim]

Steini Petur

Well-Known Member
Apr 24, 2016
cPanel Access Level
Root Administrator

I have 2 mailboxes in cpanel:

[email protected]
[email protected]

I need [email protected] to be able to send as [email protected]. When I just set a new sender in Thunderbird, it sends just fine, but recipient sees the original in headers anyway. I need that to be completely "white-labelled". If sends as, there shouldn't be any mentions of in the headers.

Example below:

I have a mail account set up in cPanel with the name [email protected]. I don't send from this email address, I just use it as a storage. All other mail that goes to my real email address (like [email protected]) is forwarded to [email protected], so I receive all mail I need. That part is ok.

When I send an email, I always use the my primary mailbox for SMTP authentication. When the mail is delivered to address, here is what gmail user sees in headers:

ARC-Authentication-Results: i=1;;
dkim=pass header.s=default header.b=Mmlm4ibI;
spf=pass ( domain of [email protected] designates as permitted sender) smtp.mailfrom=[email protected]
Return-Path: <>
Received: from ( [])
by with ESMTPS id n7si463763wrs.340.2020.
for <[email protected]>
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 01 Jun 2020 12:57:41 -0700 (PDT)
Received-SPF: pass ( domain of [email protected] designates as permitted sender);
dkim=pass [email protected] ........

As you can see, there are headers that mention both and domains. I don't want the domain to be seen at all, this is internal and not for everybody else to see.

That is the problem.

I could sort that out in Exchange and Postfix in 10 minutes, now I've been looking for a solution for a second day and can't still find a correct way to do it. I've set this up on cPanel and I can't have this figured out

Anyone else know how to accomplish this.. It can be done in Postfix and Microsoft Exchange so it must be able to be done in Exim, I just haven't figured it out.

Thank you in advance


Product Owner II
Staff member
Nov 14, 2017
I believe you can do this by setting up an identity to send from in Webmail. From Roundcube go to Settings (the gear on the left-hand side) -> Identities -> Create

Here's how I created mine:

Screenshot at Jun 02 23-26-22.png
(You should be able to click the thumbnail to make it readable)

Now I will note that you will continue to see two headers that cPanel & WHM adds which reference the original sender:

X-Get-Message-Sender-Via: authenticated_id: [email protected]
X-Authenticated-Sender: [email protected]
These are added into /etc/

[root@server /]# grep -ir "X-Authenticated-Sender" /etc/exim*
/etc/    return "X-Get-Message-Sender-Via: " . ( $primary_hostname ||= Exim::expand_string('$primary_hostname') ) . ": " . get_sender_lookup_method() . "\n" . "X-Authenticated-Sender: " . ( $primary_hostname ||= Exim::expand_string('$primary_hostname') ) . ": " . get_sender_lookup();
And you *could* remove those but the customization to do so would be unsupported. There's an old thread that appears to still be relevant on this here: Remove X-Get-Message-Sender-Via header


Product Owner II
Staff member
Nov 14, 2017
Thank you so much @cPanelLauren for this solution, I believe this might work, this should hide the header and even if unsupported, it's at least one way to do it, really wish though that it was a part of the Tweak Settings :)
Yea even I got fooled and thought the tweak setting that is present would do it, thankfully I tested it before I responded to you. I'm really glad to have helped you find a solution to this!! Thanks!