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
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
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
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