Fellow managers,
A small update to this problem,
The O'Reilly book on DNS & Bind does indicate that sendmail does name
resolution a little differently to most programs.
I won't go over it here but those who are interested can check Chap. 6,
Configuring Hosts.
A more elegant sendmail.cf that will do the trick is not to specify the
domain name with the relay host but to specify the relay host directly
to the mailer :
# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DS/usr/bin/mail:mailhost
Regards,
Steve
-- =================================================== Steve Franks National Australia Bank, Midrange Services1/216 Victoria Pde ph : +61 3 9208 5794 E Melbourne, Victoria fax : +61 3 9208 5023 Australia 3150 email : scf@nabaus.com.au ===================================================
attached mail follows:
Fellow Managers,
Thanks to those that replied to my original question.
Unfortunately there seemed to be no answer directly relevant to my
question.
Certainly repondants agreed that fully qualified domain names will avoid
a lot of problems as I discovered for myself. I'm still at a loss
though to understand why I need FQDN in the first place when I have a
functioning DNS system that works for every other request.
For the record, this is a Solaris 2.4 system with no use whatsoever of
NIS / NIS+
If I figure it out, I'll post a follow up summary.
Steve
-- ================================================= Steve Franks National Australia Bank, Midrange Services1/216 Victoria Pde ph : +61 3 9208 5794 E Melbourne, Victoria fax : +61 3 9208 5023 Australia 3150 email : scf@nabaus.com.au =================================================
attached mail follows:
Fellow managers,
I have encountered a mail problem which fortunately I have resolved but
I don't understand why I had the problem in the first place!
I am posting to this list rather than a specialised mail list as I am
wondering if it is a Solaris "feature" that I am dealing with.
I have a host "ivradm" trying to mail a small text message to a user
fesops@vrnap.
Until recently - no problem. Last Sunday, it stopped.
/var/log/syslog had the following entry :
Apr 20 12:02:06 ivradm sendmail[6495]: MAA06495: from=n091368, size=35,
class=0, pri=30035, nrcpts=1, msgid=<199804200202.MAA06495@ivradm.>,
relay=root@localhost
Apr 20 12:02:06 ivradm sendmail[6496]: MAA06495: to=fesops@vrnap,
ctladdr=n091368 (3007/10), delay=00:00:01, mailer=ether, relay=mailhost
[0], stat=Host unknown (Name server: mailhost: host not found)
Ie, it seems mail has a problem resolving the mailhost as per
/etc/mail/sendmail.cf which is :
<snip>
# major relay host
DRmailhost
CRmailhost
<snip>
the mqueue directory was empty so sendmail was obviously not having any
spool trouble
I have DNS enabled on the sending machine :
/etc/resolv.conf & nsswitch.conf files are as follows:
domain nabaus.com.au
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy
nameserver zzz.zzz.zzz.zzz
(I have verified the actual IP addresses in here as being correct)
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"
transports.
passwd: files
group: files
hosts: files dns
networks: files
When I did an nslookup on mailhost ("nslookup mailhost") from ivradm, it
correctly resolved & I had no trouble with telnet / ping etc from ivradm
to vrnap.
I also did a telnet to vrnap port 25 & manually verified the recipient &
sent a message from ivradm.
When I tried to "mail fesops@vrnap" I got the message in the syslog file
as above.
The solution was simply to put the domain name after the relay host
"mailhost" in sendmail.cf.
I'm glad thsi works but I don't understand why sendmail was not able to
resolve mailhost when everything else could quite successfully. AS I
only have one domain, my sendmail.cf file has no opportunity for
mistakes due to managing multiple domains. Why should I have to qualify
my relay host when I have DNS running? It occurred to me that perhaps
sendmail doesn't refer to the Soalris nsswitch.conf file (certainly
mailhost DOES NOT have an entry in /etc/hosts) but why has it been
working up to now?? (I have changed nothing for months on either the
sending or receiving systems).
Have I missed something blantantly obvious here?
TIA
Steve
=================================================
Steve Franks
National Australia Bank, Midrange Services
1/216 Victoria Pde ph : +61 3 9208 5794
E Melbourne, Victoria fax : +61 3 9208 5023
Australia 3150 email : scf@nabaus.com.au
=================================================
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:39 CDT