Reverse DNS Lookup – How It Works with Spam Filters

domain-name-systememailreverse-dnssmtpspam

I have heard that most spam filters use a reverse DNS lookup on the originating IP address of the sending SMTP server (or something like that) as part of the verification process. I want to make sure my emails will pass this check. How exactly can I verify that my emails are OK?

In researching it, I've noticed that if I look at the header of a valid email message coming from Gmail, I will see something like this:

Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185])
        by mx.google.com with ESMTP id 10si2346996pxi.164.2009.07.22.22.26.19;
        Wed, 22 Jul 2009 22:26:19 -0700 (PDT)

When I do an nslookup on 209.85.222.18, it responds with mail-pz0-f185.google.com, which is what I would expect. If it responded with a different domain, then I assume that would indicate a problem and it would fail the check.

Is this what the reverse DNS lookup is all about or am I barking up the wrong tree?

Best Answer

The test isn't normally comparing against the SMTP envelope (like you describe as your eyeball-based process), but finding the reverse DNS hostname of the connecting host (if any), running that through forward DNS and seeing if it resolved back to the original IP number.

So what you need is 1) to have reverse DNS set up (for the first step) and 2) to have it set up correctly (for the second step).

There's nothing to stop anyone from comparing with the SMTP envelope as well, even if that's frequently seen as too paranoid, so you'd also want anyplace your hostname appears in your mail transmission to use the DNS name that appears in your reverse DNS.