[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] [Raq4] host name lookups in sendmail - server appends defaultdomain to unsuccessful lookups



Chris Bell wrote:

> I'm a bit rattled by sendmail and can't really get my head around it, so I
> was hoping someone can point me in the right direction.

I really don't think this is a sendmail issue.

> In both cases, when the MX lookup on the domain fails, the system seems to
> assume that it is in fact a host name, and my own domain gets appended to
> the end of it:

Here's what the book "Linux Sendmail Administration" says...

"When Sendmail has mail to deliver, it queries DNS for the MX records
for the hostname in the e-mail address.  It then sorts those MX records
by preference number.  Thus, the lower the preference number, the
earlier in the list a server appears, which makes servers with low
preference numbers preferable to servers with high preference numbers.

"Sendmail then tries to deliver the mail to each mail server in order. 
It stops processing the list if it finds a server that will accept the
mail or if it finds its own hostname in the mail exchange server list. 
If it cannot deliver the mail to any of the servers, it will use the
address of the host and attempt to deliver directly to that host."

It's that last sentence that says if it can't deliver to a mailserver
designated by an MX record, it will try to deliver directly to the host.

So, if you're sending mail to ojay@xxxxxxxxxx and there's no MX record
for hotmail.com.au, sendmail will try one.net.au.

>          ----- The following addresses had permanent fatal errors -----
>          <ojay@xxxxxxxxxxxxxxxxxxxxxxxxxx>
>          (reason: system config error)

Why did it append your domain name on the end?  I'm not sure yet.  It
might be a DNS error somewhere.  Are you using wildcard DNS for
blueskyhost.com?  This question would be better asked on the MailHelp
mailing list.  To subscribe, send "subscribe mailhelp" in the subject
line to listar@xxxxxxxxxxxxxx  The archives are located at
http://www.moongroup.com/old/archives.php.

> I would rather the bounce message say something along the lines of "MX
> lookup failed for [domain]".

It's not going to do that.  What it should say is that the domain is
unreachable.  Would you settle for that <wry grin>?

> Is this a sendmail or a DNS issue?

I think it's a DNS issue, but I'd still ask at the Mailhelp list.

> Does sendmail use nslookup to do it's lookups?

No, nslookup is merely a (deprecated by now) tool to query DNS. 
Sendmail uses your system-defined resolver to look up DNS, just as
nslookup does.

> Should I be looking in the nslookup configuration, or in
> sendmail.cf (which I might add makes very little sense to me when I look at
> it!)?

sendmail.cf is not meant to be looked at by humans; it's machine code
<smile>, included in sendmail when it runs.  Sendmail is configured by
changing the .mc files, but you probably don't want to do that until
you've read a few books either <smile>.

> Any advice or links to relevant info appreciated.

Try asking the question at Mailhelp.  Try looking up the archives.  Try
looking up the problem at sendmail.org.  It's NOT a RaQ issue.

Jeff
-- 
Jeff Lasman <jblists@xxxxxxxxxxxxx>
Linux and Cobalt/Sun/RaQ Consulting
nobaloney.net
P. O. Box 52672, Riverside, CA  92517
voice: (909) 778-9980  *  fax: (702) 548-9484