What does this bounce message indicate 'unable to get mx info: failed to get IPs from PTR record: lookup <nil>: unrecognized address' when trying to send emails?

What does the this bounce message mean?

unable to get mx info: failed to get IPs from PTR record: lookup <nil>: unrecognized address

It means that SendGrid was unable to find an MX record or A record when looking up the recipient domain in order to deliver the email. 


What is MX record and why is it required for SendGrid?


MX (Mail Exchange) records are necessary to send emails because they play a critical role in the email delivery process. When you send an email to someone, the email needs to be routed to the correct mail server responsible for handling incoming emails for the recipient's domain. MX records are DNS (Domain Name System) records specifically designated to identify the mail servers responsible for receiving emails for a domain.


Now let's break down the error message:

  • "Unable to get MX info": This means that the system or application was unable to obtain the MX record information for the specified domain.

  • "Failed to get IPs from PTR record": The error suggests that there might be an issue with obtaining IP addresses from the PTR (Pointer) records. PTR records are used to map IP addresses to domain names.

  • "Lookup <nil>: unrecognized address": This part of the error message indicates that there was a problem with the lookup process, and it resulted in an unrecognized or nil (null) address.

 

Possible causes and solutions:

  • DNS Configuration Issue: The DNS configuration for the domain might be incorrect or missing. Ensure that the domain has valid MX records, and they are correctly set up to point to the correct mail servers.

  • PTR Record Issue: The error message indicates a problem with PTR records, which are related to reverse DNS lookups. PTR records are typically managed by the owner of the IP address range, not the domain owner. However, it's essential to have properly configured PTR records to avoid issues with email delivery. If you are not the owner of the IP address range, you may need to contact your internet service provider or the responsible party to check and fix the PTR records.

  • Temporary DNS Issue: Sometimes, DNS lookups can fail due to temporary network or DNS server issues. Try again later to see if the problem persists.

  • Software or Application Issue: The error may be specific to the application or tool you are using to query the MX records. Ensure that the application is correctly configured and up-to-date.


What can you do?

To diagnose the issue further, you may want to use standard command-line tools like nslookup or dig to manually query the MX records for the domain in question. 

nslookup -type=mx example.com

For example, using the above command in the terminal you can see how the results look like on a domain that has MX and no MX records.

# For the domain sendgrid.com (That has valid MX records)

nslookup -type=mx sendgrid.com

Server: 192.168.1.1

Address: 192.168.1.1#53


Non-authoritative answer:

sendgrid.com mail exchanger = 10 mxa-0023de01.gslb.pphosted.com.

sendgrid.com mail exchanger = 10 mxb-0023de01.gslb.pphosted.com.

# For the domain aboutpriya.com (That has no MX records)

nslookup -type=mx aboutpriya.com (That has no MX records)

Server: 192.168.1.1

Address: 192.168.1.1#53


** server can't find aboutpriya.com: NXDOMAIN


You can also use a third party tool like MXToolBox where you confirm that this address has valid MX records installed.

If you are still unable to resolve the problem, consider seeking assistance from the recipient domain administrator or their IT support team to investigate and troubleshoot the issue further.

Note: Please keep in mind that the explanation may not be completely accurate as some of them can mean different things. 

Have more questions? Submit a request