Operating System - HP-UX
1834513 Members
2130 Online
110068 Solutions
New Discussion

inconsistent sendmail errors (returned mail:host unknown)

 
SOLVED
Go to solution
BradF
Frequent Advisor

inconsistent sendmail errors (returned mail:host unknown)

I an having an inconsistent problem with sendmail.

Occasionally I get returned mail with the subject: "Returned mail: host unknown (Name Server: example.com.: no data known)
I have PHNE_24419 sendmail(1m) 8.9.3 patch installed. I updated my sendmail.cf with the file included with the patch.

Looking at /var/adm/syslog/mail.log if an email is sent to test@example.com sometimes the relay=mail.example.com (this works) and sometimes the relay=example.com (this doesn't work)

When I get returned email the relay is example.com. I have DNS setup and it is set to first look at files. I have mail.example.com set in the /etc/hosts file.

Thanks, -Brad
(example.com is just an example and not the real address that is being sent to.)
3 REPLIES 3
Jordan Bean
Honored Contributor

Re: inconsistent sendmail errors (returned mail:host unknown)


From the sendmail host, what do either of these report:

dig example.com. mx in

nslookup -type=mx example.com.

and what are the values of DS, DH, DR, etc from the sendmail.cf?

BradF
Frequent Advisor

Re: inconsistent sendmail errors (returned mail:host unknown)

OV#nslookup -type=mx example.com
Using /etc/hosts on: server1

looking up FILES
Trying DNS
example.com preference = 10, mail exchanger = mail.example.com
mail.example.com internet address = 10.1.45.72

entries in sendmail.cf:
# "Smart" relay host (may be null)
DS
# who I send unqualified names to (null means deliver locally)
DR
# who gets all local email traffic ($R has precedence for unqualified names)
DH

My domain server is a local internal NT server. Sometimes the relay=mail.example.com and sometimes relay=example.com. It does this for the same domain name... I am sending snmp email to an internal server.
Jordan Bean
Honored Contributor
Solution

Re: inconsistent sendmail errors (returned mail:host unknown)


Sorry about the wait.

I forgot to ask for sendmail -d0, but I'll assume that this host is not mail.example.com, but rather a mail client within the domain.

It would appear that DNS queries are occasionally timing out.

If this host really only needs to send mail and never receive, then perhaps it would be prudent to set DS,DH,DR to mail.example.com (eg DSmail.$m) to force all mail off to your master relay. Please follow this link for more information:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x94c40bce6f33d6118fff0090279cd0f9,00.html

While this may prevent sendmail from using DNS to resolve mail.example.com, it still doesn't resolve the problem with the presumed timeouts.