home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / base / root.13 / etc / mail / cf / README / README~
Text File  |  1998-08-19  |  75KB  |  1,858 lines

  1.  
  2.  
  3.         NEW SENDMAIL CONFIGURATION FILES
  4.  
  5.         Eric Allman <eric@CS.Berkeley.EDU>
  6.  
  7.         @(#)README    8.122 (Berkeley) 7/6/97
  8.  
  9.  
  10. This document describes the sendmail configuration files being used
  11. at Berkeley.  These use features in the new (R8) sendmail; they will
  12. not work on other versions.
  13.  
  14. These configuration files are probably not as general as previous
  15. versions, and don't handle as many of the weird cases automagically.
  16. I was able to simplify them for two reasons.  First, the network
  17. has become more consistent -- for example, at this point, everyone
  18. on the internet is supposed to be running a name server, so hacks to
  19. handle NIC-registered hosts can go away.  Second, I assumed that a
  20. subdomain would be running SMTP internally -- UUCP is presumed to be
  21. a long-haul protocol.  I realize that this is not universal, but it
  22. does describe the vast majority of sites with which I am familiar,
  23. including those outside the US.
  24.  
  25. Of course, the downside of this is that if you do live in a weird
  26. world, things are going to get weirder for you.  I'm sorry about that,
  27. but at the time we at Berkeley had a problem, and it seemed like the
  28. right thing to do.
  29.  
  30. This package requires a post-V7 version of m4; if you are running the
  31. 4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
  32. a newer version.  You can m4-expand on their system, then run locally.
  33. SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
  34. or later also works.  Unfortunately, I'm told that the M4 on BSDI 1.0
  35. doesn't work -- you'll have to use a Net/2 or GNU version.  GNU m4 is
  36. available from ftp://prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz (check for
  37. the latest version).  EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken
  38. (3.x is fine).  Use GNU m4 on this platform.
  39.  
  40. IF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
  41. "m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need.
  42. There is also a fairly crude (but functional) Makefile.dist that works
  43. on the old version of make.
  44.  
  45. To get started, you may want to look at tcpproto.mc (for TCP-only
  46. sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
  47. clusters of clients using a single mail host).  Others are versions
  48. that we use at Berkeley, although not all are in current use.  For
  49. example, ucbarpa has gone away, but I've left ucbarpa.mc in because
  50. it demonstrates some interesting techniques.
  51.  
  52. I'm not pretending that this README describes everything that these
  53. configuration files can do; clever people can probably tweak them
  54. to great effect.  But it should get you started.
  55.  
  56. *******************************************************************
  57. ***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some        ***
  58. ***  Berkeley-specific assumptions built in, such as the name    ***
  59. ***  of our UUCP-relay.  You'll want to create your own domain    ***
  60. ***  description, and use that in place of domain/Berkeley.m4.    ***
  61. *******************************************************************
  62.  
  63.  
  64. +--------------------------+
  65. | INTRODUCTION AND EXAMPLE |
  66. +--------------------------+
  67.  
  68. Configuration files are contained in the subdirectory "cf", with a
  69. suffix ".mc".  They must be run through "m4" to produce a ".cf" file.
  70. You must pre-load "cf.m4":
  71.  
  72.     m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
  73.  
  74. where ${CFDIR} is the root of the cf directory and config.mc is the
  75. name of your configuration file.  If you are running a version of M4
  76. that understands the __file__ builtin (versions of GNU m4 >= 0.75 do
  77. this, but the versions distributed with 4.4BSD and derivatives do not)
  78. or the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory.
  79. For "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST
  80. use -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash!  For example:
  81.  
  82.     m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf
  83.  
  84. Let's examine a typical .mc file:
  85.  
  86.     divert(-1)
  87.     #
  88.     # Copyright (c) 1983 Eric P. Allman
  89.     # Copyright (c) 1988, 1993
  90.     #    The Regents of the University of California.  All rights reserved.
  91.     #
  92.     # Redistribution and use in source and binary forms, with or without
  93.     # modification, are permitted provided that the following conditions
  94.     # are met:
  95.     # 1. Redistributions of source code must retain the above copyright
  96.     #    notice, this list of conditions and the following disclaimer.
  97.     # 2. Redistributions in binary form must reproduce the above copyright
  98.     #    notice, this list of conditions and the following disclaimer in
  99.     #    the documentation and/or other materials provided with the
  100.     #    distribution.
  101.     # 3. All advertising materials mentioning features or use of this
  102.     #    software #    must display the following acknowledgement:
  103.     #    This product includes software developed by the University of
  104.     #    California, Berkeley and its contributors.
  105.     # 4. Neither the name of the University nor the names of its
  106.     #    contributors may be used to endorse or promote products derived
  107.     #    from this software without specific prior written permission.
  108.     #
  109.     # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
  110.     # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  111.     # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  112.     # PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
  113.     # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
  114.     # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
  115.     # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  116.     # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  117.     # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  118.     # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  119.     # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  120.     #
  121.  
  122.     #
  123.     #  This is a Berkeley-specific configuration file for HP-UX 9.x.
  124.     #  It applies only to the Computer Science Division at Berkeley,
  125.     #  and should not be used elsewhere.   It is provided on the sendmail
  126.     #  distribution as a sample only.  To create your own configuration
  127.     #  file, create an appropriate domain file in ../domain, change the
  128.     #  `DOMAIN' macro below to reference that file, and copy the result
  129.     #  to a name of your own choosing.
  130.     #
  131.     divert(0)
  132.  
  133. The divert(-1) will delete the crud in the resulting output file.
  134. The copyright notice can be replaced by whatever your lawyers require;
  135. our lawyers require the one that I've included in my files.  A copyleft
  136. is a copyright by another name.  The divert(0) restores regular output.
  137.  
  138.     VERSIONID(`<SCCS or RCS version id>')
  139.  
  140. VERSIONID is a macro that stuffs the version information into the
  141. resulting file.  We use SCCS; you could use RCS, something else, or
  142. omit it completely.  This is not the same as the version id included
  143. in SMTP greeting messages -- this is defined in m4/version.m4.
  144.  
  145.     OSTYPE(hpux9)dnl
  146.  
  147. You must specify an OSTYPE to properly configure things such as the
  148. pathname of the help and status files, the flags needed for the local
  149. mailer, and other important things.  If you omit it, you will get an
  150. error when you try to build the configuration.  Look at the ostype
  151. directory for the list of known operating system types.
  152.  
  153.     DOMAIN(CS.Berkeley.EDU)dnl
  154.  
  155. This example is specific to the Computer Science Division at Berkeley.
  156. You can use "DOMAIN(generic)" to get a sufficiently bland definition
  157. that may well work for you, or you can create a customized domain
  158. definition appropriate for your environment.
  159.  
  160.     MAILER(local)
  161.     MAILER(smtp)
  162.  
  163. These describe the mailers used at the default CS site site.  The
  164. local mailer is always included automatically.  Beware: MAILER
  165. declarations should always be at the end of the configuration file,
  166. and MAILER(smtp) should always precede MAILER(uucp).  The general
  167. rules are that the order should be:
  168.  
  169.     VERSIONID
  170.     OSTYPE
  171.     DOMAIN
  172.     FEATURE
  173.     local macro definitions
  174.     MAILER
  175.     LOCAL_RULESET_*
  176.  
  177.  
  178. +----------------------------+
  179. | A BRIEF INTRODUCTION TO M4 |
  180. +----------------------------+
  181.  
  182. Sendmail uses the M4 macro processor to ``compile'' the configuration
  183. files.  The most important thing to know is that M4 is stream-based,
  184. that is, it doesn't understand about lines.  For this reason, in some
  185. places you may see the word ``dnl'', which standards for ``delete
  186. through newline''; essentially, it deletes all characters starting
  187. at the ``dnl'' up to and including the next newline character.  In
  188. most cases sendmail uses this only to avoid lots of unnecessary
  189. blank lines in the output.
  190.  
  191. Other important directives are define(A, B) which defines the macro
  192. ``A'' to have value ``B''.  Macros are expanded as they are read, so
  193. one normally quotes both values to prevent expansion.  For example,
  194.  
  195.     define(`SMART_HOST', `smart.foo.com')
  196.  
  197. One word of warning:  M4 macros are expanded even in lines that appear
  198. to be comments.  For example, if you have
  199.  
  200.     # See FEATURE(foo) above
  201.  
  202. it will not do what you expect, because the FEATURE(foo) will be
  203. expanded.  This also applies to
  204.  
  205.     # And then define the $X macro to be the return address
  206.  
  207. because ``define'' is an M4 keyword.  If you want to use them, surround
  208. them with directed quotes, `like this'.
  209.  
  210.  
  211. +--------+
  212. | OSTYPE |
  213. +--------+
  214.  
  215. You MUST define an operating system environment, or the configuration
  216. file build will puke.  There are several environments available; look
  217. at the "ostype" directory for the current list.  This macro changes
  218. things like the location of the alias file and queue directory.  Some
  219. of these files are identical to one another.
  220.  
  221. It is IMPERATIVE that the OSTYPE occur before any MAILER definitions.
  222. In general, the OSTYPE macro should go immediately after any version
  223. information, and MAILER definitions should always go last.
  224.  
  225. Operating system definitions are usually easy to write.  They may define
  226. the following variables (everything defaults, so an ostype file may be
  227. empty).  Unfortunately, the list of configuration-supported systems is
  228. not as broad as the list of source-supported systems, since many of
  229. the source contributors do not include corresponding ostype files.
  230.  
  231. ALIAS_FILE        [/etc/aliases] The location of the text version
  232.             of the alias file(s).  It can be a comma-separated
  233.             list of names (but be sure you quote values with
  234.             commas in them -- for example, use
  235.                 define(`ALIAS_FILE', `a,b')
  236.             to get "a" and "b" both listed as alias files;
  237.             otherwise the define() primitive only sees "a").
  238. HELP_FILE        [/usr/lib/sendmail.hf] The name of the file
  239.             containing information printed in response to
  240.             the SMTP HELP command.
  241. QUEUE_DIR        [/var/spool/mqueue] The directory containing
  242.             queue files.
  243. STATUS_FILE        [/etc/sendmail.st] The file containing status
  244.             information.
  245. LOCAL_MAILER_PATH    [/bin/mail] The program used to deliver local mail.
  246. LOCAL_MAILER_FLAGS    [rmn] The flags used by the local mailer.  The
  247.             flags lsDFM are always included.
  248. LOCAL_MAILER_ARGS    [mail -d $u] The arguments passed to deliver local
  249.             mail.
  250. LOCAL_MAILER_MAX    [undefined] If defined, the maximum size of local
  251.             mail that you are willing to accept.
  252. LOCAL_MAILER_CHARSET    [undefined] If defined, messages containing 8-bit data
  253.             that ARRIVE from an address that resolves to the
  254.             local mailer and which are converted to MIME will be
  255.             labelled with this character set.
  256. LOCAL_SHELL_PATH    [/bin/sh] The shell used to deliver piped email.
  257. LOCAL_SHELL_FLAGS    [eu] The flags used by the shell mailer.  The
  258.             flags lsDFM are always included.
  259. LOCAL_SHELL_ARGS    [sh -c $u] The arguments passed to deliver "prog"
  260.             mail.
  261. LOCAL_SHELL_DIR        [$z:/] The directory search path in which the
  262.             shell should run.
  263. USENET_MAILER_PATH    [/usr/lib/news/inews] The name of the program
  264.             used to submit news.
  265. USENET_MAILER_FLAGS    [rlsDFMmn] The mailer flags for the usenet mailer.
  266. USENET_MAILER_ARGS    [-m -h -n] The command line arguments for the
  267.             usenet mailer.
  268. USENET_MAILER_MAX    [100000] The maximum size of messages that will
  269.             be accepted by the usenet mailer.
  270. SMTP_MAILER_FLAGS    [undefined] Flags added to SMTP mailer.  Default
  271.             flags are `mDFMUX' for all SMTP-based mailers; the
  272.             "esmtp" mailer adds `a' and "smtp8" adds `8'.
  273. SMTP_MAILER_MAX        [undefined] The maximum size of messages that will
  274.             be transported using the smtp, smtp8, or esmtp
  275.             mailers.
  276. SMTP_MAILER_ARGS    [IPC $h] The arguments passed to the smtp mailer.
  277.             About the only reason you would want to change this
  278.             would be to change the default port.
  279. ESMTP_MAILER_ARGS    [IPC $h] The arguments passed to the esmtp mailer.
  280. SMTP8_MAILER_ARGS    [IPC $h] The arguments passed to the smtp8 mailer.
  281. RELAY_MAILER_ARGS    [IPC $h] The arguments passed to the relay mailer.
  282. SMTP_MAILER_CHARSET    [undefined] If defined, messages containing 8-bit data
  283.             that ARRIVE from an address that resolves to one of
  284.             the SMTP mailers and which are converted to MIME will
  285.             be labelled with this character set.
  286. UUCP_MAILER_PATH    [/usr/bin/uux] The program used to send UUCP mail.
  287. UUCP_MAILER_FLAGS    [undefined] Flags added to UUCP mailer.  Default
  288.             flags are `DFMhuU' (and `m' for uucp-new mailer,
  289.             minus `U' for uucp-dom mailer).
  290. UUCP_MAILER_ARGS    [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments
  291.             passed to the UUCP mailer.
  292. UUCP_MAILER_MAX        [100000] The maximum size message accepted for
  293.             transmission by the UUCP mailers.
  294. UUCP_MAILER_CHARSET    [undefined] If defined, messages containing 8-bit data
  295.             that ARRIVE from an address that resolves to one of
  296.             the UUCP mailers and which are converted to MIME will
  297.             be labelled with this character set.
  298. FAX_MAILER_PATH        [/usr/local/lib/fax/mailfax] The program used to
  299.             submit FAX messages.
  300. FAX_MAILER_ARGS        [mailfax $u $h $f] The arguments passed to the FAX
  301.             mailer.
  302. FAX_MAILER_MAX        [100000] The maximum size message accepted for
  303.             transmission by FAX.
  304. POP_MAILER_PATH        [/usr/lib/mh/spop] The pathname of the POP mailer.
  305. POP_MAILER_FLAGS    [Penu] Flags added to POP mailer.  Flags "lsDFM"
  306.             are always added.
  307. POP_MAILER_ARGS        [pop $u] The arguments passed to the POP mailer.
  308. PROCMAIL_MAILER_PATH    [/usr/local/bin/procmail] The path to the procmail
  309.             program.  This is also used by FEATURE(local_procmail).
  310. PROCMAIL_MAILER_FLAGS    [SPhnu9] Flags added to Procmail mailer.  Flags
  311.             ``DFM'' are always set.  This is NOT used by
  312.             FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS
  313.             instead.
  314. PROCMAIL_MAILER_ARGS    [procmail -Y -m $h $f $u] The arguments passed to
  315.             the Procmail mailer.  This is NOT used by
  316.             FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS
  317.             instead.
  318. PROCMAIL_MAILER_MAX    [undefined] If set, the maximum size message that
  319.             will be accepted by the procmail mailer.
  320. MAIL11_MAILER_PATH    [/usr/etc/mail11] The path to the mail11 mailer.
  321. MAIL11_MAILER_FLAGS    [nsFx] Flags for the mail11 mailer.
  322. MAIL11_MAILER_ARGS    [mail11 $g $x $h $u] Arguments passed to the mail11
  323.             mailer.
  324. PH_MAILER_PATH        [/usr/local/etc/phquery] The path to the phquery
  325.             program.
  326. PH_MAILER_FLAGS        [ehmu] Flags for the phquery mailer.
  327. PH_MAILER_ARGS        [phquery -- $u] -- arguments to the phquery mailer.
  328. CYRUS_MAILER_FLAGS    [A5@] The flags used by the cyrus mailer.  The
  329.             flags lsDFMnP are always included.
  330. CYRUS_MAILER_PATH    [/usr/cyrus/bin/deliver] The progam used to deliver
  331.             cyrus mail.
  332. CYRUS_MAILER_ARGS    [deliver -e -m $h -- $u] The arguments passed
  333.             to deliver cyrus mail.
  334. CYRUS_MAILER_MAX    [undefined] If set, the maximum size message that
  335.             will be accepted by the cyrus mailer.
  336. CYRUS_MAILER_USER    [cyrus:mail] The user and group to become when
  337.             running the cyrus mailer.
  338. CYRUS_BB_MAILER_FLAGS    [undefined] The flags used by the cyrusbb
  339.             mailer. The flags lsDFMnP are always included.
  340. CYRUS_BB_MAILER_ARGS    [deliver -e -m $u] The arguments passed
  341.             to deliver cyrusbb mail.
  342.  
  343.  
  344.  
  345. +---------+
  346. | DOMAINS |
  347. +---------+
  348.  
  349. You will probably want to collect domain-dependent defines into one
  350. file, referenced by the DOMAIN macro.  For example, our Berkeley
  351. domain file includes definitions for several internal distinguished
  352. hosts:
  353.  
  354. UUCP_RELAY    The host that will accept UUCP-addressed email.
  355.         If not defined, all UUCP sites must be directly
  356.         connected.
  357. BITNET_RELAY    The host that will accept BITNET-addressed email.
  358.         If not defined, the .BITNET pseudo-domain won't work.
  359. DECNET_RELAY    The host that will accept DECNET-addressed email.
  360.         If not defined, the .DECNET pseudo-domain and addresses
  361.         of the form node::user will not work.
  362. FAX_RELAY    The host that will accept mail to the .FAX pseudo-domain.
  363.         The "fax" mailer overrides this value.
  364. LOCAL_RELAY    DEPRECATED.  The site that will handle unqualified
  365.         names -- that is, names with out an @domain extension.
  366.         If not set, they are assumed to belong on this machine.
  367.         This allows you to have a central site to store a
  368.         company- or department-wide alias database.  This
  369.         only works at small sites, and only with some user
  370.         agents.
  371. LUSER_RELAY    The site that will handle lusers -- that is, apparently
  372.         local names that aren't local accounts or aliases.
  373.  
  374. Any of these can be either ``mailer:hostname'' (in which case the
  375. mailer is the internal mailer name, such as ``uucp-new'' and the hostname
  376. is the name of the host as appropriate for that mailer) or just a
  377. ``hostname'', in which case a default mailer type (usually ``relay'',
  378. a variant on SMTP) is used.  WARNING: if you have a wildcard MX
  379. record matching your domain, you probably want to define these to
  380. have a trailing dot so that you won't get the mail diverted back
  381. to yourself.
  382.  
  383. The domain file can also be used to define a domain name, if needed
  384. (using "DD<domain>") and set certain site-wide features.  If all hosts
  385. at your site masquerade behind one email name, you could also use
  386. MASQUERADE_AS here.
  387.  
  388. You do not have to define a domain -- in particular, if you are a
  389. single machine sitting off somewhere, it is probably more work than
  390. it's worth.  This is just a mechanism for combining "domain dependent
  391. knowledge" into one place.
  392.  
  393. +---------+
  394. | MAILERS |
  395. +---------+
  396.  
  397. There are fewer mailers supported in this version than the previous
  398. version, owing mostly to a simpler world.  As a general rule, put the
  399. MAILER definitions last in your .mc file, and always put MAILER(smtp)
  400. before MAILER(uucp) -- several features and definitions will modify
  401. the definition of mailers, and the smtp mailer modifies the UUCP
  402. mailer.
  403.  
  404. local        The local and prog mailers.  You will almost always
  405.         need these; the only exception is if you relay ALL
  406.         your mail to another site.  This mailer is included
  407.         automatically.
  408.  
  409. smtp        The Simple Mail Transport Protocol mailer.  This does
  410.         not hide hosts behind a gateway or another other
  411.         such hack; it assumes a world where everyone is
  412.         running the name server.  This file actually defines
  413.         four mailers: "smtp" for regular (old-style) SMTP to
  414.         other servers, "esmtp" for extended SMTP to other
  415.         servers, "smtp8" to do SMTP to other servers without
  416.         converting 8-bit data to MIME (essentially, this is
  417.         your statement that you know the other end is 8-bit
  418.         clean even if it doesn't say so), and "relay" for
  419.         transmission to our RELAY_HOST, LUSER_RELAY, or
  420.         MAILER_HUB.
  421.  
  422. uucp        The Unix-to-Unix Copy Program mailer.  Actually, this
  423.         defines two mailers, "uucp-old" (a.k.a. "uucp") and
  424.         "uucp-new" (a.k.a. "suucp").  The latter is for when you
  425.         know that the UUCP mailer at the other end can handle
  426.         multiple recipients in one transfer.  If the smtp mailer
  427.         is also included in your configuration, two other mailers
  428.         ("uucp-dom" and "uucp-uudom") are also defined [warning:
  429.         you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
  430.         include the uucp mailer, sendmail looks for all names in
  431.         the $=U class and sends them to the uucp-old mailer; all
  432.         names in the $=Y class are sent to uucp-new; and all
  433.         names in the $=Z class are sent to uucp-uudom.  Note that
  434.         this is a function of what version of rmail runs on
  435.         the receiving end, and hence may be out of your control.
  436.         See the section below describing UUCP mailers in more
  437.         detail.
  438.  
  439. usenet        Usenet (network news) delivery.  If this is specified,
  440.         an extra rule is added to ruleset 0 that forwards all
  441.         local email for users named ``group.usenet'' to the
  442.         ``inews'' program.  Note that this works for all groups,
  443.         and may be considered a security problem.
  444.  
  445. fax        Facsimile transmission.  This is experimental and based
  446.         on Sam Leffler's HylaFAX software.  For more information,
  447.         see http://www.vix.com/hylafax/.
  448.  
  449. pop        Post Office Protocol.
  450.  
  451. procmail    An interface to procmail (does not come with sendmail).
  452.         This is designed to be used in mailertables.  For example,
  453.         a common question is "how do I forward all mail for a given
  454.         domain to a single person?".  If you have this mailer
  455.         defined, you could set up a mailertable reading:
  456.  
  457.             host.com    procmail:/etc/procmailrcs/host.com
  458.  
  459.         with the file /etc/procmailrcs/host.com reading:
  460.  
  461.             :0    # forward mail for host.com
  462.             ! -oi -f $1 person@other.host
  463.  
  464.         This would arrange for (anything)@host.com to be sent
  465.         to person@other.host.  Within the procmail script, $1 is
  466.         the name of the sender and $2 is the name of the recipient.
  467.         If you use this with FEATURE(local_procmail), the FEATURE
  468.         should be listed first.
  469.  
  470. mail11        The DECnet mail11 mailer, useful only if you have the mail11
  471.         program from gatekeeper.dec.com:/pub/DEC/gwtools (and
  472.         DECnet, of course).  This is for Phase IV DECnet support;
  473.         if you have Phase V at your site you may have additional
  474.         problems.
  475.  
  476. phquery        The phquery program.  This is somewhat counterintuitively
  477.         referenced as the "ph" mailer internally.  It can be used
  478.         to do CCSO name server lookups.  The phquery program, which
  479.         this mailer uses, is distributed with the ph client.
  480.  
  481. cyrus        The cyrus and cyrusbb mailers.  The cyrus mailer delivers to
  482.         a local cyrus user.  this mailer can make use of the
  483.         "user+detail@local.host" syntax; it will deliver the mail to
  484.         the user's "detail" mailbox if the mailbox's ACL permits.
  485.         The cyrusbb mailer delivers to a system-wide cyrus mailbox
  486.         if the mailbox's ACL permits.
  487.  
  488.  
  489. The local mailer accepts addresses of the form "user+detail", where
  490. the "+detail" is not used for mailbox matching but is available
  491. to certain local mail programs (in particular, see FEATURE(local_procmail)).
  492. For example, "eric", "eric+sendmail", and "eric+sww" all indicate
  493. the same user, but additional arguments <null>, "sendmail", and "sww"
  494. may be provided for use in sorting mail.
  495.  
  496.  
  497. +----------+
  498. | FEATURES |
  499. +----------+
  500.  
  501. Special features can be requested using the "FEATURE" macro.  For
  502. example, the .mc line:
  503.  
  504.     FEATURE(use_cw_file)
  505.  
  506. tells sendmail that you want to have it read an /etc/sendmail.cw
  507. file to get values for class $=w.  The FEATURE may contain a single
  508. optional parameter -- for example:
  509.  
  510.     FEATURE(mailertable, dbm /usr/lib/mailertable)
  511.  
  512. Available features are:
  513.  
  514. use_cw_file    Read the file /etc/sendmail.cw file to get alternate
  515.         names for this host.  This might be used if you were
  516.         on a host that MXed for a dynamic set of other
  517.         hosts.  If the set is static, just including the line
  518.         "Cw<name1> <name2> ..." is probably superior.
  519.         The actual filename can be overridden by redefining
  520.         confCW_FILE.
  521.  
  522. use_ct_file    Read the file /etc/sendmail.ct file to get the names
  523.         of users that will be ``trusted'', that is, able to
  524.         set their envelope from address using -f without
  525.         generating a warning message.
  526.         The actual filename can be overridden by redefining
  527.         confCT_FILE.
  528.  
  529. redirect    Reject all mail addressed to "address.REDIRECT" with
  530.         a ``551 User not local; please try <address>'' message.
  531.         If this is set, you can alias people who have left
  532.         to their new address with ".REDIRECT" appended.
  533.  
  534. nouucp        Don't do anything special with UUCP addresses at all.
  535.  
  536. nocanonify    Don't pass addresses to $[ ... $] for canonification.
  537.         This would generally only be used by sites that only
  538.         act as mail gateways or which have user agents that do
  539.         full canonification themselves.  You may also want to
  540.         use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
  541.         turn off the usual resolver options that do a similar
  542.         thing.
  543.  
  544. stickyhost    If set, email sent to "user@local.host" are marked
  545.         as "sticky" -- that is, the local addresses aren't
  546.         matched against UDB and don't go through ruleset 5.
  547.         This is used if you want a set up where "user" is
  548.         not necessarily the same as "user@local.host", e.g.,
  549.         to make a distinct domain-wide namespace.  Prior to
  550.         8.7 this was the default, and notsticky was used to
  551.         turn this off.
  552.  
  553. mailertable    Include a "mailer table" which can be used to override
  554.         routing for particular domains.  The argument of the
  555.         FEATURE may be the key definition.  If none is specified,
  556.         the definition used is:
  557.             hash -o /etc/mailertable
  558.         Keys in this database are fully qualified domain names
  559.         or partial domains preceded by a dot -- for example,
  560.         "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
  561.         Values must be of the form:
  562.             mailer:domain
  563.         where "mailer" is the internal mailer name, and "domain"
  564.         is where to send the message.  These maps are not
  565.         reflected into the message header.
  566.  
  567. domaintable    Include a "domain table" which can be used to provide
  568.         domain name mapping.  Use of this should really be
  569.         limited to your own domains.  It may be useful if you
  570.         change names (e.g., your company changes names from
  571.         oldname.com to newname.com).  The argument of the
  572.         FEATURE may be the key definition.  If none is specified,
  573.         the definition used is:
  574.             hash -o /etc/domaintable
  575.         The key in this table is the domain name; the value is
  576.         the new (fully qualified) domain.  Anything in the
  577.         domaintable is reflected into headers; that is, this
  578.         is done in ruleset 3.
  579.  
  580. bitdomain    Look up bitnet hosts in a table to try to turn them into
  581.         internet addresses.  The table can be built using the
  582.         bitdomain program contributed by John Gardiner Myers.
  583.         The argument of the FEATURE may be the key definition; if
  584.         none is specified, the definition used is:
  585.             hash -o /etc/bitdomain.db
  586.         Keys are the bitnet hostname; values are the corresponding
  587.         internet hostname.
  588.  
  589. uucpdomain    Similar feature for UUCP hosts.  The default map definition
  590.         is:
  591.             hash -o /etc/uudomain.db
  592.         At the moment there is no automagic tool to build this
  593.         database.
  594.  
  595. always_add_domain
  596.         Include the local host domain even on locally delivered
  597.         mail.  Normally it is not added on unqualified names.
  598.         However, if you use a shared message store but do not use
  599.         the same user name space everywhere, you may need the host
  600.         name on local names.
  601.  
  602. allmasquerade    If masquerading is enabled (using MASQUERADE_AS), this
  603.         feature will cause recipient addresses to also masquerade
  604.         as being from the masquerade host.  Normally they get
  605.         the local hostname.  Although this may be right for
  606.         ordinary users, it can break local aliases.  For example,
  607.         if you send to "localalias", the originating sendmail will
  608.         find that alias and send to all members, but send the
  609.         message with "To: localalias@masqueradehost".  Since that
  610.         alias likely does not exist, replies will fail.  Use this
  611.         feature ONLY if you can guarantee that the ENTIRE
  612.         namespace on your masquerade host supersets all the
  613.         local entries.
  614.  
  615. limited_masquerade
  616.         Normally, any hosts listed in $=w are masqueraded.  If this
  617.         feature is given, only the hosts listed in $=M are masqueraded.
  618.         This is useful if you have several domains with disjoint
  619.         namespaces hosted on the same machine.
  620.  
  621. masquerade_entire_domain
  622.         If masquerading is enabled (using MASQUERADE_AS) and 
  623.         MASQUERADE_DOMAIN (see below) is set, this feature will
  624.         cause addresses to be rewritten such that the masquerading
  625.         domains are actually entire domains to be hidden.  All
  626.         hosts within the masquerading domains will be rewritten
  627.         to the masquerade name (used in MASQUERADE_AS).  For example,
  628.         if you have:
  629.  
  630.             MASQUERADE_AS(masq.com)
  631.             MASQUERADE_DOMAIN(foo.org)
  632.             MASQUERADE_DOMAIN(bar.com)
  633.  
  634.         then *foo.org and *bar.com are converted to masq.com.  Without
  635.         this feature, only foo.org and bar.com are masqueraded.
  636.  
  637.             NOTE: only domains within your jurisdiction and
  638.             current hierarchy should be masqueraded using this.
  639.  
  640. genericstable    This feature will cause certain addresses originating in the
  641.         local domain or a domain listed in $=G to be looked up in a
  642.         map and turned into another ("generic") form, which can change
  643.         both the domain name and the user name.  This is similar to
  644.         the userdb functionality.  The same types of addresses as for
  645.         masquerading are looked up, i.e. only header sender addresses
  646.         unless the allmasquerade and/or masquerade_envelope features
  647.         are given.  The addresses must be in the list of names given
  648.         by the macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE
  649.         (analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE,
  650.         see below).
  651.  
  652.         The argument of FEATURE(genericstable) may be the map
  653.         defintion; the default map definition is:
  654.  
  655.             hash -o /etc/genericstable
  656.  
  657.         The key for this table is either the full address or the
  658.         unqualified username (the former is tried first); the
  659.         value is the new user address.  If the new user address does
  660.         not include a domain, $j is used.  Note that the address must
  661.         being looked up must be fully qualified.  For local mail, it
  662.         is necessary to use FEATURE(always_add_domain) for the
  663.         addresses to be qualified.
  664.  
  665. virtusertable    A domain-specific form of aliasing, allowing multiple
  666.         virtual domains to be hosted on one machine.  For example,
  667.         if the virtuser table contained:
  668.  
  669.             info@foo.com    foo-info
  670.             info@bar.com    bar-info
  671.             @baz.org    jane@elsewhere.net
  672.  
  673.         then mail addressed to info@foo.com will be sent to the
  674.         address foo-info, mail addressed to info@bar.com will be
  675.         delivered to bar-info, and mail addressed to anyone at
  676.         baz.org will be sent to jane@elsewhere.net.  The username
  677.         from the original address is passed as %1 allowing:
  678.  
  679.             @foo.org    %1@elsewhere.com
  680.  
  681.         meaning someone@foo.org will be sent to someone@elsewhere.com.
  682.  
  683.         All the host names on the left hand side (foo.com, bar.com,
  684.         and baz.org) must be in $=w.  The default map definition is:
  685.  
  686.             hash -o /etc/virtusertable
  687.  
  688.         A new definition can be specified as the second argument of
  689.         the FEATURE macro, such as
  690.  
  691.             FEATURE(virtusertable, dbm -o /etc/mail/virtusers)
  692.  
  693. nodns        We aren't running DNS at our site (for example,
  694.         we are UUCP-only connected).  It's hard to consider
  695.         this a "feature", but hey, it had to go somewhere.
  696.         Actually, as of 8.7 this is a no-op -- remove "dns" from
  697.         the hosts service switch entry instead.
  698.  
  699. nullclient    This is a special case -- it creates a stripped down
  700.         configuration file containing nothing but support for
  701.         forwarding all mail to a central hub via a local
  702.         SMTP-based network.  The argument is the name of that
  703.         hub.
  704.         
  705.         The only other feature that should be used in conjunction
  706.         with this one is "nocanonify" (this causes addresses to
  707.         be sent unqualified via the SMTP connection; normally
  708.         they are qualifed with the masquerade name, which
  709.         defaults to the name of the hub machine).  No mailers
  710.         should be defined.  No aliasing or forwarding is done.
  711.  
  712. local_procmail    Use procmail as the local mailer.  This mailer can
  713.         make use of the "user+indicator@local.host" syntax;
  714.         normally the +indicator is just tossed, but by default
  715.         it is passed as the -a argument to procmail.  The
  716.         argument to this feature is the pathname of procmail,
  717.         which defaults to PROCMAIL_MAILER_PATH.  Note that this
  718.         does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS
  719.         for the local mailer; tweak LOCAL_MAILER_FLAGS and
  720.         LOCAL_MAILER_ARGS instead.
  721.  
  722. bestmx_is_local    Accept mail as though locally addressed for any host that
  723.         lists us as the best possible MX record.  This generates
  724.         additional DNS traffic, but should be OK for low to
  725.         medium traffic hosts.  THIS FEATURE IS FUNDAMENTALLY
  726.         INCOMPATIBLE WITH WILDCARD MX RECORDS!!!  If you have
  727.         a wildcard MX record that matches your domain, you
  728.         cannot use this feature.
  729.  
  730. smrsh        Use the SendMail Restricted SHell (smrsh) provided
  731.         with the distribution instead of /bin/sh for mailing
  732.         to programs.  This improves the ability of the local
  733.         system administrator to control what gets run via
  734.         e-mail.  If an argument is provided it is used as the
  735.         pathname to smrsh; otherwise, /usr/local/etc/smrsh is
  736.         assumed.
  737.  
  738.  
  739. +-------+
  740. | HACKS |
  741. +-------+
  742.  
  743. Some things just can't be called features.  To make this clear,
  744. they go in the hack subdirectory and are referenced using the HACK
  745. macro.  These will tend to be site-dependent.  The release
  746. includes the Berkeley-dependent "cssubdomain" hack (that makes
  747. sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
  748. this is intended as a short-term aid while we move hosts into
  749. subdomains.
  750.  
  751.  
  752. +--------------------+
  753. | SITE CONFIGURATION |
  754. +--------------------+
  755.  
  756.     *****************************************************
  757.     * This section is really obsolete, and is preserved    *
  758.     * only for back compatibility.  You should plan on    *
  759.     * using mailertables for new installations.      In    *
  760.     * particular, it doesn't work for the newer forms    *
  761.     * of UUCP mailers, such as uucp-uudom.        *
  762.     *****************************************************
  763.  
  764. Complex sites will need more local configuration information, such as
  765. lists of UUCP hosts they speak with directly.  This can get a bit more
  766. tricky.  For an example of a "complex" site, see cf/ucbvax.mc.
  767.  
  768. If your host is known by several different names, you need to augment
  769. the $=w class.  This is a list of names by which you are known, and
  770. anything sent to an address using a host name in this list will be
  771. treated as local mail.  You can do this in two ways: either create
  772. the file /etc/sendmail.cw containing a list of your aliases (one per
  773. line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
  774. line:
  775.  
  776.     Cw alias.host.name
  777.  
  778. at the end of that file.  See the ``vangogh.mc'' file for an example.
  779. Be sure you use the fully-qualified name of the host, rather than a
  780. short name.
  781.  
  782. The SITECONFIG macro allows you to indirectly reference site-dependent
  783. configuration information stored in the siteconfig subdirectory.  For
  784. example, the line
  785.  
  786.     SITECONFIG(uucp.ucbvax, ucbvax, U)
  787.  
  788. reads the file uucp.ucbvax for local connection information.  The
  789. second parameter is the local name (in this case just "ucbvax" since
  790. it is locally connected, and hence a UUCP hostname).  The third
  791. parameter is the name of both a macro to store the local name (in
  792. this case, $U) and the name of the class (e.g., $=U) in which to store
  793. the host information read from the file.  Another SITECONFIG line reads
  794.  
  795.     SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
  796.  
  797. This says that the file uucp.ucbarpa contains the list of UUCP sites
  798. connected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
  799. store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
  800. is, the name of the relay to which the hosts listed in uucp.ucbarpa
  801. are connected.  [The machine ucbarpa is gone now, but I've left
  802. this out-of-date configuration file around to demonstrate how you
  803. might do this.]
  804.  
  805. Note that the case of SITECONFIG with a third parameter of ``U'' is
  806. special; the second parameter is assumed to be the UUCP name of the
  807. local site, rather than the name of a remote site, and the UUCP name
  808. is entered into $=w (the list of local hostnames) as $U.UUCP.
  809.  
  810. The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
  811. more than a sequence of SITE macros describing connectivity.  For
  812. example:
  813.  
  814.     SITE(cnmat)
  815.     SITE(sgi olympus)
  816.  
  817. The second example demonstrates that you can use two names on the
  818. same line; these are usually aliases for the same host (or are at
  819. least in the same company).
  820.  
  821.  
  822. +--------------------+
  823. | USING UUCP MAILERS |
  824. +--------------------+
  825.  
  826. It's hard to get UUCP mailers right because of the extremely ad hoc
  827. nature of UUCP addressing.  These config files are really designed
  828. for domain-based addressing, even for UUCP sites.
  829.  
  830. There are four UUCP mailers available.  The choice of which one to
  831. use is partly a matter of local preferences and what is running at
  832. the other end of your UUCP connection.  Unlike good protocols that
  833. define what will go over the wire, UUCP uses the policy that you
  834. should do what is right for the other end; if they change, you have
  835. to change.  This makes it hard to do the right thing, and discourages
  836. people from updating their software.  In general, if you can avoid
  837. UUCP, please do.
  838.  
  839. The major choice is whether to go for a domainized scheme or a
  840. non-domainized scheme.  This depends entirely on what the other
  841. end will recognize.  If at all possible, you should encourage the
  842. other end to go to a domain-based system -- non-domainized addresses
  843. don't work entirely properly.
  844.  
  845. The four mailers are:
  846.  
  847.     uucp-old (obsolete name: "uucp")
  848.     This is the oldest, the worst (but the closest to UUCP) way of
  849.     sending messages accros UUCP connections.  It does bangify
  850.     everything and prepends $U (your UUCP name) to the sender's
  851.     address (which can already be a bang path itself).  It can
  852.     only send to one address at a time, so it spends a lot of
  853.     time copying duplicates of messages.  Avoid this if at all
  854.     possible.
  855.  
  856.     uucp-new (obsolete name: "suucp")
  857.     The same as above, except that it assumes that in one rmail
  858.     command you can specify several recipients.  It still has a
  859.     lot of other problems.
  860.  
  861.     uucp-dom
  862.     This UUCP mailer keeps everything as domain addresses.
  863.     Basically, it uses the SMTP mailer rewriting rules.  This mailer
  864.     is only included if MAILER(smtp) is also specified.
  865.  
  866.     Unfortunately, a lot of UUCP mailer transport agents require
  867.     bangified addresses in the envelope, although you can use
  868.     domain-based addresses in the message header.  (The envelope
  869.     shows up as the From_ line on UNIX mail.)  So....
  870.  
  871.     uucp-uudom
  872.     This is a cross between uucp-new (for the envelope addresses)
  873.     and uucp-dom (for the header addresses).  It bangifies the
  874.     envelope sender (From_ line in messages) without adding the
  875.     local hostname, unless there is no host name on the address
  876.     at all (e.g., "wolf") or the host component is a UUCP host name
  877.     instead of a domain name ("somehost!wolf" instead of
  878.     "some.dom.ain!wolf").  This is also included only if MAILER(smtp)
  879.     is also specified.
  880.  
  881. Examples:
  882.  
  883. We are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
  884. following summarizes the sender rewriting for various mailers.
  885.  
  886. Mailer          sender        rewriting in the envelope
  887. ------        ------        -------------------------
  888. uucp-{old,new}    wolf        grasp!wolf
  889. uucp-dom    wolf        wolf@grasp.insa-lyon.fr
  890. uucp-uudom    wolf        grasp.insa-lyon.fr!wolf
  891.  
  892. uucp-{old,new}    wolf@fr.net    grasp!fr.net!wolf
  893. uucp-dom    wolf@fr.net    wolf@fr.net
  894. uucp-uudom    wolf@fr.net    fr.net!wolf
  895.  
  896. uucp-{old,new}    somehost!wolf    grasp!somehost!wolf
  897. uucp-dom    somehost!wolf    somehost!wolf@grasp.insa-lyon.fr
  898. uucp-uudom    somehost!wolf    grasp.insa-lyon.fr!somehost!wolf
  899.  
  900. If you are using one of the domainized UUCP mailers, you really want
  901. to convert all UUCP addresses to domain format -- otherwise, it will
  902. do it for you (and probably not the way you expected).  For example,
  903. if you have the address foo!bar!baz (and you are not sending to foo),
  904. the heuristics will add the @uucp.relay.name or @local.host.name to
  905. this address.  However, if you map foo to foo.host.name first, it
  906. will not add the local hostname.  You can do this using the uucpdomain
  907. feature.
  908.  
  909.  
  910. +-------------------+
  911. | TWEAKING RULESETS |
  912. +-------------------+
  913.  
  914. For more complex configurations, you can define special rules.
  915. The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
  916. the names.  Any modifications made here are reflected in the header.
  917.  
  918. A common use is to convert old UUCP addreses to SMTP addresses using
  919. the UUCPSMTP macro.  For example:
  920.  
  921.     LOCAL_RULE_3
  922.     UUCPSMTP(decvax,    decvax.dec.com)
  923.     UUCPSMTP(research,    research.att.com)
  924.  
  925. will cause addresses of the form "decvax!user" and "research!user"
  926. to be converted to "user@decvax.dec.com" and "user@research.att.com"
  927. respectively.
  928.  
  929. This could also be used to look up hosts in a database map:
  930.  
  931.     LOCAL_RULE_3
  932.     R$* < @ $+ > $*        $: $1 < @ $(hostmap $2 $) > $3
  933.  
  934. This map would be defined in the LOCAL_CONFIG portion, as shown below.
  935.  
  936. Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
  937. For example, new rules are needed to parse hostnames that you accept
  938. via MX records.  For example, you might have:
  939.  
  940.     LOCAL_RULE_0
  941.     R$+ <@ host.dom.ain.>    $#uucp $@ cnmat $: $1 < @ host.dom.ain.>
  942.  
  943. You would use this if you had installed an MX record for cnmat.Berkeley.EDU
  944. pointing at this host; this rule catches the message and forwards it on
  945. using UUCP.
  946.  
  947. You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
  948. These rulesets are normally empty.
  949.  
  950. A similar macro is LOCAL_CONFIG.  This introduces lines added after the
  951. boilerplate option setting but before rulesets, and can be used to
  952. declare local database maps or whatever.  For example:
  953.  
  954.     LOCAL_CONFIG
  955.     Khostmap hash /etc/hostmap.db
  956.     Kyplocal nis -m hosts.byname
  957.  
  958.  
  959. +---------------------------+
  960. | MASQUERADING AND RELAYING |
  961. +---------------------------+
  962.  
  963. You can have your host masquerade as another using
  964.  
  965.     MASQUERADE_AS(host.domain)
  966.  
  967. This causes mail being sent to be labeled as coming from the
  968. indicated host.domain, rather than $j.  One normally masquerades as
  969. one of one's own subdomains (for example, it's unlikely that I would
  970. choose to masquerade as an MIT site).  This behaviour is modified by
  971. a plethora of FEATUREs; in particular, see masquerade_envelope,
  972. allmasquerade, limited_masquerade, and masquerade_entire_domain.
  973.  
  974. The masquerade name is not normally canonified, so it is important
  975. that it be your One True Name, that is, fully qualified and not a
  976. CNAME.  However, if you use a CNAME, the receiving side may canonify
  977. it for you, so don't think you can cheat CNAME mapping this way.
  978.  
  979. Normally the only addresses that are masqueraded are those that come
  980. from this host (that is, are either unqualified or in $=w, the list
  981. of local domain names).  You can augment this list using
  982.  
  983.     MASQUERADE_DOMAIN(otherhost.domain)
  984.  
  985. The effect of this is that although mail to user@otherhost.domain
  986. will not be delivered locally, any mail including any user@otherhost.domain
  987. will, when relayed, be rewritten to have the MASQUERADE_AS address.
  988. This can be a space-separated list of names.
  989.  
  990. If these names are in a file, you can use
  991.  
  992.     MASQUERADE_DOMAIN_FILE(filename)
  993.  
  994. to read the list of names from the indicated file.
  995.  
  996. Normally only header addresses are masqueraded.  If you want to
  997. masquerade the envelope as well, use
  998.  
  999.     FEATURE(masquerade_envelope)
  1000.  
  1001. There are always users that need to be "exposed" -- that is, their
  1002. internal site name should be displayed instead of the masquerade name.
  1003. Root is an example.  You can add users to this list using
  1004.  
  1005.     EXPOSED_USER(usernames)
  1006.  
  1007. This adds users to class E; you could also use something like
  1008.  
  1009.     FE/etc/sendmail.cE
  1010.  
  1011. You can also arrange to relay all unqualified names (that is, names
  1012. without @host) to a relay host.  For example, if you have a central
  1013. email server, you might relay to that host so that users don't have
  1014. to have .forward files or aliases.  You can do this using
  1015.  
  1016.     define(`LOCAL_RELAY', mailer:hostname)
  1017.  
  1018. The ``mailer:'' can be omitted, in which case the mailer defaults to
  1019. "relay".  There are some user names that you don't want relayed, perhaps
  1020. because of local aliases.  A common example is root, which may be
  1021. locally aliased.  You can add entries to this list using
  1022.  
  1023.     LOCAL_USER(usernames)
  1024.  
  1025. This adds users to class L; you could also use something like
  1026.  
  1027.     FL/etc/sendmail.cL
  1028.  
  1029. If you want all incoming mail sent to a centralized hub, as for a
  1030. shared /var/spool/mail scheme, use
  1031.  
  1032.     define(`MAIL_HUB', mailer:hostname)
  1033.  
  1034. Again, ``mailer:'' defaults to "relay".  If you define both LOCAL_RELAY
  1035. and MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
  1036. be sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
  1037. Names in $=L will be delivered locally, so you MUST have aliases or
  1038. .forward files for them.
  1039.  
  1040. For example, if you are on machine mastodon.CS.Berkeley.EDU and you have
  1041. FEATURE(stickyhost), the following combinations of settings will have the
  1042. indicated effects:
  1043.  
  1044. email sent to....    eric              eric@mastodon.CS.Berkeley.EDU
  1045.  
  1046. LOCAL_RELAY set to    mail.CS.Berkeley.EDU      (delivered locally)
  1047. mail.CS.Berkeley.EDU      (no local aliasing)        (aliasing done)
  1048.  
  1049. MAIL_HUB set to        mammoth.CS.Berkeley.EDU      mammoth.CS.Berkeley.EDU
  1050. mammoth.CS.Berkeley.EDU      (aliasing done)        (aliasing done)
  1051.  
  1052. Both LOCAL_RELAY and    mail.CS.Berkeley.EDU      mammoth.CS.Berkeley.EDU
  1053. MAIL_HUB set as above      (no local aliasing)        (aliasing done)
  1054.  
  1055. If you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
  1056. MAIL_HUB act identically, with MAIL_HUB taking precedence.
  1057.  
  1058. If you want all outgoing mail to go to a central relay site, define
  1059. SMART_HOST as well.  Briefly:
  1060.  
  1061.     LOCAL_RELAY applies to unqualifed names (e.g., "eric").
  1062.     MAIL_HUB applies to names qualified with the name of the
  1063.         local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
  1064.     SMART_HOST applies to names qualified with other hosts.
  1065.  
  1066. However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
  1067. DECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
  1068. really want absolutely everything to go to a single central site you will
  1069. need to unset all the other relays -- or better yet, find or build a
  1070. minimal config file that does this.
  1071.  
  1072. For duplicate suppression to work properly, the host name is best
  1073. specified with a terminal dot:
  1074.  
  1075.     define(`MAIL_HUB', `host.domain.')
  1076.           note the trailing dot ---^
  1077.  
  1078.  
  1079. +--------------------------------+
  1080. | ADDING NEW MAILERS OR RULESETS |
  1081. +--------------------------------+
  1082.  
  1083. Sometimes you may need to add entirely new mailers or rulesets.  They
  1084. should be introduced with the constructs MAILER_DEFINITIONS and
  1085. LOCAL_RULESETS respectively.  For example:
  1086.  
  1087.     MAILER_DEFINITIONS
  1088.     Mmymailer, ...
  1089.     ...
  1090.  
  1091.     LOCAL_RULESETS
  1092.     Scheck_relay
  1093.     ...
  1094.  
  1095.  
  1096. +-------------------------------+
  1097. | NON-SMTP BASED CONFIGURATIONS |
  1098. +-------------------------------+
  1099.  
  1100. These configuration files are designed primarily for use by SMTP-based
  1101. sites.  I don't pretend that they are well tuned for UUCP-only or
  1102. UUCP-primarily nodes (the latter is defined as a small local net
  1103. connected to the rest of the world via UUCP).  However, there is one
  1104. hook to handle some special cases.
  1105.  
  1106. You can define a ``smart host'' that understands a richer address syntax
  1107. using:
  1108.  
  1109.     define(`SMART_HOST', mailer:hostname)
  1110.  
  1111. In this case, the ``mailer:'' defaults to "relay".  Any messages that
  1112. can't be handled using the usual UUCP rules are passed to this host.
  1113.  
  1114. If you are on a local SMTP-based net that connects to the outside
  1115. world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
  1116. For example:
  1117.  
  1118.     define(`SMART_HOST', suucp:uunet)
  1119.     LOCAL_NET_CONFIG
  1120.     R$* < @ $* .$m. > $*    $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
  1121.  
  1122. This will cause all names that end in your domain name ($m) via
  1123. SMTP; anything else will be sent via suucp (smart UUCP) to uunet.
  1124. If you have FEATURE(nocanonify), you may need to omit the dots after
  1125. the $m.  If you are running a local DNS inside your domain which is
  1126. not otherwise connected to the outside world, you probably want to
  1127. use:
  1128.  
  1129.     define(`SMART_HOST', smtp:fire.wall.com)
  1130.     LOCAL_NET_CONFIG
  1131.     R$* < @ $* . > $*    $#smtp $@ $2. $: $1 < @ $2. > $3
  1132.  
  1133. That is, send directly only to things you found in your DNS lookup;
  1134. anything else goes through SMART_HOST.
  1135.  
  1136.  
  1137. +-----------+
  1138. | WHO AM I? |
  1139. +-----------+
  1140.  
  1141. Normally, the $j macro is automatically defined to be your fully
  1142. qualified domain name (FQDN).  Sendmail does this by getting your
  1143. host name using gethostname and then calling gethostbyname on the
  1144. result.  For example, in some environments gethostname returns
  1145. only the root of the host name (such as "foo"); gethostbyname is
  1146. supposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
  1147. cases, gethostbyname may fail to return the FQDN.  In this case
  1148. you MUST define confDOMAIN_NAME to be your fully qualified domain
  1149. name.  This is usually done using:
  1150.  
  1151.     Dmbar.com
  1152.     define(`confDOMAIN_NAME', `$w.$m')dnl
  1153.  
  1154.  
  1155. +--------------------+
  1156. | USING MAILERTABLES |
  1157. +--------------------+
  1158.  
  1159. To use FEATURE(mailertable), you will have to create an external
  1160. database containing the routing information for various domains.
  1161. For example, a mailertable file in text format might be:
  1162.  
  1163.     .my.domain        xnet:%1.my.domain
  1164.     uuhost1.my.domain    suucp:uuhost1
  1165.     .bitnet            smtp:relay.bit.net
  1166.  
  1167. This should normally be stored in /etc/mailertable.  The actual
  1168. database version of the mailertable is built using:
  1169.  
  1170.     makemap hash /etc/mailertable.db < /etc/mailertable
  1171.  
  1172. The semantics are simple.  Any LHS entry that does not begin with
  1173. a dot matches the full host name indicated.  LHS entries beginning
  1174. with a dot match anything ending with that domain name -- that is,
  1175. they can be thought of as having a leading "*" wildcard.  Matching
  1176. is done in order of most-to-least qualified -- for example, even
  1177. though ".my.domain" is listed first in the above example, an entry
  1178. of "uuhost1.my.domain" will match the second entry since it is
  1179. more explicit.
  1180.  
  1181. The RHS should always be a "mailer:host" pair.  The mailer is the
  1182. configuration name of a mailer (that is, an `M' line in the
  1183. sendmail.cf file).  The "host" will be the hostname passed to
  1184. that mailer.  In domain-based matches (that is, those with leading
  1185. dots) the "%1" may be used to interpolate the wildcarded part of
  1186. the host name.  For example, the first line above sends everything
  1187. addressed to "anything.my.domain" to that same host name, but using
  1188. the (presumably experimental) xnet mailer.
  1189.  
  1190. In some cases you may want to temporarily turn off MX records,
  1191. particularly on gateways.  For example, you may want to MX
  1192. everything in a domain to one machine that then forwards it
  1193. directly.  To do this, you might use the DNS configuration:
  1194.  
  1195.     *.domain.    IN    MX    0    relay.machine
  1196.  
  1197. and on relay.machine use the mailertable:
  1198.  
  1199.     .domain        smtp:[gateway.domain]
  1200.  
  1201. The [square brackets] turn off MX records for this host only.
  1202. If you didn't do this, the mailertable would use the MX record
  1203. again, which would give you an MX loop.
  1204.  
  1205.  
  1206. +--------------------------------+
  1207. | USING USERDB TO MAP FULL NAMES |
  1208. +--------------------------------+
  1209.  
  1210. The user database was not originally intended for mapping full names
  1211. to login names (e.g., Eric.Allman => eric), but some people are using
  1212. it that way.  (I would recommend that you set up aliases for this
  1213. purpose instead -- since you can specify multiple alias files, this
  1214. is fairly easy.)  The intent was to locate the default maildrop at
  1215. a site, but allow you to override this by sending to a specific host.
  1216.  
  1217. If you decide to set up the user database in this fashion, it is
  1218. imperative that you not use FEATURE(stickyhost) -- otherwise,
  1219. e-mail sent to Full.Name@local.host.name will be rejected.
  1220.  
  1221. To build the internal form of the user database, use:
  1222.  
  1223.     makemap btree /usr/data/base.db < /usr/data/base.txt
  1224.  
  1225. As a general rule, I am adamantly opposed to using full names as
  1226. e-mail addresses, since they are not in any sense unique.  For example,
  1227. the Unix software-development community has two Andy Tannenbaums,
  1228. at least two well-known Peter Deutsches, and at one time Bell Labs
  1229. had two Stephen R. Bournes with offices along the same hallway.
  1230. Which one will be forced to suffer the indignity of being
  1231. Stephen_R_Bourne_2?  The less famous of the two, or the one that
  1232. was hired later?
  1233.  
  1234. Finger should handle full names (and be fuzzy).  Mail should use
  1235. handles, and not be fuzzy.  [Not that I expect anyone to pay any
  1236. attention to my opinions.]
  1237.  
  1238.  
  1239. +--------------------------------+
  1240. | MISCELLANEOUS SPECIAL FEATURES |
  1241. +--------------------------------+
  1242.  
  1243. Plussed users
  1244.     Sometimes it is convenient to merge configuration on a
  1245.     centralized mail machine, for example, to forward all
  1246.     root mail to a mail server.  In this case it might be
  1247.     useful to be able to treat the root addresses as a class
  1248.     of addresses with subtle differences.  You can do this
  1249.     using plussed users.  For example, a client might include
  1250.     the alias:
  1251.  
  1252.         root:  root+client1@server
  1253.  
  1254.     On the server, this will match an alias for "root+client1".
  1255.     If that is not found, the alias "root+*" will be tried,
  1256.     then "root".
  1257.  
  1258. LDAP
  1259.     For notes on use LDAP in sendmail, see
  1260.     http://www-leland.stanford.edu/~bbense/Inst.html
  1261.  
  1262.  
  1263.  
  1264. +----------------+
  1265. | SECURITY NOTES |
  1266. +----------------+
  1267.  
  1268. A lot of sendmail security comes down to you.  Sendmail 8 is much
  1269. more careful about checking for security problems than previous
  1270. versions, but there are some things that you still need to watch
  1271. for.  In particular:
  1272.  
  1273. * Make sure the aliases file isn't writable except by trusted
  1274.   system personnel.  This includes both the text and database
  1275.   version.
  1276.  
  1277. * Make sure that other files that sendmail reads, such as the
  1278.   mailertable, are only writable by trusted system personnel.
  1279.  
  1280. * The queue directory should not be world writable PARTICULARLY
  1281.   if your system allows "file giveaways" (that is, if a non-root
  1282.   user can chown any file they own to any other user).
  1283.  
  1284. * If your system allows file giveaways, DO NOT create a publically
  1285.   writable directory for forward files.  This will allow anyone
  1286.   to steal anyone else's e-mail.  Instead, create a script that
  1287.   copies the .forward file from users' home directories once a
  1288.   night (if you want the non-NFS-mounted forward directory).
  1289.  
  1290. * If your system allows file giveaways, you'll find that
  1291.   sendmail is much less trusting of :include: files -- in
  1292.   particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
  1293.   /etc/shells before they will be trusted (that is, before
  1294.   files and programs listed in them will be honored).
  1295.  
  1296. In general, file giveaways are a mistake -- if you can turn them
  1297. off I recommend you do so.
  1298.  
  1299.  
  1300. +--------------------------------+
  1301. | TWEAKING CONFIGURATION OPTIONS |
  1302. +--------------------------------+
  1303.  
  1304. There are a large number of configuration options that don't normally
  1305. need to be changed.  However, if you feel you need to tweak them, you
  1306. can define the following M4 variables.  This list is shown in four
  1307. columns:  the name you define, the default value for that definition,
  1308. the option or macro that is affected (either Ox for an option or Dx
  1309. for a macro), and a brief description.  Greater detail of the semantics
  1310. can be found in the Installation and Operations Guide.
  1311.  
  1312. Some options are likely to be deprecated in future versions -- that is,
  1313. the option is only included to provide back-compatibility.  These are
  1314. marked with "*".
  1315.  
  1316. Remember that these options are M4 variables, and hence may need to
  1317. be quoted.  In particular, arguments with commas will usually have to
  1318. be ``double quoted, like this phrase'' to avoid having the comma
  1319. confuse things.  This is common for alias file definitions and for
  1320. the read timeout.
  1321.  
  1322. M4 Variable Name    Configuration    Description & [Default]
  1323. ================    =============    =======================
  1324. confMAILER_NAME        $n macro    [MAILER-DAEMON] The sender name used
  1325.                     for internally generated outgoing
  1326.                     messages.
  1327. confDOMAIN_NAME        $j macro    If defined, sets $j.  This should
  1328.                     only be done if your system cannot
  1329.                     determine your local domain name,
  1330.                     and then it should be set to
  1331.                     $w.Foo.COM, where Foo.COM is your
  1332.                     domain name.
  1333. confCF_VERSION        $Z macro    If defined, this is appended to the
  1334.                     configuration version name.
  1335. confFROM_HEADER        From:        [$?x$x <$g>$|$g$.] The format of an 
  1336.                     internally generated From: address.
  1337. confRECEIVED_HEADER    Received:
  1338.         [$?sfrom $s .$?_($?s$|from $.$_)
  1339.             $.by $j ($v/$Z)$?r with $r$. id $i$?u
  1340.             for $u$.;
  1341.             $b]
  1342.                     The format of the Received: header
  1343.                     in messages passed through this host.
  1344.                     It is unwise to try to change this.
  1345. confCW_FILE        Fw class    [/etc/sendmail.cw] Name of file used
  1346.                     to get the local additions to the $=w
  1347.                     (local host names) class.
  1348. confCT_FILE        Ft class    [/etc/sendmail.ct] Name of file used
  1349.                     to get the local additions to the $=t
  1350.                     (trusted users) class.
  1351. confTRUSTED_USERS    Ct class    [no default] Names of users to add to
  1352.                     the list of trusted users.  This list
  1353.                     always includes root, uucp, and daemon.
  1354.                     See also FEATURE(use_ct_file).
  1355. confSMTP_MAILER        -        [esmtp] The mailer name used when
  1356.                     SMTP connectivity is required.
  1357.                     One of "smtp", "smtp8", or "esmtp".
  1358. confUUCP_MAILER        -        [uucp-old] The mailer to be used by
  1359.                     default for bang-format recipient
  1360.                     addresses.  See also discussion of
  1361.                     $=U, $=Y, and $=Z in the MAILER(uucp)
  1362.                     section.
  1363. confLOCAL_MAILER    -        [local] The mailer name used when
  1364.                     local connectivity is required.
  1365.                     Almost always "local".
  1366. confRELAY_MAILER    -        [relay] The default mailer name used
  1367.                     for relaying any mail (e.g., to a
  1368.                     BITNET_RELAY, a SMART_HOST, or
  1369.                     whatever).  This can reasonably be
  1370.                     "uucp-new" if you are on a
  1371.                     UUCP-connected site.
  1372. confSEVEN_BIT_INPUT    SevenBitInput    [False] Force input to seven bits?
  1373. confEIGHT_BIT_HANDLING    EightBitMode    [pass8] 8-bit data handling
  1374. confALIAS_WAIT        AliasWait    [10m] Time to wait for alias file
  1375.                     rebuild until you get bored and
  1376.                     decide that the apparently pending
  1377.                     rebuild failed.
  1378. confMIN_FREE_BLOCKS    MinFreeBlocks    [100] Minimum number of free blocks on
  1379.                     queue filesystem to accept SMTP mail.
  1380.                     (Prior to 8.7 this was minfree/maxsize,
  1381.                     where minfree was the number of free
  1382.                     blocks and maxsize was the maximum
  1383.                     message size.  Use confMAX_MESSAGE_SIZE
  1384.                     for the second value now.)
  1385. confMAX_MESSAGE_SIZE    MaxMessageSize    [infinite] The maximum size of messages
  1386.                     that will be accepted (in bytes).
  1387. confBLANK_SUB        BlankSub    [.] Blank (space) substitution
  1388.                     character.
  1389. confCON_EXPENSIVE    HoldExpensive    [False] Avoid connecting immediately
  1390.                     to mailers marked expensive?
  1391. confCHECKPOINT_INTERVAL    CheckpointInterval
  1392.                     [10] Checkpoint queue files every N
  1393.                     recipients.
  1394. confDELIVERY_MODE    DeliveryMode    [background] Default delivery mode.
  1395. confAUTO_REBUILD    AutoRebuildAliases
  1396.                     [False] Automatically rebuild alias
  1397.                     file if needed.
  1398. confERROR_MODE        ErrorMode    [print] Error message mode.
  1399. confERROR_MESSAGE    ErrorHeader    [undefined] Error message header/file.
  1400. confSAVE_FROM_LINES    SafeFromLine    Save extra leading From_ lines.
  1401. confTEMP_FILE_MODE    TempFileMode    [0600] Temporary file mode.
  1402. confMATCH_GECOS        MatchGECOS    [True] Match GECOS field.
  1403. confMAX_HOP        MaxHopCount    [25] Maximum hop count.
  1404. confIGNORE_DOTS*    IgnoreDots    [False; always False in -bs or -bd mode]
  1405.                     Ignore dot as terminator for incoming
  1406.                     messages?
  1407. confBIND_OPTS        ResolverOptions    [undefined] Default options for DNS
  1408.                     resolver.
  1409. confMIME_FORMAT_ERRORS*    SendMimeErrors    [True] Send error messages as MIME-
  1410.                     encapsulated messages per RFC 1344.
  1411. confFORWARD_PATH    ForwardPath    [$z/.forward.$w:$z/.forward]
  1412.                     The colon-separated list of places to
  1413.                     search for .forward files.  N.B.: see
  1414.                     the Security Notes section.
  1415. confMCI_CACHE_SIZE    ConnectionCacheSize
  1416.                     [2] Size of open connection cache.
  1417. confMCI_CACHE_TIMEOUT    ConnectionCacheTimeout
  1418.                     [5m] Open connection cache timeout.
  1419. confHOST_STATUS_DIRECTORY HostStatusDirectory
  1420.                     [undefined] If set, host status is kept
  1421.                     on disk between sendmail runs in the
  1422.                     named directory tree.  This need not be
  1423.                     a full pathname, in which case it is
  1424.                     interpreted relative to the queue
  1425.                     directory.
  1426. confSINGLE_THREAD_DELIVERY  SingleThreadDelivery
  1427.                     [False] If this option and the
  1428.                     HostStatusDirectory option are both
  1429.                     set, single thread deliveries to other
  1430.                     hosts.  That is, don't allow any two
  1431.                     sendmails on this host to connect
  1432.                     simultaneously to any other single
  1433.                     host.  This can slow down delivery in
  1434.                     some cases, in particular since a
  1435.                     cached but otherwise idle connection
  1436.                     to a host will prevent other sendmails
  1437.                     from connecting to the other host.
  1438. confUSE_ERRORS_TO*    UserErrorsTo    [False] Use the Errors-To: header to
  1439.                     deliver error messages.  This should
  1440.                     not be necessary because of general
  1441.                     acceptance of the envelope/header
  1442.                     distinction.
  1443. confLOG_LEVEL        LogLevel    [9] Log level.
  1444. confME_TOO        MeToo        [False] Include sender in group
  1445.                     expansions.
  1446. confCHECK_ALIASES    CheckAliases    [False] Check RHS of aliases when
  1447.                     running newaliases.  Since this does
  1448.                     DNS lookups on every address, it can
  1449.                     slow down the alias rebuild process
  1450.                     considerably on large alias files.
  1451. confOLD_STYLE_HEADERS*    OldStyleHeaders    [True] Assume that headers without
  1452.                     special chars are old style.
  1453. confDAEMON_OPTIONS    DaemonPortOptions
  1454.                     [none] SMTP daemon options.
  1455. confPRIVACY_FLAGS    PrivacyOptions    [authwarnings] Privacy flags.
  1456. confCOPY_ERRORS_TO    PostmasterCopy    [undefined] Address for additional
  1457.                     copies of all error messages.
  1458. confQUEUE_FACTOR    QueueFactor    [600000] Slope of queue-only function.
  1459. confDONT_PRUNE_ROUTES    DontPruneRoutes    [False] Don't prune down route-addr
  1460.                     syntax addresses to the minimum
  1461.                     possible.
  1462. confSAFE_QUEUE*        SuperSafe    [True] Commit all messages to disk
  1463.                     before forking.
  1464. confTO_INITIAL        Timeout.initial    [5m] The timeout waiting for a response
  1465.                     on the initial connect.
  1466. confTO_CONNECT        Timeout.connect    [0] The timeout waiting for an initial
  1467.                     connect() to complete.  This can only
  1468.                     shorten connection timeouts; the kernel
  1469.                     silently enforces an absolute maximum
  1470.                     (which varies depending on the system).
  1471. confTO_ICONNECT        Timeout.iconnect
  1472.                     [undefined] Like Timeout.connect, but
  1473.                     applies only to the very first attempt
  1474.                     to connect to a host in a message.
  1475.                     This allows a single very fast pass
  1476.                     followed by more careful delivery
  1477.                     attempts in the future.
  1478. confTO_HELO        Timeout.helo    [5m] The timeout waiting for a response
  1479.                     to a HELO or EHLO command.
  1480. confTO_MAIL        Timeout.mail    [10m] The timeout waiting for a
  1481.                     response to the MAIL command.
  1482. confTO_RCPT        Timeout.rcpt    [1h] The timeout waiting for a response
  1483.                     to the RCPT command.
  1484. confTO_DATAINIT        Timeout.datainit
  1485.                     [5m] The timeout waiting for a 354
  1486.                     response from the DATA command.
  1487. confTO_DATABLOCK    Timeout.datablock
  1488.                     [1h] The timeout waiting for a block
  1489.                     during DATA phase.
  1490. confTO_DATAFINAL    Timeout.datafinal
  1491.                     [1h] The timeout waiting for a response
  1492.                     to the final "." that terminates a
  1493.                     message.
  1494. confTO_RSET        Timeout.rset    [5m] The timeout waiting for a response
  1495.                     to the RSET command.
  1496. confTO_QUIT        Timeout.quit    [2m] The timeout waiting for a response
  1497.                     to the QUIT command.
  1498. confTO_MISC        Timeout.misc    [2m] The timeout waiting for a response
  1499.                     to other SMTP commands.
  1500. confTO_COMMAND        Timeout.command    [1h] In server SMTP, the timeout waiting
  1501.                     for a command to be issued.
  1502. confTO_IDENT        Timeout.ident    [30s] The timeout waiting for a response
  1503.                     to an IDENT query.
  1504. confTO_FILEOPEN        Timeout.fileopen
  1505.                     [60s] The timeout waiting for a file
  1506.                     (e.g., :include: file) to be opened.
  1507. confTO_QUEUERETURN    Timeout.queuereturn
  1508.                     [5d] The timeout before a message is
  1509.                     returned as undeliverable.
  1510. confTO_QUEUERETURN_NORMAL
  1511.             Timeout.queuereturn.normal
  1512.                     [undefined] As above, for normal
  1513.                     priority messages.
  1514. confTO_QUEUERETURN_URGENT
  1515.             Timeout.queuereturn.urgent
  1516.                     [undefined] As above, for urgent
  1517.                     priority messages.
  1518. confTO_QUEUERETURN_NONURGENT
  1519.             Timeout.queuereturn.non-urgent
  1520.                     [undefined] As above, for non-urgent
  1521.                     (low) priority messages.
  1522. confTO_QUEUEWARN    Timeout.queuewarn
  1523.                     [4h] The timeout before a warning
  1524.                     message is sent to the sender telling
  1525.                     them that the message has been deferred.
  1526. confTO_QUEUEWARN_NORMAL    Timeout.queuewarn.normal
  1527.                     [undefined] As above, for normal
  1528.                     priority messages.
  1529. confTO_QUEUEWARN_URGENT    Timeout.queuewarn.urgent
  1530.                     [undefined] As above, for urgent
  1531.                     priority messages.
  1532. confTO_QUEUEWARN_NONURGENT
  1533.             Timeout.queuewarn.non-urgent
  1534.                     [undefined] As above, for non-urgent
  1535.                     (low) priority messages.
  1536. confTO_HOSTSTATUS    Timeout.hoststatus
  1537.                     [30m] How long information about host
  1538.                     statuses will be maintained before it
  1539.                     is considered stale and the host should
  1540.                     be retried.  This applies both within
  1541.                     a single queue run and to persistent
  1542.                     information (see below).
  1543. confTIME_ZONE        TimeZoneSpec    [USE_SYSTEM] Time zone info -- can be
  1544.                     USE_SYSTEM to use the system's idea,
  1545.                     USE_TZ to use the user's TZ envariable,
  1546.                     or something else to force that value.
  1547. confDEF_USER_ID        DefaultUser    [1:1] Default user id.
  1548. confUSERDB_SPEC        UserDatabaseSpec
  1549.                     [undefined] User database specification.
  1550. confFALLBACK_MX        FallbackMXhost    [undefined] Fallback MX host.
  1551. confTRY_NULL_MX_LIST    TryNullMXList    [False] If we are the best MX for a
  1552.                     host and haven't made other
  1553.                     arrangements, try connecting to the
  1554.                     host directly; normally this would be
  1555.                     a config error.
  1556. confQUEUE_LA        QueueLA        [8] Load average at which queue-only
  1557.                     function kicks in.
  1558. confREFUSE_LA        RefuseLA    [12] Load average at which incoming
  1559.                     SMTP connections are refused.
  1560. confMAX_DAEMON_CHILDREN    MaxDaemonChildren
  1561.                     [undefined] The maximum number of
  1562.                     children the daemon will permit.  After
  1563.                     this number, connections will be
  1564.                     rejected.  If not set or <= 0, there is
  1565.                     no limit.
  1566. confCONNECTION_RATE_THROTTLE ConnectionRateThrottle
  1567.                     [undefined] The maximum number of
  1568.                     connections permitted per second.
  1569.                     After this many connections are
  1570.                     accepted, further connections will be
  1571.                     delayed.  If not set or <= 0, there is
  1572.                     no limit.
  1573. confWORK_RECIPIENT_FACTOR
  1574.             RecipientFactor    [30000] Cost of each recipient.
  1575. confSEPARATE_PROC    ForkEachJob    [False] Run all deliveries in a separate
  1576.                     process.
  1577. confWORK_CLASS_FACTOR    ClassFactor    [1800] Priority multiplier for class.
  1578. confWORK_TIME_FACTOR    RetryFactor    [90000] Cost of each delivery attempt.
  1579. confQUEUE_SORT_ORDER    QueueSortOrder    [Priority] Queue sort algorithm:
  1580.                     Priority, Host, or Time.
  1581. confMIN_QUEUE_AGE    MinQueueAge    [0] The minimum amount of time a job
  1582.                     must sit in the queue between queue
  1583.                     runs.  This allows you to set the
  1584.                     queue run interval low for better
  1585.                     resposiveness without trying all
  1586.                     jobs in each run.
  1587. confDEF_CHAR_SET    DefaultCharSet    [unknown-8bit] When converting
  1588.                     unlabelled 8 bit input to MIME, the
  1589.                     character set to use by default.
  1590. confSERVICE_SWITCH_FILE    ServiceSwitchFile
  1591.                     [/etc/service.switch] The file to use
  1592.                     for the service switch on systems that
  1593.                     do not have a system-defined switch.
  1594. confHOSTS_FILE        HostsFile    [/etc/hosts] The file to use when doing
  1595.                     "file" type access of hosts names.
  1596. confDIAL_DELAY        DialDelay    [0s] If a connection fails, wait this
  1597.                     long and try again.  Zero means "don't
  1598.                     retry".  This is to allow "dial on
  1599.                     demand" connections to have enough time
  1600.                     to complete a connection.
  1601. confNO_RCPT_ACTION    NoRecipientAction
  1602.                     [none] What to do if there are no legal
  1603.                     recipient fields (To:, Cc: or Bcc:)
  1604.                     in the message.  Legal values can
  1605.                     be "none" to just leave the
  1606.                     nonconforming message as is, "add-to"
  1607.                     to add a To: header with all the
  1608.                     known recipients (which may expose
  1609.                     blind recipients), "add-apparently-to"
  1610.                     to do the same but use Apparently-To:
  1611.                     instead of To:, "add-bcc" to add an
  1612.                     empty Bcc: header, or
  1613.                     "add-to-undisclosed" to add the header
  1614.                     ``To: undisclosed-recipients:;''.
  1615. confSAFE_FILE_ENV    SafeFileEnvironment
  1616.                     [undefined] If set, sendmail will do a
  1617.                     chroot() into this directory before
  1618.                     writing files.
  1619. confCOLON_OK_IN_ADDR    ColonOkInAddr    [True unless Configuration Level > 6]
  1620.                     If set, colons are treated as a regular
  1621.                     character in addresses.  If not set,
  1622.                     they are treated as the introducer to
  1623.                     the RFC 822 "group" syntax.  Colons are
  1624.                     handled properly in route-addrs.  This
  1625.                     option defaults on for V5 and lower
  1626.                     configuration files.
  1627. confMAX_QUEUE_RUN_SIZE    MaxQueueRunSize    [0] If set, limit the maximum size of
  1628.                     any given queue run to this number of
  1629.                     entries.  Essentially, this will stop
  1630.                     reading the queue directory after this
  1631.                     number of entries are reached; it does
  1632.                     _not_ pick the highest priority jobs,
  1633.                     so this should be as large as your
  1634.                     system can tolerate.  If not set, there
  1635.                     is no limit.
  1636. confDONT_EXPAND_CNAMES    DontExpandCnames
  1637.                     [False] If set, $[ ... $] lookups that
  1638.                     do DNS based lookups do not expand
  1639.                     CNAME records.  This currently violates
  1640.                     the published standards, but the IETF
  1641.                     seems to be moving toward legalizing
  1642.                     this.  For example, if "FTP.Foo.ORG"
  1643.                     is a CNAME for "Cruft.Foo.ORG", then
  1644.                     with this option set a lookup of
  1645.                     "FTP" will return "FTP.Foo.ORG"; if
  1646.                     clear it returns "Cruft.FOO.ORG".  N.B.
  1647.                     you may not see any effect until your
  1648.                     downstream neighbors stop doing CNAME
  1649.                     lookups as well.
  1650. confFROM_LINE        UnixFromLine    [From $g  $d] The From_ line used
  1651.                     when sending to files or programs.
  1652. confOPERATORS        OperatorChars    [.:%@!^/[]+] Address operator
  1653.                     characters.
  1654. confSMTP_LOGIN_MSG    SmtpGreetingMessage
  1655.                     [$j Sendmail $v/$Z; $b]
  1656.                     The initial (spontaneous) SMTP
  1657.                     greeting message.  The word "ESMTP"
  1658.                     will be inserted between the first and
  1659.                     second words to convince other
  1660.                     sendmails to try to speak ESMTP.
  1661. confDONT_INIT_GROUPS    DontInitGroups    [False] If set, the initgroups(3)
  1662.                     routine will never be invoked.  You
  1663.                     might want to do this if you are
  1664.                     running NIS and you have a large group
  1665.                     map, since this call does a sequential
  1666.                     scan of the map; in a large site this
  1667.                     can cause your ypserv to run
  1668.                     essentially full time.  If you set
  1669.                     this, agents run on behalf of users
  1670.                     will only have their primary
  1671.                     (/etc/passwd) group permissions.
  1672. confUNSAFE_GROUP_WRITES    UnsafeGroupWrites
  1673.                     [False] If set, group-writable
  1674.                     :include: and .forward files are
  1675.                     considered "unsafe", that is, programs
  1676.                     and files cannot be directly referenced
  1677.                     from such files.  World-writable files
  1678.                     are always considered unsafe.
  1679. confDOUBLE_BOUNCE_ADDRESS  DoubleBounceAddress
  1680.                     [postmaster] If an error occurs when
  1681.                     sending an error message, send that
  1682.                     "double bounce" error message to this
  1683.                     address.
  1684. confRUN_AS_USER        RunAsUser    [undefined] If set, become this user
  1685.                     when reading and delivering mail.
  1686.                     Causes all file reads (e.g., .forward
  1687.                     and :include: files) to be done as
  1688.                     this user.  Also, all programs will
  1689.                     be run as this user, and all output
  1690.                     files will be written as this user.
  1691.                     Intended for use only on firewalls
  1692.                     where users do not have accounts.
  1693.  
  1694. See also the description of OSTYPE for some parameters that can be
  1695. tweaked (generally pathnames to mailers).
  1696.  
  1697.  
  1698. +-----------+
  1699. | HIERARCHY |
  1700. +-----------+
  1701.  
  1702. Within this directory are several subdirectories, to wit:
  1703.  
  1704. m4        General support routines.  These are typically
  1705.         very important and should not be changed without
  1706.         very careful consideration.
  1707.  
  1708. cf        The configuration files themselves.  They have
  1709.         ".mc" suffixes, and must be run through m4 to
  1710.         become complete.  The resulting output should
  1711.         have a ".cf" suffix.
  1712.  
  1713. ostype        Definitions describing a particular operating
  1714.         system type.  These should always be referenced
  1715.         using the OSTYPE macro in the .mc file.  Examples
  1716.         include "bsd4.3", "bsd4.4", "sunos3.5", and
  1717.         "sunos4.1".
  1718.  
  1719. domain        Definitions describing a particular domain, referenced
  1720.         using the DOMAIN macro in the .mc file.  These are
  1721.         site dependent; for example, "CS.Berkeley.EDU.m4"
  1722.         describes hosts in the CS.Berkeley.EDU subdomain.
  1723.  
  1724. mailer        Descriptions of mailers.   These are referenced using
  1725.         the MAILER macro in the .mc file.
  1726.  
  1727. sh        Shell files used when building the .cf file from the
  1728.         .mc file in the cf subdirectory.
  1729.  
  1730. feature        These hold special orthogonal features that you might
  1731.         want to include.  They should be referenced using
  1732.         the FEATURE macro.
  1733.  
  1734. hack        Local hacks.  These can be referenced using the HACK
  1735.         macro.  They shouldn't be of more than voyeuristic
  1736.         interest outside the .Berkeley.EDU domain, but who knows?
  1737.         We've all got our own peccadillos.
  1738.  
  1739. siteconfig    Site configuration -- e.g., tables of locally connected
  1740.         UUCP sites.
  1741.  
  1742.  
  1743. +------------------------+
  1744. | ADMINISTRATIVE DETAILS |
  1745. +------------------------+
  1746.  
  1747. The following sections detail usage of certain internal parts of the
  1748. sendmail.cf file.  Read them carefully if you are trying to modify
  1749. the current model.  If you find the above descriptions adequate, these
  1750. should be {boring, confusing, tedious, ridiculous} (pick one or more).
  1751.  
  1752. RULESETS (* means built in to sendmail)
  1753.  
  1754.    0 *    Parsing
  1755.    1 *    Sender rewriting
  1756.    2 *    Recipient rewriting
  1757.    3 *    Canonicalization
  1758.    4 *    Post cleanup
  1759.    5 *    Local address rewrite (after aliasing)
  1760.   1x    mailer rules (sender qualification)
  1761.   2x    mailer rules (recipient qualification)
  1762.   3x    mailer rules (sender header qualification)
  1763.   4x    mailer rules (recipient header qualification)
  1764.   5x    mailer subroutines (general)
  1765.   6x    mailer subroutines (general)
  1766.   7x    mailer subroutines (general)
  1767.   8x    reserved
  1768.   90    Mailertable host stripping
  1769.   96    Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
  1770.   97    Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
  1771.   98    Local part of ruleset 0 (ruleset 8 in old sendmail)
  1772.   99    Guaranteed null (for debugging)
  1773.  
  1774.  
  1775. MAILERS
  1776.  
  1777.    0    local, prog    local and program mailers
  1778.    1    [e]smtp, relay    SMTP channel
  1779.    2    uucp-*        UNIX-to-UNIX Copy Program
  1780.    3    netnews        Network News delivery
  1781.    4    fax        Sam Leffler's HylaFAX software
  1782.    5    mail11        DECnet mailer
  1783.  
  1784.  
  1785. MACROS
  1786.  
  1787.    A
  1788.    B    Bitnet Relay
  1789.    C    DECnet Relay
  1790.    D    The local domain -- usually not needed
  1791.    E    reserved for X.400 Relay
  1792.    F    FAX Relay
  1793.    G
  1794.    H    mail Hub (for mail clusters)
  1795.    I
  1796.    J
  1797.    K
  1798.    L    Luser Relay
  1799.    M    Masquerade (who I claim to be)
  1800.    N
  1801.    O
  1802.    P
  1803.    Q
  1804.    R    Relay (for unqualified names)
  1805.    S    Smart Host
  1806.    T
  1807.    U    my UUCP name (if I have a UUCP connection)
  1808.    V    UUCP Relay (class V hosts)
  1809.    W    UUCP Relay (class W hosts)
  1810.    X    UUCP Relay (class X hosts)
  1811.    Y    UUCP Relay (all other hosts)
  1812.    Z    Version number
  1813.  
  1814.  
  1815. CLASSES
  1816.  
  1817.    A
  1818.    B    domains that are candidates for bestmx lookup
  1819.    C
  1820.    D
  1821.    E    addresses that should not seem to come from $M
  1822.    F    hosts we forward for
  1823.    G    domains that should be looked up in genericstable
  1824.    H
  1825.    I
  1826.    J
  1827.    K
  1828.    L    addresses that should not be forwarded to $R
  1829.    M    domains that should be mapped to $M
  1830.    N
  1831.    O    operators that indicate network operations (cannot be in local names)
  1832.    P    top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
  1833.    Q
  1834.    R    domains we are willing to relay (pass anti-spam filters)
  1835.    S
  1836.    T
  1837.    U    locally connected UUCP hosts
  1838.    V    UUCP hosts connected to relay $V
  1839.    W    UUCP hosts connected to relay $W
  1840.    X    UUCP hosts connected to relay $X
  1841.    Y    locally connected smart UUCP hosts
  1842.    Z    locally connected domain-ized UUCP hosts
  1843.    .    the class containing only a dot
  1844.    [    the class containing only a left bracket
  1845.  
  1846.  
  1847. M4 DIVERSIONS
  1848.  
  1849.    1    Local host detection and resolution
  1850.    2    Local Ruleset 3 additions
  1851.    3    Local Ruleset 0 additions
  1852.    4    UUCP Ruleset 0 additions
  1853.    5    locally interpreted names (overrides $R)
  1854.    6    local configuration (at top of file)
  1855.    7    mailer definitions
  1856.    8
  1857.    9    special local rulesets (1 and 2)
  1858.