2

We have setup a mail server and created the following DNS records. Assuming our domain is example.com:

A    @              10.0.0.5
A    mail           10.0.0.1
MX   example.com    mail.example.com

Note 10.0.0.1 is just an example. We are actually using a public IP address instead.

We have also had our hosting company setup a proper PTR record pointing to mail.example.com and 10.0.0.1.

For some reason, when people send up email, they don't deliver and have this message on the return mail message:

The recipient server did not accept our requests to connect. Learn more at https://support.google.com/mail/answer/7720 [example.com 10.0.0.5: timed out]

For some reason, instead of trying to connect to 10.0.0.1 email servers on the web are trying to connect to 10.0.0.5, our origin (@) address.

We don't want to point @ to our mail server if we can help is as we have a ton of CNAME records pointing to @ for web hosting purposes.

Have we incorrectly setup our DNS? What can we fix it?

3
  • 1
    Is the correct 10.0.0.1 IP address returned when you run nslookup mail.example.com? How long ago did you change these DNS records - remember that DNS changes can take up to 24 (sometimes 48) hours to fully propagate - whatsmydns.net should help with this. Sep 15, 2018 at 13:53
  • 2
    Also, are you sure that the record over at GoDaddy for mail is an A record? These records only accept IP addresses, so the value of mail.example.com for your A record cannot be valid. Sep 15, 2018 at 13:54
  • @brendonofficial thank you for the comments. Yes, nslookup mail.example.com returned correct IP address, but MX record was not being found. I fixed the errors in my question. Sep 16, 2018 at 0:25

3 Answers 3

4

Can you post the real domain and records? My immediate guess is that your MX record should just read mail.

Because you have mail.example.com without a . on the end, it is resolving to mail.example.com.example.com - I don't know why that would be resolving to your 10. address, but without seeing the real zone with the real entries we can't really tell.

1
  • 1
    Perhaps if it doesn't find the MX it will fall back to the address directly: example.com's IP.
    – A.B
    Sep 15, 2018 at 15:38
4

This is confusing:

A    @     10.0.0.5
A    mail  10.0.0.1
MX   10    mail.example.com

To me this reads as:

@      A    10.0.0.5
mail   A    10.0.0.1
       MX   10  mail.example.com

So you're creating an MX record for mail.example.com and not for example.com.

2
  • Thanks @Tom. This helped me indentify the problem, which was an incorrectly setup MX record. Sep 16, 2018 at 0:26
  • @SwisherSweet : can you mark my answer then as the solution?
    – Tommiie
    Nov 3, 2018 at 12:53
3

It turns out I had my MX record setup incorrectly.

I changed from this (GoDaddy fields):

Type      Host          Points to         Priority    TTL
MX        example.com   mail.example.com  10          1h

To this:

Type      Host          Points to         Priority    TTL
MX        @             mail.example.com  10          1h

Mail is now coming in and I am finding my MX record using MXToolbox.com.

1
  • Perhaps the host field had to contain the value example.com. instead. These web interfaces can be really annoying sometimes. In the "points to" field no trailing dot is required, but in the host field it is (this is my guess at least).
    – Tommiie
    Sep 16, 2018 at 7:43

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.