Change email header from primary hostname to domain name?

kishan giri

Registered
Feb 12, 2018
2
0
1
New Delhi, India
cPanel Access Level
Root Administrator
Hi,
Fellow users, moderators, Staff Members, Linux admins... I need some help on Email headers.
I have tested my domain on mxtoolbox and saw smtp banner issue which I corrected after searching on cPanel Forum. Now I'm stuck on one issue. Kindly help me on this.

I have a domain = 24XXl.info with dedicated IP hosted with multiple domains with main shared ip and primary hostname= server.odeXXXXXXk.com.

I had made a test and below is the email header of it.

Code:
Received: from [127.0.0.1] (port=34192 helo=server.odeXXXXXXk.com) by server.odeXXXXXXk.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from <[email protected]>) id 1fKUrc-0007e7-4O for [email protected]; Mon, 21 May 2018 01:53:32 +0530
Received: from 82.102.25.78 ([82.102.25.78]) by server.odeXXXXXXk.com (Horde Framework) with HTTPS; Sun, 20 May 2018 20:23:32 +0000
Date: Sun, 20 May 2018 20:23:32 +0000
Message-ID: <[email protected]om>
From: [email protected]
To: [email protected]
Subject: need to check now 1:52
User-Agent: Horde Application Framework 5
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
MIME-Version: 1.0
Content-Disposition: inline
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.odeXXXXXXk.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - 24XXl.info
X-Get-Message-Sender-Via: server.odeXXXXXXk.com: authenticated_id: [email protected]
X-Authenticated-Sender: server.odeXXXXXXXk.com: [email protected]
X-Source:
X-Source-Args:
X-Source-Dir:
What I want to do is to change on email header is to use My domain name = 24xxl.info or server.24XXl.info(PTR set to this) instead of server hostname = server.odeXXXXXXk.com in messageid , X-AntiAbuse, X-Get-Message-Sender-Via & X-Authenticated-Sender and also in other parts..
like
Code:
Received: from [127.0.0.1] (port=34192helo=server.odeXXXXXXk.com) by server.odeXXXXXXk.com

Received: from 82.102.xx.xx ([82.102.xx.xx]) by server.odeXXXXXXk.com (Horde Framework)

Can anyone please help me to set this .. I do not wish to use shared / main IP-address/hostname on my email header as it is being used by many domains.


NOTE: Server is VPS with root access so can edit any code if needed.

Thanks & Regards
Kishan Giri
 
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,
Can anyone please help me to set this .. I do not wish to use shared / main IP-address/hostname on my email header as it is being used by many domains.
By default when main shared IP is queried, the hostname if going to be recalled. If you do not wish to get this, you can use dedicated IP for your domain and it will query the dedicated IP and your domain name in the SMTP.
 

kishan giri

Registered
Feb 12, 2018
2
0
1
New Delhi, India
cPanel Access Level
Root Administrator
Hi,

By default when main shared IP is queried, the hostname if going to be recalled. If you do not wish to get this, you can use dedicated IP for your domain and it will query the dedicated IP and your domain name in the SMTP.
I have already changed the Exim configuration to use Dedicated IP instead of main ip ...
Problem is the header showing main hostname and I want to change it to sending domain

Thanks & Regards
Kishan Giri
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,252
313
Houston
Hello @kishan giri

Setting the following will change the mailhelo to the domain (or whatever you set it to)

WHM>>Service Configuration>>Exim Configuration Manager

Reference /etc/mailhelo for outgoing SMTP HELO
Reference /etc/mailips for outgoing SMTP connections

since you have the PTR set to the domain name, setting the mailhelo to the domain should resolve any mismatch issues. I will point out that you may still receive errors if the PTR isn't a valid hostname like server.domain.tld


Thanks!