X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/34e49bd3b9e5c2d94d154ddc69ec648ace90f9c1..f6232b5e603c23afde61de81c8d09e56cd6247de:/usr/src/usr.sbin/sendmail/cf/README diff --git a/usr/src/usr.sbin/sendmail/cf/README b/usr/src/usr.sbin/sendmail/cf/README index f1366f48a7..9dd513c0ee 100644 --- a/usr/src/usr.sbin/sendmail/cf/README +++ b/usr/src/usr.sbin/sendmail/cf/README @@ -4,7 +4,7 @@ Eric Allman - @(#)README 6.2 (Berkeley) %G% + @(#)README 6.23 (Berkeley) %G% This document describes the sendmail configuration files being used @@ -36,10 +36,20 @@ language unto itself) also works, but I don't intend to work so hard to keep this up in the future. [Note to GNU folks: the construct "define(`FOO')" should work without my having to add a null value.] +IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run +"m4 foo.mc > foo.cf" -- that should be all you need. + +To get started, you may want to look at tcpproto.mc (for TCP-only +sites) and uucpproto.m4 (for UUCP-only sites). Others are versions +that we use at Berkeley, although not all are in current use. For +example, ucbarpa has gone away, but I've left ucbarpa.mc in because +it demonstrates some interesting techniques. + I'm not pretending that this README describes everything that these configuration files can do; clever people can probably tweak them to great effect. But it should get you started. + +--------------------------+ | INTRODUCTION AND EXAMPLE | +--------------------------+ @@ -103,6 +113,7 @@ local hostname. Internaly this is effected by using These describe the mailers used at the default CS site site. The local mailer is always included automatically. + +--------+ | OSTYPE | +--------+ @@ -123,14 +134,19 @@ ALIAS_FILE [/etc/aliases] The location of the text version HELP_FILE [/usr/lib/sendmail.hf] The name of the file containing information printed in response to the SMTP HELP command. -LOCAL_MAILER [/bin/mail] The program used to deliver local mail. -LOCAL_SHELL [/bin/sh] The shell used to deliver piped email. QUEUE_DIR [/var/spool/mqueue] The directory containing queue files. STATUS_FILE [/etc/sendmail.st] The file containing status information. +LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. LOCAL_MAILER_FLAGS [rn] The flags used by the local mailer. The flags lsDFMm are always included. +LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. +USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program + used to submit news. +USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. +USENET_MAILER_ARGS [-m -h -n] The command line arguments for the + usenet mailer. HOSTMAP_SPEC [dbm -o /etc/hostmap] The value for the builtin hostmap key definition. You can redefine this to change the class, flags, and filename of @@ -147,9 +163,12 @@ NEED_DOMAIN If set, the $j macro is defined as $w.$D. but possibly in the .mc file). You will only need this if you define your system hostname without a domain (type "hostname" -- if it - has no dots in the output, you qualify) or if - you are running Ultrix or OSF/1 sendmail. - Either of these is probably a mistake. + has no dots in the output, you qualify) AND + if you are not running the nameserver AND if + the first (canonical) name in /etc/hosts for + your machine has no domain -- OR if you are + running Ultrix or OSF/1 sendmail. Either of + these is probably a mistake. +---------+ | DOMAINS | @@ -176,9 +195,14 @@ LOCAL_RELAY The site that will handle unqualified names -- that methods. The domain file can also be used to define a domain name, if needed -(using "DD") and set certain site-wide features, such as -no_wildcard_MX. If all hosts at your site masquerade behind one -email name, you could also use MASQUERADE_AS here. +(using "DD") and set certain site-wide features. If all hosts +at your site masquerade behind one email name, you could also use +MASQUERADE_AS here. + +You do not have to define a domain -- in particular, if you are a +single machine sitting off somewhere, it is probably more work than +it's worth. This is just a mechanism for combining "domain dependent +knowledge" into one place. +---------+ | MAILERS | @@ -207,6 +231,17 @@ uucp The Unix-to-Unix Copy Program mailer. Actually, this this is a function of what version of rmail runs on the receiving end, and hence may be out of your control. +usenet Usenet (network news) delivery. If this is specified, + an extra rule is added to ruleset 0 that forwards all + local email for users named ``group.usenet'' to the + ``inews'' program. Note that this works for all groups, + and may be considered a security problem. + +fax Facsimile transmission. This is experimental and based + on Sam Leffler's FlexFAX software. For more information, + see below. + + +----------+ | FEATURES | +----------+ @@ -217,24 +252,59 @@ example, the .mc line: FEATURE(use_cw_file) tells sendmail that you want to have it read an /etc/sendmail.cw -file to get values for class $=w. Available features are: +file to get values for class $=w. The FEATURE may contain a single +optional parameter -- for example: + + FEATURE(mailertable, dbm /usr/lib/mailertable) + +Available features are: use_cw_file Read the file /etc/sendmail.cw file to get alternate names for this host. This might be used if you were on a host that MXed for a dynamic set of other hosts. If the set is static, just including the line "Cw ..." is probably superior. - -no_wildcard_MX This domain does not have a wildcard MX record that - matches it. For example, I am in domain - CS.Berkeley.EDU, and there is no MX record that - matches *.CS.Berkeley.EDU or *.Berkeley.EDU, so I - can safely use this feature. If you set this, you - get better name server performance. + The actual filename can be overridden by redefining + confCW_FILE. +redirect Reject all mail addressed to "address.REDIRECT" with + a ``551 User not local; please try
'' message. + If this is set, you can alias people who have left + to their new address with ".REDIRECT" appended. +nouucp Don't do anything special with UUCP addresses at all. +nocanonify Don't pass addresses to $[ ... $] for canonification. + This would generally only be used by sites that only + act as mail gateways or which have user agents that do + full canonification themselves. +notsticky By default, email sent to "user@local.host" are marked + as "sticky" -- that is, the local addresses aren't + matched against UDB and don't go through ruleset 5. + This features disables this treatment. It would + normally be used on network gateway machines. +mailertable Include a "mailer table" which can be used to override + routing for particular domains. The argument of the + FEATURE may be the key definition. If none is specified, + the definition used is: + hash /etc/mailertable.db -o + Keys in this database must be of the form: + mailer:domain +bitdomain Look up bitnet hosts in a table to try to turn them into + internet addresses. The table can be built using the + bitdomain program contributed by John Gardiner Meyers. + The argument of the FEATURE may be the key definition; if + none is specified, the definition used is: + hash /etc/bitdomain.db -o + Keys are the bitnet hostname; values are the corresponding + internet hostname. +uucpdomain Similar feature for UUCP hosts. The default map definition + is: + hash /etc/uudomain.db -o + At the moment there is no automagic tool to build this + database. Other FEATUREs should be defined, but I was trying to keep these config files fairly lean and mean. + +-------+ | HACKS | +-------+ @@ -247,6 +317,7 @@ sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; this is intended as a short-term aid while we move hosts into subdomains. + +--------------------+ | SITE CONFIGURATION | +--------------------+ @@ -286,6 +357,7 @@ The second example demonstrates that you can use two names on the same line; these are usually aliases for the same host (or are at least in the same company). + +-------------------+ | TWEAKING RULESETS | +-------------------+ @@ -323,16 +395,17 @@ You would use this if you had installed an MX record for cnmat.Berkeley.EDU pointing at this host; this rule catches the message and forwards it on using UUCP. +You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. +These rulesets are normally empty. + 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 - OJ/var/forward/$u:$z/.forward - OL3 + +---------------------------+ | MASQUERADING AND RELAYING | @@ -362,11 +435,12 @@ without @host) to a relay host. For example, if you have a central email server, you might relay to that host so that users don't have to have .forward files or aliases. You can do this using - define(`LOCAL_RELAY', hostname) + define(`LOCAL_RELAY', mailer:hostname) -There are some user names that you don't want relayed, perhaps because -of local aliases. A common example is root, which may be locally -aliased. You can add entries to this list using +The ``mailer:'' can be omitted, in which case the mailer defaults to +"smtp". There are some user names that you don't want relayed, perhaps +because of local aliases. A common example is root, which may be +locally aliased. You can add entries to this list using LOCAL_USER(usernames) @@ -377,13 +451,13 @@ This adds users to class L; you could also use something like If you want all mail sent to a centralized hub, as for a shared /var/spool/mail scheme, use - define(`MAIL_HUB', hostname) + define(`MAIL_HUB', mailer:hostname) -If you define both LOCAL_RELAY and MAIL_HUB, unqualified names and -names in class L will be sent to the LOCAL_RELAY and other local names -will be sent to MAIL_HUB. For example, if are on machine -mastodon.CS.Berkeley.EDU, the following combinations of settings -will have the indicated effects: +Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY +and MAIL_HUB, unqualified names and names in class L will be sent to +the LOCAL_RELAY and other local names will be sent to MAIL_HUB. For +example, if are on machine mastodon.CS.Berkeley.EDU, the following +combinations of settings will have the indicated effects: email sent to.... eric eric@mastodon.CS.Berkeley.EDU @@ -396,6 +470,227 @@ mammoth.CS.Berkeley.EDU Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU MAIL_HUB set as above + ++-------------------------------+ +| NON-SMTP BASED CONFIGURATIONS | ++-------------------------------+ + +These configuration files are designed primarily for use by SMTP-based +sites. I don't pretend that they are well tuned for UUCP-only or +UUCP-primarily nodes (the latter is defined as a small local net +connected to the rest of the world via UUCP). However, there is one +hook to handle some special cases. + +You can define a ``smart host'' that understands a richer address syntax +using: + + define(`SMART_HOST', mailer:hostname) + +In this case, the ``mailer:'' defaults to "suucp". Any messages that +can't be handled using the usual UUCP rules are passed to this host. + +If you are on a local SMTP-based net that connects to the outside +world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. +For example: + + define(`SMART_HOST', suucp:uunet) + LOCAL_NET_CONFIG + R$* < @ $* .$m > $* $#smtp $@ $2.$m $: $1 < @ $2.$m > $3 + +This will cause all names that end in your domain name ($m) via +SMTP; anything else will be sent via suucp (smart UUCP) to uunet. + + ++------------------+ +| FlexFAX SOFTWARE | ++------------------+ + +Sam Leffler's FlexFAX software is still in beta test -- but he expects a +public version out "later this week" [as of 3/1/93]. The following +blurb is direct from Sam: + + $Header: /usr/people/sam/fax/RCS/HOWTO,v 1.7 93/02/08 09:00:55 sam Exp $ + + How To Obtain This Software (in case all you get is this file) + + The source code is available for public ftp on + sgi.com sgi/fax/v2.1beta.tar.Z + (192.48.153.1) + + You can also obtain inst'able images for Silicon Graphics machines from + sgi.com sgi/fax/v2.1beta.inst.tar + (192.48.153.1) + + For example, + % ftp -n sgi.com + .... + ftp> user anonymous + ... + ftp> cd sgi/fax + ftp> binary + ftp> get v2.1beta.tar.Z + + If you cannot use FTP at all, there is a service called "ftpmail" + available from gateekeeper.dec.com: you can send e-mail to this + machine and it will use FTP to retrieve files for you and send you the + files back again via e-mail. To find out more about the ftpmail + service, send a message to "ftpmail@gatekeeper.dec.com" whose body + consists of the single line "help". + + Internal to Silicon Graphics there are inst'able images on the host + flake.asd in the directory /d/dist. Thus you can do something like: + + % inst -f flake.asd.sgi.com:/d/dist/flexfax + + to install the software on your machine. + + The external distributions come in a compressed or uncompressed tar + file. To extract the source distribution: + + % zcat v2.1beta.tar.Z | tar xf - + + (uncompress and extract individual files in current directory). To + unpack and install the client portion of the inst'able distribution: + + % mkdir dist + % cd dist; tar xf ../v2.1beta.inst.tar; cd .. + % inst -f dist/flexfax + ... + inst> go + + (Note, the dist subdirectory is because some versions of inst fail if + the files are in the current directory.) Server binaries is also + included in the inst'able images as flexfax.server.*. It is not + installed by default, so to get it also you need to extract the do: + + % inst -f flexfax + ... + inst> install flexfax.server.* + inst> go + + The SGI binaries were built for Version 4.0.5 of the IRIX operating + system. They should work w/o problem on earlier versions of the + system, but I have not fully tested this. Also, note that to install a + server on an SGI machine, you need to have installed the Display + PostScript execution environment product (dps_eoe). Otherwise, the fax + server will not be able to convert PostScript to facsimile for + transmission. + + If you are working from the source distribution, look at the file README + in the top of the source tree. If you are working from the inst images, + you need to run faxaddmodem to setup and configure your fax modem. Do + man faxaddmodem for more information. + +Also from Sam: + + A mailing list for users of this software is located on sgi.com. + If you want to join this mailing list or have a list-related request + such as getting your name removed from it, send a request to + + flexfax-request@sgi.com + + Submissions (including bug reports) should be directed to: + + flexfax@sgi.com + + ++--------------------------------+ +| 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 Dl The From_ line used when + 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. +confSEVEN_BIT_INPUT False O7 Force input to seven bits? +confALIAS_WAIT 10 Oa Wait (in minutes) for alias + file rebuild. +confMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks + on queue filesystem to accept + SMTP mail. +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. +confMIME_FORMAT_ERRORS True Oj Send error messages as MIME- + encapsulated messages per + RFC 1344. +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. +confDAEMON_OPTIONS (undefined) OO SMTP daemon options. +confPRIVACY_FLAGS authwarnings Op Privacy flags. +confCOPY_ERRORS_TO (undefined) OP Address for additional copies + of all error messages. +confQUEUE_FACTOR (undefined) Oq Slope of queue-only function +confREAD_TIMEOUT (undefined) Or SMTP read timeouts. +confSAFE_QUEUE True Os Commit all messages to disk + before forking. +confMESSAGE_TIMEOUT 5d/4h OT Timeout for messages before + sending error/warning message. +confTIME_ZONE USE_SYSTEM Ot 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. +confUSERDB_SPEC (undefined) OU User database specification. +confFALLBACK_MX (undefined) OV Fallback MX host. +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. +confCW_FILE /etc/sendmail.cw Name of file used to get the + Fw local additions to the $=w + class. + + +-----------+ | HIERARCHY | +-----------+ @@ -472,7 +767,9 @@ MAILERS 0 local, prog local and program mailers 1 smtp SMTP channel - 2 uucp + 2 uucp UNIX-to-UNIX Copy Program + 3 netnews Network News delivery + 4 fax Sam Leffler's FlexFAX software MACROS @@ -482,7 +779,7 @@ MACROS C CSNET Relay D The local domain -- usually not needed E - F + F FAX Relay G H mail Hub (for mail clusters) I @@ -495,7 +792,7 @@ MACROS P Q R Relay (for unqualified names) - S + S Smart Host T U my UUCP name (if I have a UUCP connection) V UUCP Relay (class V hosts) @@ -538,12 +835,12 @@ CLASSES M4 DIVERSIONS - 1 - 2 Local Ruleset 0 additions - 3 Local Ruleset 3 additions + 1 Local host detection and resolution + 2 Local Ruleset 3 additions + 3 Local Ruleset 0 additions 4 UUCP Ruleset 0 additions 5 locally interpreted names (overrides $R) 6 local configuration (at top of file) 7 mailer definitions 8 special local name recognition (late in ruleset 3) - 9 + 9 special local rulesets (1 and 2)