Error with mail server in DNS record, "Host found but no data record of requested type"

dash-dns
nameserver
email
mx
#1

We set up a Postfix email server on our website server, and can send emails, but can’t receive emails there, getting this error on returned emails:
Host or domain name not found. Name service error for name = mail.humortimes.com type = A: Host found but no data record of requested type

We set up an MX record for the emails, but want only emails with the subdomain of "@subs.humortimes.com" to be served by it. Emails going to "@humortimes.com" are already handled by our server host’s email server. The MX record is set up like so:
MX - subs - mail handled by mail.humortimes.com - we tried mail.subs.humortimes.com too.

The subdomain has a CNAME record set up, but the error message refers to a “type A”, which I assume is the A record. But we can’t set up a separate A record for it, since it uses the same ip as the domain.

On the Linux Centos 7 server we have, we have set up the resolv.conf file with the line “domain subs.humortimes.com” and the namerserver with the correct ip for the server.

I did a “dig mx subs.humortimes.com” check on the server, which seemed to indicate that the DNS is working okay. The “ANSWER” section says “subs.humortimes.com. 300 IN MX 10 mail.humortimes.com.”

What should we do to get this working?

#2

Your MX configuration appears to be correct, however you do not have a record for mail.humortimes.com. You will need to create this otherwise the MX record for subs wont point anywhere.

#3

Should it be another MX record? Or could I just change the MX named ‘subs’ to ‘mail’, so that it can be accomplished with just one MX record? Or do you mean a CNAME record for mail.humortimes.com? If that’s what you mean, I already have one for subs.humortimes.com, could I just make an MX record for that? Or could it be mail.subs.humortimes.com? It’s all very confusing.

Thanks for your help.

#4

You need an A record for mail.

Once you understand it it is pretty straightforward. The MX record specifies the host of the email server for the domain you want to receive email for. In your case this is the subs domain and the mail host. However the host you specify obviously needs to resolve to something (which it doesnt in your case and which is the problem) and thats why you need the A record for.

#5

Okay, great, thank you, it’s starting to make sense. However, when I try to do an A record, it gets rejected if it’s the same ip, which this would be (same as humortimes.com). It only takes ip addresses, not anything like mail.humortimes.com (gives the error: “You must enter a valid IPv4 address.”)

Also, since I want only email going to subs.humortimes.com to be affected, should I change the MX record to subs.humortimes.com or mail.subs.humortimes.com? Or leave it as it is?

And, does the entry under “name” matter? (First column after “MX”.)

#6

Yes, an A record requires an IP address. I am afraid I am not quite sure what you are trying to do.

You need to create an A record for mail and point it to the IP address of your mail server.

Maybe post a screenshot of what you are trying to enter.

#7

Ah, the A record worked. Now, I get a warning about the MX record (screenshot attached)

mail.humortimes.com, same if I change it to subs.humortimes.com, however mail.subs.humortimes.com works without a warning. Is that how I should leave the MX record then?

#8

Again, your MX record is fine and does not need any changes. You need to create the A record which is not shown in your screenshot.

#9

Here’s a screenshot showing both. I changed the MX record, because of the warning to what you see. Do you think this will work?

#10

Well, now you do have the A record but also changed the MX record to mail.subs.humortimes.com and now that record does not exist.

#11

Well, what about that warning if I change it back? Sounds pretty ominous: “This record is exposing your origin server’s IP address, potentially exposing it to denial of service.” How do I resolve this problem?

#12

The warning is something you wont be able to avoid. The host behind an MX record will always have to be visible as it cannot be proxied via Cloudflare. All you could do is point it to move your mail server to another IP address (than your webserver’s) and “expose” that one instead.

1 Like
#13

Okay, it’s getting confusing again. Why do the other MX records not have warnings then? And how can I point it to another IP address? You don’t mean ‘fake’ it somehow, I’d have to obtain another one? And if that one is exposed, how does that help me? Just because it’s not the webserver’s address, therefore, they can’t do a denial of service to my website?

Is there any other way out of this mess?

#14

The other MX records do not point to records which are managed by Cloudflare, so they are automatically “exposed” or not (depends on your point of view). They simply are not managed by Cloudflare, hence no warning.

You cant use a fake address you need to point it to the address where you mail server is running. That is right now probably the same machine as where you webserver is running and in that way you’d “expose” that address, hence the warning. If you want to keep your webserver behind Cloudflare you will need to contact your host and ask for a second IP address or point it somewhere completely different.

#15

Okay, thanks for all your help.

closed #16

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.