1

My server has two domains, example.com and example.org.

example.com using my server to send emails. example.org is a virtual domain. And it uses Google Workspace(Gmail) to send emails.

I see this https://support.google.com/mail/answer/81126?hl=en which asks me to "set up valid reverse DNS records of your IP addresses that point to your domain".

I ask the server admin, he said "Your server only has one IP assigned, and the PTR points to the server's hostname server.example.com, as it must."

Does that means the reverse DNS record for example.com is setup correctly?

How about example.org? How to setup reverse DNS record since it shares the same IP as the example.com?

2
  • 2
    both domains has to have valid ptr records for mx entries. if you using mx.example.com for example. org as mx entrie then one would be enough aslong as you setup the spf records correctly. I own around 30 domains and use one and the same mx entry for all domains
    – djdomi
    Commented Jul 31, 2022 at 9:33
  • @djdomi Thank you. For example.org, I use the mx records provided by Google Workspace. Based on HBruijn's answer, only reverse DNS record from my IP to the host name is required.
    – alancc
    Commented Aug 2, 2022 at 7:07

1 Answer 1

4
+50

Should I create reverse DNS record for a virtual domain?

No.

You can't actually. In practice there can only be a single reverse DNS record for an IP-address.

That reverse DNS record should match the hostname you assign to the server. Also the corresponding forward DNS record for that hostname should exist and match.

(Related: although there can be many, unlimited even, forward DNS records pointing to the servers IP-address(es), the operating system on a server can only be configured with a single hostname anyway. )


(Multiple reverse DNS records can technically be created, but they would work as round-robin records and definitely won't have the effect and result you would expect and need.)


In response to your comment:

Using the following DNS records for example.com :

example.com.         IN MX 1 server.example.com.
example.com.         IN A    198.51.100.2
server.example.com.  IN A    198.51.100.2
example.com.         IN TXT  "v=spf1 a mx -all" 

2.100.51.198.in-addr.arpa.  IN PTR server.example.com.

and the following for example.org

example.org.         IN MX 1 server.example.com.
example.org.         IN A    198.51.100.2
example.org.         IN TXT  "v=spf1 a mx -all" 

should effectively be no different to using

example.org.         IN MX 1 mail.example.org.
example.org.         IN A    198.51.100.2
mail.example.org.    IN A    198.51.100.2
example.org.         IN TXT  "v=spf1 a mx -all" 

and/or

example.com.         IN MX 1 mail.example.com.
example.com.         IN A    198.51.100.2
mail.example.com.    IN A    198.51.100.2
server.example.com.  IN A    198.51.100.2
example.com.         IN TXT  "v=spf1 a mx -all" 

Some people prefer to use example.org. IN MX 1 server.example.com. as that reduces your administrative burden when you have many domains on a single mail server. When mail related DNS changes need to be made, they only need to be made for the server.example.com. DNS record.

Other people prefer to always use in-zone MX records, for cosmetic reasons and because that is more efficient to resolve.

Your mail server will use its hostname server.example.com. to identify itself as server.example.com. in the EHLO/HELO handshake when sending and receiving mail. That hostname must correspond with the reverse DNS record when the receiving SMTP does a reverse lookup of your servers IP-address. Some mail servers will immediately reject your mail when that reverse lookup can't be made or fails, others will "only" increase your spam score.

3
  • I think your answer is correct. However, I also see djdomi's comment. How do you think about his comment?
    – alancc
    Commented Aug 2, 2022 at 7:08
  • 1
    Basically he says what I mean ;)
    – djdomi
    Commented Aug 2, 2022 at 17:18
  • Thanks to all of you. :)
    – alancc
    Commented Aug 3, 2022 at 8:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .