Technical article 127087

How to configure sendmail version 8.13.x without DNS?

OpenServer 6.0.0UnixWare 7.1.4

Written · Last revised

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

As 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 3
UnixWare7:    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.sco
SendMail needs to be configured with:
UnixWare7:
# scoadmin mail

Please note that it might take a little time for this screen to display.

or:
# /etc/mail/manage_sendmail
OpenServer6:
# scoadmin sendmail

and 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.cf
and
1) Unhash the:
ServiceSwitch option line
ie:
# service switch file (name hardwired on Solaris, Ultrix, others)
O ServiceSwitchFile=/etc/mail/service.switch
2) Change this to /etc/service.switch from /etc/mail/service.switch
ie:
# service switch file (name hardwired on Solaris, Ultrix, others)
O ServiceSwitchFile=/etc/service.switch
3) Unhash the:
hosts option line to point to /etc/hosts
ie:
# hosts file (normally /etc/hosts)
O HostsFile=/etc/hosts

4) Add "hosts files" to the end of the file:

/etc/service.switch
Then restart Sendmail with:
# /etc/rc2.d/S81Sendmail stop
# sleep 5
# /etc/rc2.d/S81Sendmail start

You should then be able to send mail without DNS configured to the SmartHost.

You can check with:
# tail /usr/adm/syslog
and:
# mailq
NOTES:    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 SET

So 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.com

NOTES: 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.

From the Xinuos technical article database, record 127087. Reproduced with permission. The original is at www.sco.com/ta/127087, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.