Primary Hostname change with exim for better email delivery

jeffschips

Well-Known Member
Jun 5, 2016
264
36
78
new york
cPanel Access Level
Root Administrator
Hello. I hope everyone is healthy and safe.

My server has a hostname as hostname.domain.com. I also have about 10 different fully qualified domain names with assocaited web pages and email campaign software.

The issue is that any domain sending email is always shows primary hostname as hostname.domain.com rather than the actual domain doing the sending. For example domain.com sending email using smtp in headers will show primary hostname as hostname.a-different-domain.com

I remember on a previous install of cpanel a few years back there was some exim code working with dns or something that could change the primary hostname to match the sending domain so discoverability improves.

Would the brain trust here know of what those tweaks are or any way to change the primary hostname when sending email via smtp so headers display the primary hostname as domain.com insteads of hostname.domain.com?

Here is some sample header code that reflects the issue at hand:

X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - hostname.domain.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID -
X-AntiAbuse: Sender Address Domain - the-domain-that-is-actually-sending.com
X-Get-Message-Sender-Via: hostname.domain.com: authenticated_id: domain/from_h
X-Authenticated-Sender: hostname.domain.com: [email protected]
X-Source: X-Source-Args: /usr/bin/ea-php73 /home/cpanel-regisered-domain/public_html/domain.com/lists/admin/index.php -pprocessqueue -c /home/cpanel-registered-domain/public_html/domain.com/lists/config/config.php X-Source-Dir:

Note to forum administrator: clicking the "code" link above does not insert placeholders for code but rather brings up the various list of forums.
 
Last edited by a moderator:

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
maybe this might help you ?

 

jeffschips

Well-Known Member
Jun 5, 2016
264
36
78
new york
cPanel Access Level
Root Administrator
Thank you @Sprogg. This looks like a good solution. However, is it really any different than:


It seems to produce the same end result but with different settings. Or do I have that wrong?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
Thank you @Sprogg. This looks like a good solution. However, is it really any different than:


It seems to produce the same end result but with different settings. Or do I have that wrong?
I think you are correct. I would try the first solution and see if the result works for you. :)
if not as expected you can try your post solution and see how that does. remember to take a backup or write down what you have edited so you can revert back if needed :)

hope that helps :)
 

jeffschips

Well-Known Member
Jun 5, 2016
264
36
78
new york
cPanel Access Level
Root Administrator
On further examination I don't think SOLVED - EXIM Outgoing IPs Per Account? will work.

In that example the user has 2 ip addresses. I have one ip address shared among 10 domains. I need sending of emails from domain 1 to be associated with my single ip address, emails from domain 2 to be associated with my single IP address, etc. . . Keep in mind that 1) I can edit the file if necessary because since I control all the domains, only 2 of them have newsletters and they never send at the same time.

Does that make sense?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,701
352
438
Finland
cPanel Access Level
Root Administrator
I don't think that "Primary hostname" has anything to do with "better email deliver".
When you send emails from your server, they are sent from certain IP address.
That IP address must resolve to a Fully Qualified Domain, and in turn, that Fully Qualified Domain must resolve to that IP address. Also that Fully Qualified Domain must be same as the HELO Exim is using when sending emails.
If those are correctly set then you will have "better email delivery".
 

jeffschips

Well-Known Member
Jun 5, 2016
264
36
78
new york
cPanel Access Level
Root Administrator
Thank you @quietFinn for clarifying that for me. It's useful. So right now my server single IP address at DNS Checker - DNS Check Propagation Tool resolves to hostname.domain.com using the PTR feature of dnschecker.org.

If I run that domainname.com against DNS checker A record it resolves to the proper ip address.
If I run hostname.domain.com against DNS checker A record it also resolves to the proper IP address.

So to me that would everything is setup correctly yet at UCEPROTEC UCEPROTECT®-Network - Spam Database Query I consistently get" No matching A-Record exists for your Reverse-DNS. DNS is INCONSISTENT"

Is this all just a tempest in a teapot?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
161
43
chicago
cPanel Access Level
Root Administrator
I consistently get" No matching A-Record exists for your Reverse-DNS. DNS is INCONSISTENT"
@jeffschips

you need to ask your server hosting company to setup your reverse dns to your hostname

so hostname.youdomain.com
this is what I have when trying the UCEPROTECT
Reverse DNS (PTR) exists and claimes to be: server1.mydomain.com
Forward DNS for server1.mydoomain.com is: xxx.xxx.xxx.xx

DNS is consistent.

ONLY THE IP HOLDER _ OWNER can change the reverse DNS or sometimes depending on where you have your server or VPS you might have that option.
I have a server with a company and I had to request all my IP's to get reverse DNS to the hostnames i use for each one.

just so you know they can setup reverse DNS for 2 or more IP's to use the same reverse DNS as well

so 2 of my IP's use the same hostname.mydomain.com for reverse DNS
it can be 3 4 5 6 or as many as you want to have the same reverse DNS

just FYI



Hope that helps you - just add a support request for them to change your reverse DNS to your hostname :)
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
@jeffschips - for the Forums issue you mention, you can follow along here as that is a known issue:

 
  • Like
Reactions: Spirogg