Correct rDNS / HELO when using /etc/mailhelo and /etc/mailips ?

Arkaic

Active Member
Jun 23, 2015
42
10
58
United Kingdom
cPanel Access Level
Root Administrator
The issue
In cPanel -> Email Deliverability for domain1.co.uk it shows:

"Problems Exist (Reverse DNS)"

The system sends “domain1.co.uk”’s outgoing email from the “10.10.10.5” IP address. The only PTR value for this IP address must be “domain1.co.uk”. This is the name that this server sends with SMTP’s “HELO” command to send “domain1.co.uk”’s outgoing email.

1 unexpected PTR value exists for this IP address:

my.serverhostname.co.uk
To fix this problem, contact your system administrator and request that they replace all PTR records for “*****” with the following record at “*****” and “*****”

/etc/mailhelo looks like this:
domain1.co.uk: domain1.co.uk
domain2.co.uk: domain2.co.uk
domain3.co.uk: domain3.co.uk
*: my.serverhostname.co.uk

/etc/mailips looks like this
domain1.co.uk: 10.10.10.5
domain2.co.uk: 10.10.10.5
domain3.co.uk: 10.10.10.5
*: 10.10.10.2

10.10.10.2 is the main IP address of the server with perhaps bad reputation
10.10.10.5 is an additional IP address of the server with no sending issues.


Is the warning shown in cPanel Email Deliverability an actual issue? Is there another setting that perhaps needs changing?
The rDNS for the IP address is set to the hostname. As there are multiple domains sending from that IP we cannot set the rDNS to be that of the domains sending mail on that IP.
Or should the domains be HELO'ing from the hostname instead? Which isn't ideal because it resolves to a different IP address than the mail it is sent out from.
 
Last edited by a moderator:
  • Like
Reactions: blackwidow02

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,231
2,421
363
cPanel Access Level
Root Administrator
Hey there! If 10.10.10.5 doesn't have any sending issues, wouldn't it be easier to have every domain send from there instead of just domain1-3? Then you could just change the main IP to the 10.10.10.5 IP and not worry about any misconfigurations.

In general, the hostname will still show up in the mail headers no matter what makes the "helo" call, so if the rDNS is properly pointed to the hostname I would expect things to work.
 

Arkaic

Active Member
Jun 23, 2015
42
10
58
United Kingdom
cPanel Access Level
Root Administrator
Hey there! If 10.10.10.5 doesn't have any sending issues, wouldn't it be easier to have every domain send from there instead of just domain1-3? Then you could just change the main IP to the 10.10.10.5 IP and not worry about any misconfigurations.

In general, the hostname will still show up in the mail headers no matter what makes the "helo" call, so if the rDNS is properly pointed to the hostname I would expect things to work.
I realised I hadn't replied originally, apologies! I'm just touching on this issue again as it's causing unnecessary tickets to come in from end-users unfortunately.

To lay the scenario differently. Lets say we have 6 domains and 4 IP addresses on the server. All accounts are on the same default shared IP, which the hostname resolves to. and the 3 additional IPs are for mail.

We want to send email like so, mostly to prevent widespread reputation issues for a single IP.
domain1 and domain2 email from 10.10.10.2
domain3 and domain4 email from 10.10.10.3
domain5 and domain6 email from 10.10.10.4

/etc/mailhelo looks like this:
domain1.co.uk: domain1.co.uk
domain2.co.uk: domain2.co.uk
domain3.co.uk: domain3.co.uk
domain4.co.uk: domain4.co.uk
domain5.co.uk: domain5.co.uk
domain6.co.uk: domain6.co.uk
*: server.hostname.com

/etc/mailips looks like this
domain1.co.uk: 10.10.10.2
domain2.co.uk: 10.10.10.2
domain3.co.uk: 10.10.10.3
domain4.co.uk: 10.10.10.3
domain5.co.uk: 10.10.10.4
domain6.co.uk: 10.10.10.4

In this case, we are not able to set the rDNS to be the sending domains, so we would have to use the hostname as the server.
This presents the following warning

Code:
The system sends “domain1”’s outgoing email from the “10.10.10.2” IP address. The only PTR value for this IP address must be “domain1.co.uk”. This is the name that this server sends with SMTP’s “HELO” command to send “domain1.co.uk”’s outgoing email.
1 unexpected PTR value exists for this IP address:
server.hostname.com
Now, if we set domains to helo as the hostname like so:

/etc/mailhelo looks like this:
domain1.co.uk: server.hostname.com
domain2.co.uk: server.hostname.com

Then we get the following warning
Code:
The system sends the domain “server.hostname.com” in the SMTP handshake for this domain’s email. “server.hostname.com” resolves to “10.10.10.1”, not “10.10.10.2”.
To fix this problem, contact your system administrator and request that they create a DNS “A” record for “server.hostname.com” whose value is “10.10.10.2”.
Is there a method to not have the Problems Exist displayed? And which method /etc/mailhelo is the ideal one for operational purposes? Presumably the one that includes the hostname in the MAILHELO? Or is that seen anyway?

Either way, we cannot have rDNS/PTR of the sending IPs to be anything but the hostname of the server because A) the domains don't resolve to it, B) multiple domains are sending from them.
 

Arkaic

Active Member
Jun 23, 2015
42
10
58
United Kingdom
cPanel Access Level
Root Administrator
Solved.

Set an A record and PTR record for each IP address that is sending out mail then enable "Use the reverse DNS entry for the mail HELO/EHLO if available".
i.e. 10-10-10-2.domain.com
10-10-10-3.domain.com

Therefore each sending IP address has a host that resolves to it and a PTR that matches.