UNIX System Administration Handbook - Evi Nemeth [341]
The generic DOMAIN file included with the distribution shows the types of entries that are usually put in site-wide domain files. Its contents are shown on page 594.
The MAILER macro
You must include a MAILER macro for every delivery agent you want to enable. You’ll find a complete list of supported mailers in the directory cf/mailers in the sendmail distribution. Currently, the options are local, smtp, fax, usenet, procmail, qpage, cyrus, pop, phquery, and uucp. Some examples:
MAILER('local')
MAILER('smtp')
The first line includes the local and prog mailers. The second line includes smtp, esmtp, dsmtp, smtp8, and relay.
If you plan to tune any mailer-related macros (such as USENET_MAILER_ARGS or FAX_MAILER_PATH), be sure that the lines that set these parameters precede the line that invokes the mailer itself; otherwise, the old values will be used. For this reason, MAILER declarations usually come toward the bottom of the config file.
The pop mailer interfaces to the spop program that is part of the MH mail handler package and implements the Post Office Protocol defined in RFC1460. It’s used by PCs and Macs that need to access mail on a UNIX host. The cyrus mailer is for use with CMU’s IMAP server.
MAILER('uucp') includes several flavors of UUCP mailers.
The usenet mailer provides an email interface to Usenet news. To use it, verify the values of the USENET_MAILER_* macros in the OSTYPE file for your architecture. Send mail to newsgroup.USENET to post an article. Some sites add a mailer argument that identifies the local organization.
For example,
-o "Organization: University of Colorado"
added to the USENET_MAILER_ARGS line would add an Organization header to each news article. Unfortunately, Usenet is a spammer’s heaven. You will have even bigger spam problems if you use the usenet mailer; we recommend that you don’t.
HylaFAX is available from ftp.sgi.com.
The fax mailer integrates Sam Leffler’s HylaFAX package into the mail system. Mailing to user@destination.fax sends the body of the message as a fax document. The destination is typically a phone number. To allow symbolic names as destinations (rather than just phone numbers), use a keyed database file or the /etc/remote and /etc/phones files.
ghostscript is available from www.gnu.org.
You must glue HylaFAX and sendmail together by installing a script from the HylaFAX distribution in /usr/local/bin. If necessary, you must also change the value of the macro FAX_MAILER_PATH. Human intervention is still needed to deliver incoming faxes from the spool area to a user’s mailbox. You can convert fax documents to PostScript (with HylaFAX) and view them with the GNU package ghostscript.
The qpage mailer interfaces to QuickPage software to deliver email to your pager. See www.qpage.org for more information about QuickPage.
The previous macros VERSIONID, OSTYPE, DOMAIN, and MAILER are all you need to build a basic hostname.mc file.
19.8 FANCIER SENDMAIL CONFIGURATION PRIMITIVES
In the next sections, we describe a few more macros and some of the most common FEATUREs used to modify sendmail’s default behavior. We also discuss some policy issues in the context of sendmail configuration: hiding information by use of masquerading and virtual domains, security, privacy, and spam.
The FEATURE macro
With the FEATURE macro you can enable several common options by including m4 files from the feature directory. In the discussion below, we intermix our presentation of FEATUREs and some of sendmail’s other macros, as they are occasionally intertwined. When m4 configuration was first added to sendmail, describing the FEATURE macro became a big section of our mail chapter. Now, so many features have been added that FEATURE almost needs its own chapter. The syntax is:
FEATURE(keyword, arg, arg, ...)
where keyword corresponds to a file keyword.m4 in the cf/feature directory and the args are passed to it. See the directory itself or the cf/README file for a definitive list of features. A few commonly used ones are