Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sendmail hostname lookup

73 views
Skip to first unread message

Stefan Verbruggen

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to
Hi,

I'm trying to set up sendmail on HP-UX 10.20.
We have the following setup

/etc/resolv.conf
nameserver <ip-address>

/etc/nsswitch.conf
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns
[NOTFOUND=return UNAVAIL=return TRYAGAIN=return] nis
protocols: nis [NOTFOUND=return UNAVAIL=continue] files

/etc/mail/service.switch
hosts files dns
aliases files

/etc/mail/sendmail.cf contains the following line to read the
service.switch file
O ServiceSwitchFile=/etc/mail/service.switch

Sending and receiving mail to and from the internet works fine.
When we try to use aliases or .forward-files to distribute mail internal,
sendmail always uses DNS to look up the hostnames.
Sendmail somehow ignores the settings in the files nsswitch.conf and
service.switch.
What are we missing ??

Thanks in advance !!

Stefan Verbruggen
ATA Information technology
E-mail s...@atait.com

Per Hedeland

unread,
Oct 17, 1998, 3:00:00 AM10/17/98
to
In article <6vsbkr$25r$1...@xenon.inbe.net> "Stefan Verbruggen"

<s...@atait.com> writes:
>Sending and receiving mail to and from the internet works fine.
>When we try to use aliases or .forward-files to distribute mail internal,
>sendmail always uses DNS to look up the hostnames.
>Sendmail somehow ignores the settings in the files nsswitch.conf and
>service.switch.
>What are we missing ??

The fact that the mail standards require that MX records take precedence
over the IP address of the destination - since MX records can only be
found in DNS, sendmail has to try DNS first if it's present at all in
the service switch file. You can prevent MX lookups for your internal
destinations either by using a mailertable with something like

.your.domain smtp:[%.your.domain]

([] around the hostname prevents MX lookups), or by defining a new
mailer which is a clone of one of the SMTP mailers, except it has the
'0' flag (F= field) which prevents MX lookups - and again use the
mailertable to direct your internal mail to use this mailer.

--Per Hedeland
p...@erix.ericsson.se

Ian Ward

unread,
Oct 17, 1998, 3:00:00 AM10/17/98
to
Per Hedeland wrote in message <708uu9$knk$1...@news.du.etx.ericsson.se>...

>.your.domain smtp:[%.your.domain]
>
>([] around the hostname prevents MX lookups), or by defining a new
>mailer which is a clone of one of the SMTP mailers, except it has the
>'0' flag (F= field) which prevents MX lookups - and again use the
>mailertable to direct your internal mail to use this mailer.


I have had a similar problem (my posting here). When trying to forward to
an internal server, sendmail would complain of a "Local configuration
error" as it would get a DNS answer pointing back to itself.

I floundered around and found an option in the .cf file, resolver options,
and put "HasWildCardMX" and that fixed the problem.

Did I guess right or should I really be doing it in the mailertable ?

Regards, Ian

Per Hedeland

unread,
Oct 25, 1998, 2:00:00 AM10/25/98
to
In article <709ae5$ack$1...@news1.mpx.com.au> "Ian Ward"

<news...@cyberpro.com.au> writes:
>Per Hedeland wrote in message <708uu9$knk$1...@news.du.etx.ericsson.se>...
>>.your.domain smtp:[%.your.domain]
>
>I have had a similar problem (my posting here). When trying to forward to
>an internal server, sendmail would complain of a "Local configuration
>error" as it would get a DNS answer pointing back to itself.
>
>I floundered around and found an option in the .cf file, resolver options,
>and put "HasWildCardMX" and that fixed the problem.
>
>Did I guess right or should I really be doing it in the mailertable ?

Yes, I think using the mailertable would be a cleaner approach (if I
understand your other posting right). Note that for this to work you
should *not* have your domain in sendmail.cw, nor use the DH definition
(in fact you should stop diddling with the sendmail.cf directly and use
m4 instead...).

--Per Hedeland
p...@erix.ericsson.se

0 new messages