Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

Sendmail debug output

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


(root)> dig mx

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

;                    IN      MX

;; ANSWER SECTION:             600     IN      MX      10             600     IN      MX      20             600     IN      MX      30             600     IN      MX      40             600     IN      MX      50

;; AUTHORITY SECTION:             33524   IN      NS             33524   IN      NS

Sendmail log entry

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

Sendmail with -d17 (times out)

sendmail -v -d17.20
Running /var/spool/mqueue/r8KFB1VF002503 (sequence 1 of 1)
hostsignature(): getmxrr() returned 1, mxhosts[0]
hostsignature( =
hostsignature(): stab( found
<>... Connecting to 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' | sendmail -bt -d8.20 – Andrzej A. Filip Sep 20 '13 at 6:58
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

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

Your sendmail log entry keeps talking about "", which indicates sendmail not completely configured. is a typical placeholder domain, as is

(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

Your Answer


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.