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 get this error when checking my DNS with an external tool:

Spam recognition software and RFC821 4.3 (also RFC2821 4.3.1) state that the hostname given in the SMTP greeting MUST have an A record pointing back to the same server

It essentially states this path: -> -> (IP of main server) ->

Now my postfix greeting appears as so:

$myhostname ESMTP $mail_name

Is the problem because $myhostname is and that is re-pointing to and THEN to my main server? I think I should change it to $mydomain

I would like to get some insight before I edit yet another DNS entry incorrectly.. Thanks

share|improve this question
up vote 2 down vote accepted

The error message seems clear to me:

The DNS serving your zone must contain an A record (or AAAA if IPv6 but not a CNAME) equal to the hostname contained in the greeting message sent by your SMTP server. That's a requirement of RFC 2821.

In your case, if the hostname announced by your smtp server is "", then anybody must be able to resolve

You can check your DNS records using dig. The result should be the following:

dig A +noall +answer       
;; global options:  printcmd 3600   IN      A

Your DNS zone and SMTP configuration must be set in adequation.

share|improve this answer
+1 It's also worth mentioning that it may take some time until your test tool updates their cached DNS records, if you have just added a new A record. – Groo Jun 7 '11 at 6:48

Well I answered my own question there, $mydomain (i.e. should be used instead of $myhostname ( I had seen this asked a lot but could not find any answered in search engines, so I guess I will leave this here. :)

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.