make everything configurable on M4 macros
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 13 Feb 1993 04:11:30 +0000 (20:11 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 13 Feb 1993 04:11:30 +0000 (20:11 -0800)
SCCS-vsn: usr.sbin/sendmail/cf/m4/cf.m4 6.2
SCCS-vsn: usr.sbin/sendmail/cf/m4/proto.m4 6.3
SCCS-vsn: usr.sbin/sendmail/cf/m4/version.m4 6.4
SCCS-vsn: usr.sbin/sendmail/cf/README 6.3

usr/src/usr.sbin/sendmail/cf/README
usr/src/usr.sbin/sendmail/cf/m4/cf.m4
usr/src/usr.sbin/sendmail/cf/m4/proto.m4
usr/src/usr.sbin/sendmail/cf/m4/version.m4

index f1366f4..0956680 100644 (file)
@@ -4,7 +4,7 @@
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
-               @(#)README      6.2 (Berkeley) %G%
+               @(#)README      6.3 (Berkeley) %G%
 
 
 This document describes the sendmail configuration files being used
 
 
 This document describes the sendmail configuration files being used
@@ -325,14 +325,11 @@ using UUCP.
 
 A similar macro is LOCAL_CONFIG.  This introduces lines added after the
 boilerplate option setting but before rulesets, and can be used to
 
 A similar macro is LOCAL_CONFIG.  This introduces lines added after the
 boilerplate option setting but before rulesets, and can be used to
-override default options, declare local database maps, or whatever.
-For example:
+declare local database maps or whatever.  For example:
 
        LOCAL_CONFIG
        Khostmap hash /etc/hostmap.db
        Kyplocal nis -m hosts.byname
 
        LOCAL_CONFIG
        Khostmap hash /etc/hostmap.db
        Kyplocal nis -m hosts.byname
-       OJ/var/forward/$u:$z/.forward
-       OL3
 
 +---------------------------+
 | MASQUERADING AND RELAYING |
 
 +---------------------------+
 | MASQUERADING AND RELAYING |
@@ -396,6 +393,89 @@ mammoth.CS.Berkeley.EDU
 Both LOCAL_RELAY and   mail.CS.Berkeley.EDU      mammoth.CS.Berkeley.EDU
 MAIL_HUB set as above
 
 Both LOCAL_RELAY and   mail.CS.Berkeley.EDU      mammoth.CS.Berkeley.EDU
 MAIL_HUB set as above
 
++--------------------------------+
+| TWEAKING CONFIGURATION OPTIONS |
++--------------------------------+
+
+There are a large number of configuration options that don't normally
+need to be changed.  However, if you feel you need to tweak them, you
+can define the following M4 variables.  This list is shown in four
+columns:  the name you define, the default value for that definition,
+the option or macro that is affected (either Ox for an option or Dx
+for a macro), and a brief description.  Greater detail of the semantics
+can be found in the Installation and Operations Guide.
+
+M4 Variable Name       Default         Mac/Opt Description
+confMAILER_NAME                MAILER-DAEMON   Dn      The sender name used for
+                                               internally generated
+                                               outgoing messages.
+confFROM_LINE          From $?<$<$|$g$.  $d    The From_ line used when
+                                       Dl      sending to files or programs.
+confFROM_HEADER                $?x$x <$g>$|$g$.        The format of an internally
+                                       Dq      generated From: address.
+confOPERATORS          .:%@!^/[]       Do      Address operator characters.
+confSTMP_LOGIN_MSG     $j Sendmail $v/$Z ready at $b
+                                       De      The initial (spontaneous)
+                                               SMTP greeting message.
+confEIGHT_BIT_INPUT    False           O8      Use 8-bit input?
+confALIAS_WAIT         10              Oa      Wait (in minutes) for alias
+                                               file rebuild.
+confBLANK_SUB          .               OB      Blank (space) substitution
+                                               character.
+confCON_EXPENSIVE      False           Oc      Connect immediately to
+                                               mailers marked expensive?
+confCHECKPOINT_INTERVAL        10              OC      Checkpoint queue files
+                                               every N recipients.
+confDELIVERY_MODE      background      Od      Default delivery mode.
+confAUTO_REBUILD       False           OD      Automatically rebuild
+                                               alias file if needed.
+confERROR_MODE         (undefined)     Oe      Error message mode.
+confERROR_MESSAGE      (undefined)     OE      Error message header/file.
+confSAVE_FROM_LINES    False           Of      Save extra leading
+                                               From_ lines.
+confTEMP_FILE_MODE     0600            OF      Temporary file mode.
+confDEF_GROUP_ID       1               Og      Default group id.
+confMATCH_GECOS                False           OG      Match GECOS field.
+confMAX_HOP            17              Oh      Maximum hop count.
+confIGNORE_DOTS                False           Oi      Ignore dot as terminator
+                                               for incoming messages?
+confBIND_OPTS          (empty)         OI      Default options for BIND.
+confMCI_CACHE_SIZE     2               Ok      Size of open connection cache.
+confMCI_CACHE_TIMEOUT  5m              OK      Open connection cache timeout.
+confLOG_LEVEL          9               OL      Log level.
+confME_TOO             False           Om      Include sender in group
+                                               expansions.
+confCHECK_ALIASES      True            On      Check RHS of aliases when
+                                               running newaliases.
+confOLD_STYLE_HEADERS  True            Oo      Assume that headers without
+                                               special chars are old style.
+confCOPY_ERRORS_TO     (undefined)     OP      Address for additional copies
+                                               of all error messages.
+confQUEUE_FACTOR       (undefined)     Oq      Slope of queue-only function
+confREAD_TIMEOUT       20m             Or      SMTP read timeout.
+confSAFE_QUEUE         True            Os      Commit all messages to disk
+                                               before forking.
+confMESSAGE_TIMEOUT    3d              OT      Timeout for messages before
+                                               sending error message.
+confTIME_ZONE          USE_SYSTEM      Oz      Time zone info -- can be
+                                               USE_SYSTEM to use the system's
+                                               idea, USE_TZ to use the user's
+                                               TZ envariable, or something
+                                               else to force that value.
+confDEF_USER_ID                1               Ou      Default user id.
+confNO_WILDCARD_MX     False           Ow      No wildcard MX records matches
+                                               our domain.
+confQUEUE_LA           8               Ox      Load average at which queue-only
+                                               function kicks in.
+confREFUSE_LA          12              OX      Load average at which incoming
+                                               SMTP connections are refused.
+confSEPARATE_PROC      False           Oy      Run all deliveries in a
+                                               separate process.
+confWORK_RECIPIENT_FACTOR
+                       (undefined)     OY      Cost of each recipient.
+confWORK_CLASS_FACTOR  (undefined)     Oz      Priority multiplier for class.
+confWORK_TIME_FACTOR   (undefined)     OZ      Cost of each delivery attempt.
+
 +-----------+
 | HIERARCHY |
 +-----------+
 +-----------+
 | HIERARCHY |
 +-----------+
index 496332a..b2894fb 100644 (file)
@@ -61,5 +61,38 @@ define(`MASQUERADE_AS', `define(`MASQUERADE_NAME', $1)')
 
 m4wrap(`include(`../m4/proto.m4')')
 
 
 m4wrap(`include(`../m4/proto.m4')')
 
+# define default values for options
+define(`confMAILER_NAME', ``MAILER-DAEMON'')
+define(`confFROM_LINE', `From $?<$<$|$g$.  $d')
+define(`confOPERATORS', `.:%@!^/[]')
+define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z ready at $b')
+define(`confEIGHT_BIT_INPUT', `False')
+define(`confALIAS_WAIT', `10')
+define(`confBLANK_SUB', `.')
+define(`confCON_EXPENSIVE', `False')
+define(`confCHECKPOINT_INTERVAL', `10')
+define(`confDELIVERY_MODE', `background')
+define(`confAUTO_REBUILD', `False')
+define(`confSAVE_FROM_LINES', `False')
+define(`confTEMP_FILE_MODE', `0600')
+define(`confDEF_GROUP_ID', `1')
+define(`confMAX_HOP', `17')
+define(`confIGNORE_DOTS', `False')
+define(`confBIND_OPTS', `')
+define(`confMCI_CACHE_SIZE', `2')
+define(`confMCI_CACHE_TIMEOUT', `5m')
+define(`confLOG_LEVEL', `9')
+define(`confME_TOO', `False')
+define(`confCHECK_ALIASES', `True')
+define(`confOLD_STYLE_HEADERS', `True')
+define(`confREAD_TIMEOUT', `20m')
+define(`confSAFE_QUEUE', `True')
+define(`confMESSAGE_TIMEOUT', `3d')
+define(`confTIME_ZONE', `USE_SYSTEM')
+define(`confDEF_USER_ID', `1')
+define(`confQUEUE_LA', `8')
+define(`confREFUSE_LA', `12')
+define(`confSEPARATE_PROC', `False')
+
 divert(0)dnl
 divert(0)dnl
-VERSIONID(`@(#)cf.m4   6.1 (Berkeley) %G%')
+VERSIONID(`@(#)cf.m4   6.2 (Berkeley) %G%')
index 08de911..3923408 100644 (file)
@@ -8,7 +8,7 @@ divert(-1)
 #
 divert(0)
 
 #
 divert(0)
 
-VERSIONID(`@(#)proto.m4        6.2 (Berkeley) %G%')
+VERSIONID(`@(#)proto.m4        6.3 (Berkeley) %G%')
 
 MAILER(local)dnl
 
 
 MAILER(local)dnl
 
@@ -28,14 +28,17 @@ Fw/etc/sendmail.cw', `dnl')
 ifdef(`UUCP_RELAY',
 `# UUCP relay host
 CONCAT(DY, UUCP_RELAY)
 ifdef(`UUCP_RELAY',
 `# UUCP relay host
 CONCAT(DY, UUCP_RELAY)
+
 ')dnl
 ifdef(`BITNET_RELAY',
 `#  BITNET relay host
 CONCAT(DB, BITNET_RELAY)
 ')dnl
 ifdef(`BITNET_RELAY',
 `#  BITNET relay host
 CONCAT(DB, BITNET_RELAY)
+
 ')dnl
 ifdef(`CSNET_RELAY',
 `# CSNET relay host
 CONCAT(DC, CSNET_RELAY)
 ')dnl
 ifdef(`CSNET_RELAY',
 `# CSNET relay host
 CONCAT(DC, CSNET_RELAY)
+
 ')dnl
 # my official hostname ($w or $w.$D)
 CONCAT(Dj$w, ifdef(`NEED_DOMAIN', .$D))
 ')dnl
 # my official hostname ($w or $w.$D)
 CONCAT(Dj$w, ifdef(`NEED_DOMAIN', .$D))
@@ -61,14 +64,214 @@ CO @ % !
 # a class with just dot (for identifying canonical names)
 C..
 
 # a class with just dot (for identifying canonical names)
 C..
 
-# list of locations of user database file (null means no lookup)
-OU`'ifdef(`USERDB_SPEC', `USERDB_SPEC')
 
 
-# set if we can guarantee no wildcard MX records matching our domain
-Ow`'ifdef(`_NO_WILDCARD_MX_', `True', `False')
+######################
+#   Special macros   #
+######################
+
+# SMTP initial login message
+CONCAT(De, confSMTP_LOGIN_MSG)
+
+# UNIX initial From header format
+CONCAT(Dl, confFROM_LINE)
 
 
+# my name for error messages
+CONCAT(Dn, confMAILER_NAME)
+
+# delimiter (operator) characters
+CONCAT(Do, confOPERATORS)
+
+# format of a total name
+CONCAT(Dq, ifdef(`confFROM_HEADER', confFROM_HEADER,
+       ifdef(`_OLD_SENDMAIL_', `$g$?x ($x)$.', `$?x$x <$g>$|$g$.')))
 include(`../m4/version.m4')
 include(`../m4/version.m4')
-include(`../m4/boilerplate.m4')
+
+###############
+#   Options   #
+###############
+
+# preserve 8 bits on message body on input?
+CONCAT(O8, confEIGHT_BIT_INPUT)
+
+# wait (in minutes) for alias file rebuild
+CONCAT(Oa, confALIAS_WAIT)
+
+# location of alias file
+CONCAT(OA, ifdef(`ALIAS_FILE', ALIAS_FILE, /etc/aliases))
+
+# substitution for space (blank) characters
+CONCAT(OB, confBLANK_SUB)
+
+# connect to "expensive" mailers on initial submission?
+CONCAT(Oc, confCON_EXPENSIVE)
+
+# checkpoint queue runs after every N successful deliveries
+CONCAT(OC, confCHECKPOINT_INTERVAL)
+
+# default delivery mode
+CONCAT(Od, confDELIVERY_MODE)
+
+# automatically rebuild the alias database?
+CONCAT(OD, confAUTO_REBUILD)
+
+# error message header/file */
+ifdef(`confERROR_MESSAGE',
+       concat(OE, confERROR_MESSAGE),
+       #OE/etc/sendmail.oE)
+
+# error mode
+ifdef(`confERROR_MODE',
+       concat(Oe, confERROR_MODE),
+       #Oep)
+
+# save Unix-style "From_" lines at top of header?
+CONCAT(Of, confSAVE_FROM_LINES)
+
+# temporary file mode
+CONCAT(OF, confTEMP_FILE_MODE)
+
+# match recipients against GECOS field?
+CONCAT(OG, confMATCH_GECOS)
+
+# default GID
+CONCAT(Og, confDEF_GROUP_ID)
+
+# maximum hop count
+CONCAT(Oh, confMAX_HOP)
+
+# location of help file
+CONCAT(OH, ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf))
+
+# ignore dots as terminators in incoming messages?
+CONCAT(Oi, confIGNORE_DOTS)
+
+# Insist that the BIND name server be running to resolve names
+ifdef(`confBIND_OPTS',
+       CONCAT(OI, confBIND_OPTS),
+       #OI)
+
+# Forward file search path
+ifdef(`confFORWARD_PATH',
+       CONCAT(OJ, confFORWARD_PATH),
+       #OJ/var/forward/$u:$z/.forward.$w:$z/.forward)
+
+# open connection cache size
+CONCAT(Ok, confMCI_CACHE_SIZE)
+
+# open connection cache timeout
+CONCAT(OK, confMCI_CACHE_TIMEOUT)
+
+# log level
+CONCAT(OL, confLOG_LEVEL)
+
+# send to me too, even in an alias expansion?
+CONCAT(Om, confME_TOO)
+
+# verify RHS in newaliases?
+CONCAT(On, confCHECK_ALIASES)
+
+# default messages to old style headers if no special punctuation?
+CONCAT(Oo, confOLD_STYLE_HEADERS)
+
+# who (if anyone) should get extra copies of error messages
+ifdef(`confCOPY_ERRORS_TO',
+       CONCAT(OP, confCOPY_ERRORS_TO),
+       #OPPostmaster)
+
+# slope of queue-only function
+ifdef(`confQUEUE_FACTOR',
+       CONCAT(Oq, confQUEUE_FACTOR),
+       #Oq600000)
+
+# queue directory
+CONCAT(OQ, ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue))
+
+# read timeout -- now OK per RFC 1123 section 5.3.2
+CONCAT(Or, confREAD_TIMEOUT)
+
+# queue up everything before forking?
+CONCAT(Os, confSAFE_QUEUE)
+
+# status file
+CONCAT(OS, ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st))
+
+# default message timeout interval
+CONCAT(OT, confMESSAGE_TIMEOUT)
+
+# time zone handling:
+#  if undefined, use system default
+#  if defined but null, use TZ envariable passed in
+#  if defined and non-null, use that info
+ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
+       confTIME_ZONE, `USE_TZ', `',
+       `CONCAT(Ot, confTIME_ZONE)')
+
+# default UID
+CONCAT(Ou, confDEF_USER_ID)
+
+# list of locations of user database file (null means no lookup)
+CONCAT(OU, ifdef(`USERDB_SPEC', `USERDB_SPEC'))
+
+# can we guarantee no wildcard MX records matching our domain?
+CONCAT(Ow, confNO_WILDCARD_MX)
+
+# load average at which we just queue messages
+CONCAT(Ox, confQUEUE_LA)
+
+# load average at which we refuse connections
+CONCAT(OX, confREFUSE_LA)
+
+# work recipient factor
+ifdef(`confWORK_RECIPIENT_FACTOR',
+       CONCAT(Oy, confWORK_RECIPIENT_FACTOR),
+       #Oy30000)
+
+# deliver each queued job in a separate process?
+CONCAT(OY, confSEPARATE_PROC)
+
+# work class factor
+ifdef(`confWORK_CLASS_FACTOR',
+       CONCAT(Oz, confWORK_CLASS_FACTOR),
+       #Oz1800)
+
+# work time factor
+ifdef(`confWORK_TIME_FACTOR',
+       CONCAT(OZ, confWORK_TIME_FACTOR),
+       #OZ90000)
+
+###########################
+#   Message precedences   #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Pbulk=-60
+Pjunk=-100
+
+#####################
+#   Trusted users   #
+#####################
+
+Troot
+Tdaemon
+Tuucp
+
+#########################
+#   Format of headers   #
+#########################
+
+H?P?Return-Path: <$?<$<$|$g$.>
+HReceived: $?sfrom $s $.by $j ($v/$Z) id $i; $b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $q
+H?F?From: $q
+H?x?Full-Name: $x
+HSubject:
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
 undivert(6)dnl
 #\f
 ######################################################################
 undivert(6)dnl
 #\f
 ######################################################################
index 6f42800..66f5ea3 100644 (file)
@@ -6,11 +6,8 @@ divert(-1)
 #
 # %sccs.include.redist.sh%
 #
 #
 # %sccs.include.redist.sh%
 #
-VERSIONID(`@(#)version.m4      6.3 (Berkeley) %G%')
+VERSIONID(`@(#)version.m4      6.4 (Berkeley) %G%')
 #
 divert(0)
 #
 divert(0)
-######################
-#   Version Number   #
-######################
-
-DZ6.3
+# Configuration version number
+DZ6.4