Reverse DNS is not a valid hostname

39,233

Solution 1

Basically, will the reverse DNS pointing to a subdomain of the domain the mail server reports be valid?

No. Just give your server a full name like myserver.mydomain.com. Make sure your reverse DNS also contains myserver.mydomain.com, and that the mailserver announced itself (with HELO) as myserver.domain.com as well.

Technically, you could have it be mail.domain.com, but that means the non-FQDN hostname of the machine would be mail, which is not elegant.

Don't have your hostname be domain.com, (I feel that) the domain should be the organizational entity, not a hostname.

Solution 2

Both the hostname that the mail server software reports and the reverse DNS entry are expected to be the actual canonical fqdn hostname (as discussed in the referenced question for the reverse dns case).

However, it's usually not verified that these two values actually match (even though it makes more sense if they do).


Do note that there is no expectation for the hostname specified in either of these places to necessarily have any relation to the domain names that the mail server accepts mail for or sends mail from; it identifies the mail server itself, not the domains it handles.

Share:
39,233

Related videos on Youtube

ConnorJC
Author by

ConnorJC

Updated on September 18, 2022

Comments

  • ConnorJC
    ConnorJC almost 2 years

    I help a friend run a server, which includes a mail server. http://mxtoolbox.com reports that our reverse DNS is not a valid hostname.

    The reverse DNS currently points to domain.com. Should it point to hostname.domain.com? I have seen here that it is conventional to use this scheme for reverse DNS. However, will this cause a problem if the mail server responds like this:

    220 domain.com ESMTP Postfix (Ubuntu)
    EHLO PWS3.mxtoolbox.com
    250-domain.com
    250-PIPELINING
    250-SIZE 10240000
    ...
    

    Basically, will the reverse DNS pointing to a subdomain of the domain the mail server reports be valid?

    EDIT: My original question was as follows: If the mail server reports domain.com as its FQDN, can the reverse DNS point to hostname.domain.com? See comments below for why this isn't needed, and why both should be the same.

    • ConnorJC
      ConnorJC almost 9 years
      Not really. I wanted to know if hostname.domain.com is valid as reverse DNS for mail to/from domain.com, while the other post wanted to know what their reverse DNS should be. My answer uses the other post's answer and asks a question about it.
    • Håkan Lindqvist
      Håkan Lindqvist almost 9 years
      Ok, in that case can you please clarify why you want the mail server to report anything but the hostname in the first place? Ideally the hostname that the MTA reports should be the actual hostname, just like the reverse dns entry.
    • ConnorJC
      ConnorJC almost 9 years
      Well, before @Halfgaar answered my previous questions, I overlooked that SPF is used for validating whether a server is allowed to send mail for domain.com, not the reported FQDN. I originally assumed the server would have to report domain.com to send mail for domain.com. As I recently realized, I could use v=spf1 mx -all as the SPF record to allow the other machine to send mail. This was clarified in the comments of the accepted answer.
  • ConnorJC
    ConnorJC almost 9 years
    The mail server has to announce itself as serving domain.com to send emails like [email protected] though, right? If the mail server announces itself as myserver.domain.com, won't the email addresses need to be [email protected]?
  • ConnorJC
    ConnorJC almost 9 years
    Also, I'm not sure what you mean by not having my hostname as domain.com, do you mean the FQDN? Currently the hostname of the mail machine is vps1, so the reverse DNS should point to vps1.domain.com instead of domain.com, correct?
  • joeqwerty
    joeqwerty almost 9 years
    The mail server has to announce itself as serving domain.com to send emails like [email protected] though, right? If the mail server announces itself as myserver.domain.com, won't the email addresses need to be [email protected]? - No. That's what SPF records are for.
  • joeqwerty
    joeqwerty almost 9 years
    Yes and Yes. To clarify: An MX record designates where email goes TO. An SPF record designates where email comes FROM.