19.2 Using sendmail without Using DNS

     

19.2 Using sendmail without Using DNS

For the initial part of this demonstration, I purposely de-configured DNS for the machines in my network to show you some of the error messages you experience when DNS is not configured. The first message we deal with you may have seen already in /etc/rc.log . It is a warning message displayed by sendmail if it cannot work out our DNS domain name . You can see the message if you kill sendmail and then start it up again:

 

 root@hpeos003[]  killsm  Sendmail pid is 3063 Killing sendmail Please wait ..... Sendmail killed. root@hpeos003[] root@hpeos003[]  /sbin/init.d/sendmail start    WARNING: local host name (hpeos003) is not qualified; fix $j in config file   /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total sendmail root@hpeos003[] 

The problem here is that sendmail doesn't believe we can exist in a world without DNS domain names . In reality, most of us will be running with DNS enabled. However, this is just to show those (lucky) few who are DNS-less. In this situation, we need to inform sendmail that we do have a DNS domain name, even if it is completely fictitious. We need to inform sendmail of this via a macro in the sendmail.cf file:

 

 root@hpeos003[]  vi /etc/mail/sendmail.cf  ... #                                                                              # #  My official domain name or Fully Qualified Domain Name - FQDN (Dj):         # #                                                                              # #     This is required only if sendmail cannot automatically determine your   # #     domain. If you are not using DNS, and the official host name (ie,      # #     the first entry in /etc/hosts following your IP address) is not a       # #     fully-qualified host name, then sendmail will have difficulty resolving # #     your domain name. You MUST modify the $j macro by replacing .Foo.COM   # #     with your actual domain name. If you do not, you will see a warning    # #     message in your syslog, that might even get echo'd to your console      # #     when sendmail starts up.                                                # # ... # my official domain name # ... define this only if sendmail cannot automatically determine your domain  Dj$w.Foo.COM  .. root@hpeos003[] 

Simply un-commenting the line above gets rid of the warning message and makes sendmail think we exist in a domain called Foo.COM .

 

 root@hpeos003[]  killsm  Sendmail pid is 2736 Killing sendmail Please wait ..... Sendmail killed. root@hpeos003[]  /sbin/init.d/sendmail start  /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total sendmail root@hpeos003[] 

Obviously, this applies only to those folks who are DNS-less. In Chapter 17, "Domain Name System (DNS)," we set up a couple of DNS domains. We use that configuration for the remainder of this chapter.



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net