Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need some help on clarification of the reverse DNS and MX record setup. I wasn't able to find definitive answer on google. The case is following. Say I have domain "", I have a SMTP server named "", which is hosted by I want to send/receive mails from domain So I add MX record like this: MX

I also have A record, pointing to the server IP (suppose it is A

Now, I want to make sure my mails will be delivered, so I check reverse DNS for this. I got following results: -> DNS check resolves to, -> reverse DNS check resolves to

Now - does it mean that anty-spam reverse DNS check fails, because doesn't resolves back to BUT: it's a shared server, so it will never resolve to my - it will always resolve to - right? Does it mean the mail mail will be potentially marked as span? OR: the anti-spam filter will do one more DNS check, checking IP of -> DNS check resolves to

so it will decide that reverse DNS matches? Which one is true?

Perhaps I should do it different way, I should point my MX record directly to, this way: MX

Then resolves to, and resolves to, so everything is ok, right? (The only problem is that I'm not sure how stable is this "" domain name - maybe they change it from time to time, and sometimes it is "", and such setup will fail?)

share|improve this question
aslong as your domain has the mail.domain A entry pointing to the ip and the mail.domain MX record point to the right domain and the ip is a static ip with the PTR well assigned to a FQDN youre fine to send emails. if the PTR reverses to something not well defined it will be verifyed on most MTAs before being accepted and besides that most IP ADDRESS are checked against RBLS to ensure they are not spammers, besides those there are aswell other verification which vary from server to server, so i don't belive your email will be marked as spam, but it also depends on it is content. – Prix Aug 23 '10 at 12:11
up vote 1 down vote accepted

I think you are confusing incoming and outgoing mail exchangers. I'll try to answer your question by treating both separately:

Incoming mail

When another MTA has a message for $localpart@$yourdomain it does a DNS query (type MX, data $yourdomain). The answer is get is mail.$yourdomain (and probably also it's IP). It uses this to connect to your machine on port 25 and try to deliver the mail. Since the other machine is sending (not accepting), it will not to anti-spam checks based on your machine.

Outgoing mail

You want to send an e-mail from $localpart@$yourdomain to somebody else. Your machine (this does not have to be the same as the MX record) connects to the remote mail server and tries to deliver the mail. Now the remote machine will do anti-spam checks. It has two pieces of information from your machine: The 'HELO/EHLO name' and the IP address.

Nowadays most servers demand that the 'HELO name' is a fully qualified domain name and that it resolves to your IP address. Some demand that your IP address has reverse DNS that does not look dynamic (like I have encountered some servers that applied rate-limiting or greylisting when the 'HELO name' did not match the reverse DNS, but never full rejection.

My recommendations

  • Keep your MX record as mail.$yourdomain.
  • If you also use this machine for outgoing mail, set the 'HELO name' to mail.$yourdomain.

A shared machine for outgoing mail is far from ideal, abuse from other users can easily get you on DNS-bases blacklists.

share|improve this answer
To make it sure I understand correctly: If my web server running some Java service tries to send notification mail to say "", and it uses server as SMTP server, then the HELO/EHLO conversation occurs between myprovider and gmail server (not between myprovider and my web server), right? Then I probably have no much control on what myprovide sends in HELO message, but probably it sends "", so reverse DNS should return the same. – Greg Aug 23 '10 at 13:38
@Greg Yes, you'll just have to assume that your provider has a properly configured mail server. – schot Aug 23 '10 at 14:02

You have a higher likelihood of becoming spammed if your hostname is an IP address (or contains a string similar to an IP address such as, if the hostname doesn't point to your server, or if you don't have reverse DNS setup.

As far as I am aware, as long as the reverse DNS points to a hostname which resolves to your server, and as long as your hostname is a hostname which resolves to your server, you will be fine. It doesn't matter if the reverse DNS and the hostname is different as long as they point to the same place.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.