I'd like to run my own email server, but yikes! It's so hard, it's as if email configuration is the latin/greek of the internet..


My ISP set up a reverse dns DNS (PTR) entry for mx.[mydomainname].com

Per advice online I changed smtpd_banner = mx.[mydomainname].com ESMTP in /etc/postfix/main.cf.

But when I test my email server with http://xeams.com/validation.htm

Still it tells me that the reverse lookup fails.

Reverse Lookup: FAIL Connecting IP resolves to mx.[mydomainname].com, which does not match with HELO string

Also I've checked the EHLO message using telnet [mydomainname].com 25 to verify that it contained the specific reverse lookup mx.[mydomainname].com, tried again after editing it to match exactly.

Each time after rerunning the validation report it says the same thing.

Reverse Lookup: FAIL Connecting IP resolves to mx.[mydomainname].com, which does not match with HELO string

--- this is perplexing and if anyone can help I'd appreciate it.


After editing my config so that my hostmane in postfix is mx.[mydomainname]

And trying also when hostname in postfix is [mydomainname]

Ensuring to reload and with

DNS record config:

  • A |[mydomainname] | [my.static.ip.address]
  • A |mx.[mydomainname]| [my.static.ip.address]
  • MX |mx.[mydomainname] | [mydomainname]
  • TXT |mx.[mydomainname] | v=spf1 a mx ~all
  • TXT |mail._domainkey.[mydomainname] | v=DKIM1; k=rsa; p=...keycode

Both cases I'm getting this bounce back when I try to do the validation test...

<validate.server@synametrics.com>: host mailbk.synametrics.com[]
    said: 550 5.1.1 <validate.server@synametrics.com>... User unknown (in reply
    to RCPT TO command)

I'm not sure if I need give the MX records I edited time to propagate. If the DKIM set to mail. is a problem, or what kind of trouble I'm in.

  • 550 5.1.1 <validate.server@synametrics.com>... User unknown (in reply to RCPT TO command) - means there is no such email destination. Did you try to set up validation? Email validation is not standartized and nobody is required to support it. Use it at your own risk. I don't do this, because often mail comes with "noreply" envelope from's, which aren't supposed to receive mail. – Nikita Kipriyanov Oct 23 '19 at 13:48
  • @NikitaKipriyanov Thanks kindly for your help I found an answer that improved the validation state of my server. (see below) – Kickaha Oct 23 '19 at 15:45

That was a wrong advice.

smtpd_banner, as it is clear from the name, configure Postfix's smtpd server processes. It it the server processes, which listen to incoming connections on port 25, and probably on other ports if you enabled them (like submission service).

What you need is set up how postfix smtp client process introduces itself when it connects to another system to their port 25 (or another port if you configured it so in transport_maps). The value it uses for that is smtp_helo_name which by default is set to myhostname.

I advise to change myhostname, because it is used in many places as a template. That way it will affect many other settings in the right way. For example, smtpd_banner by default also depends on it and will be set in sync with other settings.

UPD: by the way, Postfix manual (man 5 postconf) also says about smtpd_banner:

You MUST specify $myhostname at the start of the text. This is required by the SMTP protocol.

this also could have directed you to the idea that original advice was strange and you have to do something with myhosname. Always check other's advices with manual. Mine too!

| improve this answer | |
  • Okay, I suspect my MX record is misconfigured in DNS. Must the hostname match the MX record exactly. At the moment it's [mydomainname].com should it be mx.[mydomainname].com? – Kickaha Oct 23 '19 at 11:35
  • Is mail.[mydomainname].com expected ? – Kickaha Oct 23 '19 at 11:36
  • By the RFC reverse DNS record should exist, and nothing is said about its value. But often servers are configured so tightly so they wouldn't accept mail if name specified in PTR doesn't resolve back to same IP for which PTR was quieried. It is best to have PTR and A records to be exactly mirrors of each other (so, "host.name A so.me.ip.address" and "address.ip.me.so.in-addr.arpa PTR host.name"), and also have in Postfix myhostname set to that "host.name". – Nikita Kipriyanov Oct 23 '19 at 11:38
  • Thanks for the help! i think i'm closer but may have over-complicated things. I've updated my question with more details if you have any more time I'd appreciate more advice... – Kickaha Oct 23 '19 at 12:53

My Solution ---

I found the hint i needed in the mail logs

sudo tail -f -n20 /var/log/mail.log

host host3.synametrics.com[] said: 451 Message rejected. Sender's domain does not have any MX record. (in reply to end of DATA command)

So I added a mx record to DNS without any prefix/subdomain.

  • MX |[mydomainname] | [mydomainname]

I also kept this mx record with mx. prefix to match the reverse DNS PTR

  • MX |mx.[mydomainname] | [mydomainname]


and the previous bounce back

<validate.server@synametrics.com>: host mailbk.synametrics.com[]
    said: 550 5.1.1 <validate.server@synametrics.com>... User unknown (in reply
    to RCPT TO command)

was because mydestination in \etc\postfix\main.cf used the variable $myhostname which is now set as mx.[mydomainname] for the PTR revese lookup also needed to be [mydomainname] to be allowed to relay.


Now I'm worried that having 2 mx records for the same server will cause a problem. That's a different question but a comment is welcome if you know!

| improve this answer | |
  • 1
    Two MX to a same server should not cause any problems. – Nikita Kipriyanov Oct 25 '19 at 16:39
  • Excellent! I wasn't sure if one would block the other in the case of simultaneous incoming. Thanks :) – Kickaha Oct 26 '19 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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