5

I need to send mail from sub.domain.com but delivery to one address fails with an error "R=lookuphost defer (-1): host lookup did not complete".

Additional information that might be relevant: My /etc/resolv.conf contains nameservers of a VPS provider (different from domain provider's nameservers). I also checked DNS records of the addressee and found out there was no MX record for it.

5
  • 3
    You should explain what the problem is, not what you think the solution is. Mar 31, 2014 at 14:42
  • 1
    1. Just because there is no MX record, it does not mean that mail cannot be sent there an A record is valid in absence of an MX record. 2. Does this VPS provider's DNS do recursive lookups for you?
    – NickW
    Mar 31, 2014 at 16:02
  • @NickW I think it does not do recursive lookup. I checked it by "host mysubdomain.domain.com vps_providers_nameserver" and it returned REFUSED; also dig nameserver mysubdomain.domain.com returned "recursion requested but not available" Mar 31, 2014 at 16:43
  • 1
    That's not good, you want to configure a DNS server that will do recursive lookups for you, especially if you want to run a mailserver.
    – NickW
    Mar 31, 2014 at 16:49
  • thank you @NickW I can't upvote your comments but you've been very helpful Mar 31, 2014 at 17:50

1 Answer 1

5

check if MX DNS resolution fails from your side or not with mxtoolbox.com

  • if you don't have MX results. exim should fallback to A record. cf exim FAQ (check Q0311 too)

use exim -bt -d-resolver [email protected] to diagnose exim mail routing

  • if yes. it means DNS resolution fails on your side.

run nslookup -type=MX example.org on your server. and check if you get MX records answers.

if not, try the same request but specify a well known nameserver, like google public dns: nslookup -type=MX example.org 8.8.8.8

you should now get some MX results, and it means your nameserver is not working properly. So you can change your resolv.conf to a nameserver that works properly (provider, google dns, what you want, ..) or setup your own

5
  • thank you! If I don't get any MX results for subdomain.example.com but get them for example.com, does it count? Mar 31, 2014 at 17:35
  • Not to my knowledge. the only one fallback is A record
    – exeral
    Mar 31, 2014 at 18:18
  • 1
    one last question! if exim -bt -d-resolver [email protected] succeeds but exim -bt -d-resolver [email protected] fails, doesn't it mean that the problem is with example2.org and not with me? Mar 31, 2014 at 18:40
  • 1
    besides, when I do dig @8.8.8.8 example2.org I get status: SERVFAIL and no answer section. And example2.org is the only domain I'm having such problems with, all my other addressees are able to get emails from me Mar 31, 2014 at 18:49
  • 1
    it means the nameserver of example2.org is unreachable, misconfigured. the problem is not on your side
    – exeral
    Mar 31, 2014 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .