Server Hostname point to two different ips

dolomats

Active Member
Dec 14, 2014
34
0
56
cPanel Access Level
Website Owner
Hello.

I have a Hostname host.example.com that point to two different IPS to fix the PTR issue " SMTP Reverse DNS Mismatch", .

So my question is: Is it OK to have the Hostname of my server pointing to two different ips ? I wont have some conflict later ?

Thanks
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
cPanel Access Level
Root Administrator

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
cPanel Access Level
Root Administrator
Are you asking how to check if the reverse DNS is configured properly? If so, there are several online tools that perform DNS testing, but you can also run this command from a machine outside of your server:

Code:
dig -x 1.2.3.4
where "1.2.3.4" is the IP address you're checking. If properly setup, you should get the hostname in response.
 

dolomats

Active Member
Dec 14, 2014
34
0
56
cPanel Access Level
Website Owner
Are you asking how to check if the reverse DNS is configured properly? If so, there are several online tools that perform DNS testing, but you can also run this command from a machine outside of your server:

Code:
dig -x 1.2.3.4
where "1.2.3.4" is the IP address you're checking. If properly setup, you should get the hostname in response.
I was Asking more about how to change a single account mail IP and Reverse DNS (PTR) for The EXim
 

quietFinn

Well-Known Member
Feb 4, 2006
1,850
433
438
Finland
cPanel Access Level
Root Administrator
I was Asking more about how to change a single account mail IP and Reverse DNS (PTR) for The EXim
Here is how I do that:

1st in WHM -> Service Configuration -> Exim Configuration Manager -> Domains and IPs:
Send mail from the account’s IP address = Off​
Use the reverse DNS entry for the mail HELO/EHLO if available = Off​
Reference /etc/mailhelo for custom outgoing SMTP HELO = On​
Reference /etc/mailips for custom IP on outgoing SMTP connections = On​

Lets say that the main IP to send emails from is 12.34.56.1

If 12.34.56.1 is your server's public IP and your server's hostname is host.example.com , then host.example.com must resolve to 12.34.56.1, AND reverse dns of 12.34.56.1 = host.example.com.

Now in /etc/mailhelo it's like this:
*: host.example.com​

and in /etc/mailips it's like this:
*: 12.34.56.1​

Ok, so if you want that emails sent from clientdoman.com are sent from IP 12.34.56.2 you do this:
you create hostname host2.example.com, and host2.example.com resolves to 12.34.56.2, AND reverse dns of 12.34.56.2 = host2.example.com

Then in /etc/mailhelo it's like this:
clientdoman.com: host2.example.com​
*: host.example.com​

and in /etc/mailips
clientdoman.com: 12.34.56.2​
*: 12.34.56.1​

After that emails sent from clientdoman.com are sent from IP 12.34.56.2, the HELO is host2.example.com, all other emails are sent from IP 12.34.56.1 with HELO host.example.com.

And when you change /etc/mailhelo and/or /etc/mailips you must restart Exim.

EDIT: corrected some typos
 
Last edited:
  • Like
Reactions: dolomats and cPRex