[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Creating a proper Reverse DNS for two email servers


I have one front end server and one backend server.

My A Record to mydomain.xxx.com is pointing to IP address = xx.xx.28 . This is the Frontend Server.
I asked my DNS provider to create a PTR record for the reverse DNS. The did it.

However, I receive my emails thru the IP 28 in the FrontEnd server and relay Everything to the BackEnd server. I Send all my emails using the BackEnd server, which is in IP xx.xx.30.

After a couple of weeks, I started receiving errors because the IP "30" did not have a PTR record. I asked again the DNS provider to create a PTR record for IP 30 and they did.

NOW, I am receiving the following error:

 Relaying denied. IP name possibly forged

Do I have to create an A record pointing to my BackEnd Server ?  I don't want to open the Firewall for my BackEnd server to receive emails. It is a security risk I am not willing to take.

  • 2
  • 2
2 Solutions
Creating an A record does not equal opening your firewall.
Creating an A record allows the mail servers to verify fwd and rev DNS.
This is just a simple method to somewhat check the veracity of the email.

If the denial is from external mail servers it sounds as though you will need the A record for the BE server.
rgomez101Author Commented:
Thank you. So

For every mail server we need an A record and a PTR record ?

What if I am using 3 or 4 servers for the same domain ?  4 A Records and 4 PTR records ?

"IP name possibly forged"

You'll get this when the PTR record and the A record don't match. Meaning you do a reverse lookup on the ip and get the name...then do a forward lookup on that name and you should get the same ip you started with. If not some email software will bark at you saying there was a forgery.

Just make sure you have matching reverse and forward (PTR and A) records for all your mail server ip addresses.
"What if I am using 3 or 4 servers for the same domain ?  4 A Records and 4 PTR records ?"

The names of the mail servers are completely separate from the domain name associated with the email it is sending out.

You can have 50 email servers serving the "example.com" domain name:

Each server will have its own name and each need and A and PTR record.
rgomez101Author Commented:
Thank you very much.

This really answer my question. For the readers, you can have many A records and many PTR records for the same the Domain, but the first one will take priority 1 and so on.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now