Configuring sendmail to receive mail for your domain

How do you configure sendmail to "recieve" incoming mail to the local domain locally?

The default for sendmail is to accept mail addressed to the local hostnames. These are stored in a sendmail class, $=w. This class is initialized with all of the local IP addresses and the hostnames associated with them from either the /etc/hosts file or from DNS PTR records.

If you want this host to accept mail for your domain name, user@your.dom, as well as the local host name, user@host.your.dom then you need to add the domain name to class $=w. The preferred way to do this is using the m4 compiler to generate a new file. Add to your file (possibly your /usr/lib/mail/cf/ file):

  • LOCAL_DOMAIN(your.dom)

Note you want to quote your.dom and with m4 you open a quote with a single back quote, "", and close the quote with a single forwards quote, "". This is so you can nest quotes in the m4 template file. You can generate a new file by typing "make" in the /usr/lib/mail/cf directory.

As a note, you will need to still install a POP server on the host in that sendmail only does local delivery.

Hope this helps