Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Anyone able to explain this problem? I can do a dig or nslookup on a host and get the MX servers, but when I check through sendmail it fails?

RHEL 5.6

Sendmail:

(root)> sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /mx google.com
getmxrr(google.com) returns 0 value(s):

Sendmail debug output

(root)> echo '/mx google.com' | sendmail -bt -d8.20
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> getmxrr(google.com, droplocalhost=0)
getmxrr(google.com) returns 0 value(s):

Dig:

(root)> dig mx google.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-14.P1.el5 <<>> mx google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2247
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 9

;; QUESTION SECTION:
;google.com.                    IN      MX

;; ANSWER SECTION:
google.com.             600     IN      MX      10 aspmx.l.google.com.
google.com.             600     IN      MX      20 alt1.aspmx.l.google.com.
google.com.             600     IN      MX      30 alt2.aspmx.l.google.com.
google.com.             600     IN      MX      40 alt3.aspmx.l.google.com.
google.com.             600     IN      MX      50 alt4.aspmx.l.google.com.

;; AUTHORITY SECTION:
google.com.             33524   IN      NS      ns3.google.com.
google.com.             33524   IN      NS      ns4.google.com.
...

Sendmail log entry

Sep 20 00:42:26 myhost sendmail[26714]: r8K0gLUS026712: to=user@example.org, ctladdr=user@myhost.com (500/500), delay=00:00:05, xdelay=00:00:05, mailer=example, pri=152798, relay=example.org, dsn=5.1.2, stat=Host unknown (Name server: example.org: host not found)

Sendmail with -d17 (times out)

sendmail -v -d17.20 -qR@gmail.com
Running /var/spool/mqueue/r8KFB1VF002503 (sequence 1 of 1)
hostsignature(gmail.com)
hostsignature(): getmxrr() returned 1, mxhosts[0]=gmail.com
hostsignature(gmail.com) = gmail.com
hostsignature(gmail.com)
hostsignature(): stab(gmail.com) found gmail.com
<me@gmail.com>... Connecting to gmail.com via esmtp...
share|improve this question
    
AFAIK, both dig and nslookup use their own DNS client resolver, not the DNS client resolver of the machine you're running them from... so I would look at the DNS client resolver on this machine. –  joeqwerty Sep 20 '13 at 3:12
    
Could you post sendmail log entries? –  Andrzej A. Filip Sep 20 '13 at 4:51
    
dig and nslookup will get the resolver information from resolv.conf, unless it is otherwise specified. –  Falcon Momot Sep 20 '13 at 6:49
    
The following command should provide more details incluing sendmail's resolver options : echo '/mx google.com' | sendmail -bt -d8.20 –  Andrzej A. Filip Sep 20 '13 at 6:58
1  
Any strange DNS settings on the box? What do you have specified in /etc/hosts and /etc/resolv.con and /etc/nsswitch.conf (be sure to scrub the output for confidential info before posting). –  Mike B Oct 2 '13 at 22:14
show 6 more comments

1 Answer

Would rather post this as a comment, but I can't.

Your sendmail log entry keeps talking about "example.org", which indicates sendmail not completely configured. example.org is a typical placeholder domain, as is user@myhost.com.

(That is assuming you didn't selectively mangle/censor it yourself -- if that's the case, that a) makes it difficult to extract meaningful information and b) should at least be done consistently)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.