Problem
sendmail is ignoring the name resolution order set in /etc/netconfig and is attempting to resolve names using my nameserver before it checks for the names in /etc/hosts.
Cause
sendmail 8.13.x has been built specifically to resolve names via the resolver (/etc/resolv.conf) before /etc/hosts.
The nodns feature was turned off in DNS 8.13.0, see:
CONFIG: FEATURE(nodns) has been removed, it was a no-op since 8.9. Use ServiceSwitchFile to turn off DNS lookups, see doc/op/op.me.
From: http://www.sendmail.org/documentationAs of the current Maintenance levels below, the following versions of SendMail are available for the SCO Unix platforms:
OpenServer6: v8.13.3 with Maintenance Pack 3UnixWare7: v8.13.8 with Maintenance Pack 4 Solution
It is not possible to configure SendMail to use without DNS and this
issue has been reported to SCO Engineering. However, you can still
route traffic to a MTA SmartHost even without DNS being active on
your server.First:# cp /etc/sendmail.cf /etc/sendmail.cf.scoSendMail needs to be configured with:UnixWare7:# scoadmin mailPlease note that it might take a little time for this screen to display.
or:# /etc/mail/manage_sendmailOpenServer6:# scoadmin sendmailand config the server's Domain and SmartHOST.
Then select the option to rebuild the sendmail.cf file.
Please note that even though some options may not be set in the Option 6 review as NOT SET you can still generate a new sendmail.cf file and a backup will be taken of the existing file.
This process will also stop and restart sendmail.
If you have NO DNS available to resolve the smarthost name then it can be entered into /etc/hosts and you will also need to edit:
/etc/sendmail.cfand1) Unhash the:ServiceSwitch option lineie:# service switch file (name hardwired on Solaris, Ultrix, others)
O ServiceSwitchFile=/etc/mail/service.switch2) Change this to /etc/service.switch from /etc/mail/service.switchie:# service switch file (name hardwired on Solaris, Ultrix, others)
O ServiceSwitchFile=/etc/service.switch3) Unhash the:hosts option line to point to /etc/hostsie:# hosts file (normally /etc/hosts)
O HostsFile=/etc/hosts4) Add "hosts files" to the end of the file:
/etc/service.switchThen restart Sendmail with:# /etc/rc2.d/S81Sendmail stop# sleep 5# /etc/rc2.d/S81Sendmail startYou should then be able to send mail without DNS configured to the SmartHost.
You can check with:# tail /usr/adm/syslogand:# mailqNOTES: v8.13.8 masquerade feature excludes root so when you configure your
sendmail using the mail configuration feature, defined above:Sendmail configuration information...Machine name: slab6.uss.sco.com
DOMAIN name: uss.sco.com
UUCP connections: NOT SET
Alternate names: slab6.uss.sco.com
Is there a UUCP gateway on the net? n
Is there a smart mailhost on the net? smarthost.sco.com
Masquerade as a different host? sco.com
Use NIS aliases with sendmail? NOT SETSo here I want to forward all email to my smarthost and masquerade the email addresses to be user@sco.com not user@slab6.uss.sco.com.
This will work for non-root users as root is excluded in sendmail.cf as:
# dequoting map
Kdequote dequote# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{E}root# who I masquerade as (null for no masquerading) (see also $=M)
DMsco.comNOTES: Should you see "Domain of sender address root@server does not exist" in your email bodies then check:
a) The above to ensure that the Alternate name(s) are set (these are pulled from /etc/hosts) and you can also Masquerade as a different host but enter your correct 'hostname' entry there.
b) Check /etc/hosts to ensure the server name and the server name.fqdn is there.
c) Check /etc/resolv.conf to ensure it's domain and search entries are correct.
d) Check 'hostname' to check the fqdn has been entered correctly.