README revision 110560
138032Speter 264562Sgshapiro SENDMAIL CONFIGURATION FILES 338032Speter 490792SgshapiroThis document describes the sendmail configuration files. It 590792Sgshapiroexplains how to create a sendmail.cf file for use with sendmail. 690792SgshapiroIt also describes how to set options for sendmail which are explained 790792Sgshapiroin the Sendmail Installation and Operation guide (doc/op/op.me). 838032Speter 990792SgshapiroTo get started, you may want to look at tcpproto.mc (for TCP-only 1090792Sgshapirosites) and clientproto.mc (for clusters of clients using a single 1190792Sgshapiromail host), or the generic-*.mc files as operating system-specific 1290792Sgshapiroexamples. 1338032Speter 1490792SgshapiroTable of Content: 1538032Speter 1690792SgshapiroINTRODUCTION AND EXAMPLE 1790792SgshapiroA BRIEF INTRODUCTION TO M4 1890792SgshapiroFILE LOCATIONS 1990792SgshapiroOSTYPE 2090792SgshapiroDOMAINS 2190792SgshapiroMAILERS 2290792SgshapiroFEATURES 2390792SgshapiroHACKS 2490792SgshapiroSITE CONFIGURATION 2590792SgshapiroUSING UUCP MAILERS 2690792SgshapiroTWEAKING RULESETS 2790792SgshapiroMASQUERADING AND RELAYING 2890792SgshapiroUSING LDAP FOR ALIASES, MAPS, AND CLASSES 2990792SgshapiroLDAP ROUTING 3090792SgshapiroANTI-SPAM CONFIGURATION CONTROL 3190792SgshapiroSTARTTLS 3290792SgshapiroSMTP AUTHENTICATION 3390792SgshapiroADDING NEW MAILERS OR RULESETS 3490792SgshapiroADDING NEW MAIL FILTERS 3590792SgshapiroQUEUE GROUP DEFINITIONS 3690792SgshapiroNON-SMTP BASED CONFIGURATIONS 3790792SgshapiroWHO AM I? 3890792SgshapiroACCEPTING MAIL FOR MULTIPLE NAMES 3990792SgshapiroUSING MAILERTABLES 4090792SgshapiroUSING USERDB TO MAP FULL NAMES 4190792SgshapiroMISCELLANEOUS SPECIAL FEATURES 4290792SgshapiroSECURITY NOTES 4390792SgshapiroTWEAKING CONFIGURATION OPTIONS 4490792SgshapiroMESSAGE SUBMISSION PROGRAM 4590792SgshapiroFORMAT OF FILES AND MAPS 4690792SgshapiroDIRECTORY LAYOUT 4790792SgshapiroADMINISTRATIVE DETAILS 4838032Speter 4990792Sgshapiro 5038032Speter+--------------------------+ 5138032Speter| INTRODUCTION AND EXAMPLE | 5238032Speter+--------------------------+ 5338032Speter 5438032SpeterConfiguration files are contained in the subdirectory "cf", with a 5538032Spetersuffix ".mc". They must be run through "m4" to produce a ".cf" file. 5638032SpeterYou must pre-load "cf.m4": 5738032Speter 5838032Speter m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf 5938032Speter 6064562SgshapiroAlternatively, you can simply: 6164562Sgshapiro 6264562Sgshapiro cd ${CFDIR}/cf 6364562Sgshapiro ./Build config.cf 6464562Sgshapiro 6538032Speterwhere ${CFDIR} is the root of the cf directory and config.mc is the 6638032Spetername of your configuration file. If you are running a version of M4 6738032Speterthat understands the __file__ builtin (versions of GNU m4 >= 0.75 do 6838032Speterthis, but the versions distributed with 4.4BSD and derivatives do not) 6938032Speteror the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory. 7038032SpeterFor "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST 7138032Speteruse -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash! For example: 7238032Speter 7338032Speter m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf 7438032Speter 7538032SpeterLet's examine a typical .mc file: 7638032Speter 7738032Speter divert(-1) 7838032Speter # 7990792Sgshapiro # Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. 8064562Sgshapiro # All rights reserved. 8138032Speter # Copyright (c) 1983 Eric P. Allman. All rights reserved. 8238032Speter # Copyright (c) 1988, 1993 8338032Speter # The Regents of the University of California. All rights reserved. 8438032Speter # 8538032Speter # By using this file, you agree to the terms and conditions set 8638032Speter # forth in the LICENSE file which can be found at the top level of 8738032Speter # the sendmail distribution. 8838032Speter # 8938032Speter 9038032Speter # 9138032Speter # This is a Berkeley-specific configuration file for HP-UX 9.x. 9238032Speter # It applies only to the Computer Science Division at Berkeley, 9338032Speter # and should not be used elsewhere. It is provided on the sendmail 9438032Speter # distribution as a sample only. To create your own configuration 9538032Speter # file, create an appropriate domain file in ../domain, change the 9638032Speter # `DOMAIN' macro below to reference that file, and copy the result 9738032Speter # to a name of your own choosing. 9838032Speter # 9938032Speter divert(0) 10038032Speter 10138032SpeterThe divert(-1) will delete the crud in the resulting output file. 10238032SpeterThe copyright notice can be replaced by whatever your lawyers require; 10364562Sgshapiroour lawyers require the one that is included in these files. A copyleft 10438032Speteris a copyright by another name. The divert(0) restores regular output. 10538032Speter 10638032Speter VERSIONID(`<SCCS or RCS version id>') 10738032Speter 10838032SpeterVERSIONID is a macro that stuffs the version information into the 10964562Sgshapiroresulting file. You could use SCCS, RCS, CVS, something else, or 11038032Speteromit it completely. This is not the same as the version id included 11138032Speterin SMTP greeting messages -- this is defined in m4/version.m4. 11238032Speter 11364562Sgshapiro OSTYPE(`hpux9')dnl 11438032Speter 11538032SpeterYou must specify an OSTYPE to properly configure things such as the 11638032Speterpathname of the help and status files, the flags needed for the local 11738032Spetermailer, and other important things. If you omit it, you will get an 11838032Spetererror when you try to build the configuration. Look at the ostype 11938032Speterdirectory for the list of known operating system types. 12038032Speter 12164562Sgshapiro DOMAIN(`CS.Berkeley.EDU')dnl 12238032Speter 12338032SpeterThis example is specific to the Computer Science Division at Berkeley. 12464562SgshapiroYou can use "DOMAIN(`generic')" to get a sufficiently bland definition 12538032Speterthat may well work for you, or you can create a customized domain 12638032Speterdefinition appropriate for your environment. 12738032Speter 12864562Sgshapiro MAILER(`local') 12964562Sgshapiro MAILER(`smtp') 13038032Speter 13190792SgshapiroThese describe the mailers used at the default CS site. The local 13290792Sgshapiromailer is always included automatically. Beware: MAILER declarations 13390792Sgshapiroshould always be at the end of the configuration file. The general 13490792Sgshapirorules are that the order should be: 13538032Speter 13638032Speter VERSIONID 13738032Speter OSTYPE 13838032Speter DOMAIN 13938032Speter FEATURE 14038032Speter local macro definitions 14138032Speter MAILER 14290792Sgshapiro LOCAL_CONFIG 14364562Sgshapiro LOCAL_RULE_* 14464562Sgshapiro LOCAL_RULESETS 14538032Speter 14664562SgshapiroThere are a few exceptions to this rule. Local macro definitions which 14764562Sgshapiroinfluence a FEATURE() should be done before that feature. For example, 14864562Sgshapiroa define(`PROCMAIL_MAILER_PATH', ...) should be done before 14964562SgshapiroFEATURE(`local_procmail'). 15038032Speter 15190792Sgshapiro******************************************************************* 15290792Sgshapiro*** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** 15390792Sgshapiro*** Berkeley-specific assumptions built in, such as the name *** 15490792Sgshapiro*** of their UUCP-relay. You'll want to create your own *** 15590792Sgshapiro*** domain description, and use that in place of *** 15690792Sgshapiro*** domain/Berkeley.EDU.m4. *** 15790792Sgshapiro******************************************************************* 15864562Sgshapiro 15990792Sgshapiro 16038032Speter+----------------------------+ 16138032Speter| A BRIEF INTRODUCTION TO M4 | 16238032Speter+----------------------------+ 16338032Speter 16438032SpeterSendmail uses the M4 macro processor to ``compile'' the configuration 16538032Speterfiles. The most important thing to know is that M4 is stream-based, 16638032Speterthat is, it doesn't understand about lines. For this reason, in some 16738032Speterplaces you may see the word ``dnl'', which stands for ``delete 16838032Speterthrough newline''; essentially, it deletes all characters starting 16938032Speterat the ``dnl'' up to and including the next newline character. In 17038032Spetermost cases sendmail uses this only to avoid lots of unnecessary 17138032Speterblank lines in the output. 17238032Speter 17338032SpeterOther important directives are define(A, B) which defines the macro 17438032Speter``A'' to have value ``B''. Macros are expanded as they are read, so 17538032Speterone normally quotes both values to prevent expansion. For example, 17638032Speter 17738032Speter define(`SMART_HOST', `smart.foo.com') 17838032Speter 17938032SpeterOne word of warning: M4 macros are expanded even in lines that appear 18038032Speterto be comments. For example, if you have 18138032Speter 18264562Sgshapiro # See FEATURE(`foo') above 18338032Speter 18464562Sgshapiroit will not do what you expect, because the FEATURE(`foo') will be 18538032Speterexpanded. This also applies to 18638032Speter 18738032Speter # And then define the $X macro to be the return address 18838032Speter 18938032Speterbecause ``define'' is an M4 keyword. If you want to use them, surround 19038032Speterthem with directed quotes, `like this'. 19138032Speter 192110560SgshapiroSince m4 uses single quotes (opening "`" and closing "'") to quote 193110560Sgshapiroarguments, those quotes can't be used in arguments. For example, 194110560Sgshapiroit is not possible to define a rejection message containing a single 195110560Sgshapiroquote. Usually there are simple workarounds by changing those 196110560Sgshapiromessages; in the worst case it might be ok to change the value 197110560Sgshapirodirectly in the generated .cf file, which however is not advised. 19890792Sgshapiro 199110560Sgshapiro 20090792SgshapiroNotice: 20190792Sgshapiro------- 20290792Sgshapiro 20390792SgshapiroThis package requires a post-V7 version of m4; if you are running the 20490792Sgshapiro4.2bsd, SysV.2, or 7th Edition version. SunOS's /usr/5bin/m4 or 20590792SgshapiroBSD-Net/2's m4 both work. GNU m4 version 1.1 or later also works. 20690792SgshapiroUnfortunately, the M4 on BSDI 1.0 doesn't work -- you'll have to use a 20790792SgshapiroNet/2 or GNU version. GNU m4 is available from 20890792Sgshapiroftp://ftp.gnu.org/pub/gnu/m4/m4-1.4.tar.gz (check for the latest version). 20990792SgshapiroEXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken (3.x is fine). Use GNU 21090792Sgshapirom4 on this platform. 21190792Sgshapiro 21290792Sgshapiro 21338032Speter+----------------+ 21438032Speter| FILE LOCATIONS | 21538032Speter+----------------+ 21638032Speter 21738032Spetersendmail 8.9 has introduced a new configuration directory for sendmail 21838032Speterrelated files, /etc/mail. The new files available for sendmail 8.9 -- 21964562Sgshapirothe class {R} /etc/mail/relay-domains and the access database 22064562Sgshapiro/etc/mail/access -- take advantage of this new directory. Beginning with 22164562Sgshapiro8.10, all files will use this directory by default (some options may be 22264562Sgshapiroset by OSTYPE() files). This new directory should help to restore 22364562Sgshapirouniformity to sendmail's file locations. 22438032Speter 22564562SgshapiroBelow is a table of some of the common changes: 22664562Sgshapiro 22764562SgshapiroOld filename New filename 22864562Sgshapiro------------ ------------ 22964562Sgshapiro/etc/bitdomain /etc/mail/bitdomain 23064562Sgshapiro/etc/domaintable /etc/mail/domaintable 23164562Sgshapiro/etc/genericstable /etc/mail/genericstable 23264562Sgshapiro/etc/uudomain /etc/mail/uudomain 23364562Sgshapiro/etc/virtusertable /etc/mail/virtusertable 23464562Sgshapiro/etc/userdb /etc/mail/userdb 23564562Sgshapiro 23664562Sgshapiro/etc/aliases /etc/mail/aliases 23764562Sgshapiro/etc/sendmail/aliases /etc/mail/aliases 23864562Sgshapiro/etc/ucbmail/aliases /etc/mail/aliases 23964562Sgshapiro/usr/adm/sendmail/aliases /etc/mail/aliases 24064562Sgshapiro/usr/lib/aliases /etc/mail/aliases 24164562Sgshapiro/usr/lib/mail/aliases /etc/mail/aliases 24264562Sgshapiro/usr/ucblib/aliases /etc/mail/aliases 24364562Sgshapiro 24464562Sgshapiro/etc/sendmail.cw /etc/mail/local-host-names 24564562Sgshapiro/etc/mail/sendmail.cw /etc/mail/local-host-names 24664562Sgshapiro/etc/sendmail/sendmail.cw /etc/mail/local-host-names 24764562Sgshapiro 24864562Sgshapiro/etc/sendmail.ct /etc/mail/trusted-users 24964562Sgshapiro 25064562Sgshapiro/etc/sendmail.oE /etc/mail/error-header 25164562Sgshapiro 25264562Sgshapiro/etc/sendmail.hf /etc/mail/helpfile 25364562Sgshapiro/etc/mail/sendmail.hf /etc/mail/helpfile 25464562Sgshapiro/usr/ucblib/sendmail.hf /etc/mail/helpfile 25564562Sgshapiro/etc/ucbmail/sendmail.hf /etc/mail/helpfile 25664562Sgshapiro/usr/lib/sendmail.hf /etc/mail/helpfile 25764562Sgshapiro/usr/share/lib/sendmail.hf /etc/mail/helpfile 25864562Sgshapiro/usr/share/misc/sendmail.hf /etc/mail/helpfile 25964562Sgshapiro/share/misc/sendmail.hf /etc/mail/helpfile 26064562Sgshapiro 26164562Sgshapiro/etc/service.switch /etc/mail/service.switch 26264562Sgshapiro 26364562Sgshapiro/etc/sendmail.st /etc/mail/statistics 26464562Sgshapiro/etc/mail/sendmail.st /etc/mail/statistics 26564562Sgshapiro/etc/mailer/sendmail.st /etc/mail/statistics 26664562Sgshapiro/etc/sendmail/sendmail.st /etc/mail/statistics 26764562Sgshapiro/usr/lib/sendmail.st /etc/mail/statistics 26864562Sgshapiro/usr/ucblib/sendmail.st /etc/mail/statistics 26964562Sgshapiro 27064562SgshapiroNote that all of these paths actually use a new m4 macro MAIL_SETTINGS_DIR 27164562Sgshapiroto create the pathnames. The default value of this variable is 27264562Sgshapiro`/etc/mail/'. If you set this macro to a different value, you MUST include 27364562Sgshapiroa trailing slash. 27464562Sgshapiro 27580785SgshapiroNotice: all filenames used in a .mc (or .cf) file should be absolute 27680785Sgshapiro(starting at the root, i.e., with '/'). Relative filenames most 27780785Sgshapirolikely cause surprises during operations (unless otherwise noted). 27880785Sgshapiro 27980785Sgshapiro 28038032Speter+--------+ 28138032Speter| OSTYPE | 28238032Speter+--------+ 28338032Speter 28438032SpeterYou MUST define an operating system environment, or the configuration 28538032Speterfile build will puke. There are several environments available; look 28638032Speterat the "ostype" directory for the current list. This macro changes 28738032Speterthings like the location of the alias file and queue directory. Some 28838032Speterof these files are identical to one another. 28938032Speter 29038032SpeterIt is IMPERATIVE that the OSTYPE occur before any MAILER definitions. 29138032SpeterIn general, the OSTYPE macro should go immediately after any version 29238032Speterinformation, and MAILER definitions should always go last. 29338032Speter 29438032SpeterOperating system definitions are usually easy to write. They may define 29538032Speterthe following variables (everything defaults, so an ostype file may be 29638032Speterempty). Unfortunately, the list of configuration-supported systems is 29738032Speternot as broad as the list of source-supported systems, since many of 29838032Speterthe source contributors do not include corresponding ostype files. 29938032Speter 30064562SgshapiroALIAS_FILE [/etc/mail/aliases] The location of the text version 30138032Speter of the alias file(s). It can be a comma-separated 30238032Speter list of names (but be sure you quote values with 30338032Speter commas in them -- for example, use 30438032Speter define(`ALIAS_FILE', `a,b') 30538032Speter to get "a" and "b" both listed as alias files; 30638032Speter otherwise the define() primitive only sees "a"). 30764562SgshapiroHELP_FILE [/etc/mail/helpfile] The name of the file 30838032Speter containing information printed in response to 30938032Speter the SMTP HELP command. 31038032SpeterQUEUE_DIR [/var/spool/mqueue] The directory containing 31164562Sgshapiro queue files. To use multiple queues, supply 31264562Sgshapiro a value ending with an asterisk. For 31373188Sgshapiro example, /var/spool/mqueue/qd* will use all of the 31464562Sgshapiro directories or symbolic links to directories 31573188Sgshapiro beginning with 'qd' in /var/spool/mqueue as queue 31664562Sgshapiro directories. The names 'qf', 'df', and 'xf' are 31773188Sgshapiro reserved as specific subdirectories for the 31873188Sgshapiro corresponding queue file types as explained in 31990792Sgshapiro doc/op/op.me. See also QUEUE GROUP DEFINITIONS. 32090792SgshapiroMSP_QUEUE_DIR [/var/spool/clientmqueue] The directory containing 32190792Sgshapiro queue files for the MSP (Mail Submission Program, 32290792Sgshapiro see sendmail/SECURITY). 32364562SgshapiroSTATUS_FILE [/etc/mail/statistics] The file containing status 32438032Speter information. 32538032SpeterLOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. 32664562SgshapiroLOCAL_MAILER_FLAGS [Prmn9] The flags used by the local mailer. The 32764562Sgshapiro flags lsDFMAw5:/|@q are always included. 32838032SpeterLOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local 32938032Speter mail. 33038032SpeterLOCAL_MAILER_MAX [undefined] If defined, the maximum size of local 33138032Speter mail that you are willing to accept. 33264562SgshapiroLOCAL_MAILER_MAXMSGS [undefined] If defined, the maximum number of 33364562Sgshapiro messages to deliver in a single connection. Only 33464562Sgshapiro useful for LMTP local mailers. 33538032SpeterLOCAL_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 33638032Speter that ARRIVE from an address that resolves to the 33738032Speter local mailer and which are converted to MIME will be 33838032Speter labeled with this character set. 33964562SgshapiroLOCAL_MAILER_EOL [undefined] If defined, the string to use as the 34064562Sgshapiro end of line for the local mailer. 34164562SgshapiroLOCAL_MAILER_DSN_DIAGNOSTIC_CODE 34264562Sgshapiro [X-Unix] The DSN Diagnostic-Code value for the 34364562Sgshapiro local mailer. This should be changed with care. 34438032SpeterLOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. 34538032SpeterLOCAL_SHELL_FLAGS [eu9] The flags used by the shell mailer. The 34638032Speter flags lsDFM are always included. 34738032SpeterLOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" 34838032Speter mail. 34938032SpeterLOCAL_SHELL_DIR [$z:/] The directory search path in which the 35038032Speter shell should run. 35190792SgshapiroLOCAL_MAILER_QGRP [undefined] The queue group for the local mailer. 35238032SpeterUSENET_MAILER_PATH [/usr/lib/news/inews] The name of the program 35338032Speter used to submit news. 35464562SgshapiroUSENET_MAILER_FLAGS [rsDFMmn] The mailer flags for the usenet mailer. 35538032SpeterUSENET_MAILER_ARGS [-m -h -n] The command line arguments for the 35690792Sgshapiro usenet mailer. NOTE: Some versions of inews 35790792Sgshapiro (such as those shipped with newer versions of INN) 35890792Sgshapiro use different flags. Double check the defaults 35990792Sgshapiro against the inews man page. 360102528SgshapiroUSENET_MAILER_MAX [undefined] The maximum size of messages that will 36138032Speter be accepted by the usenet mailer. 36290792SgshapiroUSENET_MAILER_QGRP [undefined] The queue group for the usenet mailer. 36338032SpeterSMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default 36464562Sgshapiro flags are `mDFMuX' for all SMTP-based mailers; the 36564562Sgshapiro "esmtp" mailer adds `a'; "smtp8" adds `8'; and 36664562Sgshapiro "dsmtp" adds `%'. 36764562SgshapiroRELAY_MAILER_FLAGS [undefined] Flags added to the relay mailer. Default 36864562Sgshapiro flags are `mDFMuX' for all SMTP-based mailers; the 36964562Sgshapiro relay mailer adds `a8'. If this is not defined, 37064562Sgshapiro then SMTP_MAILER_FLAGS is used. 37138032SpeterSMTP_MAILER_MAX [undefined] The maximum size of messages that will 37264562Sgshapiro be transported using the smtp, smtp8, esmtp, or dsmtp 37338032Speter mailers. 37464562SgshapiroSMTP_MAILER_MAXMSGS [undefined] If defined, the maximum number of 37564562Sgshapiro messages to deliver in a single connection for the 37664562Sgshapiro smtp, smtp8, esmtp, or dsmtp mailers. 37794334SgshapiroSMTP_MAILER_MAXRCPTS [undefined] If defined, the maximum number of 37894334Sgshapiro recipients to deliver in a single connection for the 37994334Sgshapiro smtp, smtp8, esmtp, or dsmtp mailers. 38066494SgshapiroSMTP_MAILER_ARGS [TCP $h] The arguments passed to the smtp mailer. 38138032Speter About the only reason you would want to change this 38238032Speter would be to change the default port. 38366494SgshapiroESMTP_MAILER_ARGS [TCP $h] The arguments passed to the esmtp mailer. 38466494SgshapiroSMTP8_MAILER_ARGS [TCP $h] The arguments passed to the smtp8 mailer. 38566494SgshapiroDSMTP_MAILER_ARGS [TCP $h] The arguments passed to the dsmtp mailer. 38666494SgshapiroRELAY_MAILER_ARGS [TCP $h] The arguments passed to the relay mailer. 38790792SgshapiroSMTP_MAILER_QGRP [undefined] The queue group for the smtp mailer. 38890792SgshapiroESMTP_MAILER_QGRP [undefined] The queue group for the esmtp mailer. 38990792SgshapiroSMTP8_MAILER_QGRP [undefined] The queue group for the smtp8 mailer. 39090792SgshapiroDSMTP_MAILER_QGRP [undefined] The queue group for the dsmtp mailer. 39190792SgshapiroRELAY_MAILER_QGRP [undefined] The queue group for the relay mailer. 39264562SgshapiroRELAY_MAILER_MAXMSGS [undefined] If defined, the maximum number of 39364562Sgshapiro messages to deliver in a single connection for the 39464562Sgshapiro relay mailer. 39538032SpeterSMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 39638032Speter that ARRIVE from an address that resolves to one of 39738032Speter the SMTP mailers and which are converted to MIME will 39838032Speter be labeled with this character set. 39938032SpeterUUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail. 40038032SpeterUUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default 40138032Speter flags are `DFMhuU' (and `m' for uucp-new mailer, 40238032Speter minus `U' for uucp-dom mailer). 40338032SpeterUUCP_MAILER_ARGS [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments 40438032Speter passed to the UUCP mailer. 40538032SpeterUUCP_MAILER_MAX [100000] The maximum size message accepted for 40638032Speter transmission by the UUCP mailers. 40738032SpeterUUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 40838032Speter that ARRIVE from an address that resolves to one of 40938032Speter the UUCP mailers and which are converted to MIME will 41038032Speter be labeled with this character set. 41190792SgshapiroUUCP_MAILER_QGRP [undefined] The queue group for the UUCP mailers. 41238032SpeterFAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to 41338032Speter submit FAX messages. 41438032SpeterFAX_MAILER_ARGS [mailfax $u $h $f] The arguments passed to the FAX 41538032Speter mailer. 41638032SpeterFAX_MAILER_MAX [100000] The maximum size message accepted for 41738032Speter transmission by FAX. 41838032SpeterPOP_MAILER_PATH [/usr/lib/mh/spop] The pathname of the POP mailer. 41964562SgshapiroPOP_MAILER_FLAGS [Penu] Flags added to POP mailer. Flags lsDFMq 42038032Speter are always added. 42138032SpeterPOP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. 42290792SgshapiroPOP_MAILER_QGRP [undefined] The queue group for the pop mailer. 42338032SpeterPROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail 42443730Speter program. This is also used by 42543730Speter FEATURE(`local_procmail'). 42638032SpeterPROCMAIL_MAILER_FLAGS [SPhnu9] Flags added to Procmail mailer. Flags 42764562Sgshapiro DFM are always set. This is NOT used by 42843730Speter FEATURE(`local_procmail'); tweak LOCAL_MAILER_FLAGS 42938032Speter instead. 43038032SpeterPROCMAIL_MAILER_ARGS [procmail -Y -m $h $f $u] The arguments passed to 43138032Speter the Procmail mailer. This is NOT used by 43243730Speter FEATURE(`local_procmail'); tweak LOCAL_MAILER_ARGS 43338032Speter instead. 43438032SpeterPROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that 43538032Speter will be accepted by the procmail mailer. 43690792SgshapiroPROCMAIL_MAILER_QGRP [undefined] The queue group for the procmail mailer. 43738032SpeterMAIL11_MAILER_PATH [/usr/etc/mail11] The path to the mail11 mailer. 43838032SpeterMAIL11_MAILER_FLAGS [nsFx] Flags for the mail11 mailer. 43938032SpeterMAIL11_MAILER_ARGS [mail11 $g $x $h $u] Arguments passed to the mail11 44038032Speter mailer. 44190792SgshapiroMAIL11_MAILER_QGRP [undefined] The queue group for the mail11 mailer. 44238032SpeterPH_MAILER_PATH [/usr/local/etc/phquery] The path to the phquery 44338032Speter program. 44464562SgshapiroPH_MAILER_FLAGS [ehmu] Flags for the phquery mailer. Flags nrDFM 44564562Sgshapiro are always set. 44638032SpeterPH_MAILER_ARGS [phquery -- $u] -- arguments to the phquery mailer. 44790792SgshapiroPH_MAILER_QGRP [undefined] The queue group for the ph mailer. 44864562SgshapiroCYRUS_MAILER_FLAGS [Ah5@/:|] The flags used by the cyrus mailer. The 44938032Speter flags lsDFMnPq are always included. 45038032SpeterCYRUS_MAILER_PATH [/usr/cyrus/bin/deliver] The program used to deliver 45138032Speter cyrus mail. 45238032SpeterCYRUS_MAILER_ARGS [deliver -e -m $h -- $u] The arguments passed 45338032Speter to deliver cyrus mail. 45438032SpeterCYRUS_MAILER_MAX [undefined] If set, the maximum size message that 45538032Speter will be accepted by the cyrus mailer. 45638032SpeterCYRUS_MAILER_USER [cyrus:mail] The user and group to become when 45738032Speter running the cyrus mailer. 45890792SgshapiroCYRUS_MAILER_QGRP [undefined] The queue group for the cyrus mailer. 45964562SgshapiroCYRUS_BB_MAILER_FLAGS [u] The flags used by the cyrusbb mailer. 46064562Sgshapiro The flags lsDFMnP are always included. 46138032SpeterCYRUS_BB_MAILER_ARGS [deliver -e -m $u] The arguments passed 46238032Speter to deliver cyrusbb mail. 46398121SgshapiroCYRUSV2_MAILER_FLAGS [A@/:|m] The flags used by the cyrusv2 mailer. The 46498121Sgshapiro flags lsDFMnqXz are always included. 46598121SgshapiroCYRUSV2_MAILER_MAXMSGS [undefined] If defined, the maximum number of 46698121Sgshapiro messages to deliver in a single connection for the 46798121Sgshapiro cyrusv2 mailer. 46898121SgshapiroCYRUSV2_MAILER_MAXRCPTS [undefined] If defined, the maximum number of 46998121Sgshapiro recipients to deliver in a single connection for the 47098121Sgshapiro cyrusv2 mailer. 47198121SgshapiroCYRUSV2_MAILER_ARGS [FILE /var/imap/socket/lmtp] The arguments passed 47298121Sgshapiro to the cyrusv2 mailer. This can be used to 47398121Sgshapiro change the name of the Unix domain socket, or 47498121Sgshapiro to switch to delivery via TCP (e.g., `TCP $h lmtp') 47598121SgshapiroCYRUSV2_MAILER_QGRP [undefined] The queue group for the cyrusv2 mailer. 476110560SgshapiroCYRUSV2_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 477110560Sgshapiro that ARRIVE from an address that resolves to one the 478110560Sgshapiro Cyrus mailer and which are converted to MIME will 479110560Sgshapiro be labeled with this character set. 48038032SpeterconfEBINDIR [/usr/libexec] The directory for executables. 48143730Speter Currently used for FEATURE(`local_lmtp') and 48243730Speter FEATURE(`smrsh'). 48364562SgshapiroQPAGE_MAILER_FLAGS [mDFMs] The flags used by the qpage mailer. 48464562SgshapiroQPAGE_MAILER_PATH [/usr/local/bin/qpage] The program used to deliver 48564562Sgshapiro qpage mail. 48664562SgshapiroQPAGE_MAILER_ARGS [qpage -l0 -m -P$u] The arguments passed 48764562Sgshapiro to deliver qpage mail. 48864562SgshapiroQPAGE_MAILER_MAX [4096] If set, the maximum size message that 48964562Sgshapiro will be accepted by the qpage mailer. 49090792SgshapiroQPAGE_MAILER_QGRP [undefined] The queue group for the qpage mailer. 49190792SgshapiroLOCAL_PROG_QGRP [undefined] The queue group for the prog mailer. 49238032Speter 49364562SgshapiroNote: to tweak Name_MAILER_FLAGS use the macro MODIFY_MAILER_FLAGS: 49464562SgshapiroMODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part of 49564562Sgshapirothe macro Name_MAILER_FLAGS and change can be: flags that should 49664562Sgshapirobe used directly (thus overriding the default value), or if it 49764562Sgshapirostarts with `+' (`-') then those flags are added to (removed from) 49864562Sgshapirothe default value. Example: 49938032Speter 50064562Sgshapiro MODIFY_MAILER_FLAGS(`LOCAL', `+e') 50138032Speter 50290792Sgshapirowill add the flag `e' to LOCAL_MAILER_FLAGS. Notice: there are 50390792Sgshapiroseveral smtp mailers all of which are manipulated individually. 50490792SgshapiroSee the section MAILERS for the available mailer names. 50564562SgshapiroWARNING: The FEATUREs local_lmtp and local_procmail set LOCAL_MAILER_FLAGS 50664562Sgshapirounconditionally, i.e., without respecting any definitions in an 50764562SgshapiroOSTYPE setting. 50864562Sgshapiro 50964562Sgshapiro 51038032Speter+---------+ 51138032Speter| DOMAINS | 51238032Speter+---------+ 51338032Speter 51438032SpeterYou will probably want to collect domain-dependent defines into one 51564562Sgshapirofile, referenced by the DOMAIN macro. For example, the Berkeley 51638032Speterdomain file includes definitions for several internal distinguished 51738032Speterhosts: 51838032Speter 51938032SpeterUUCP_RELAY The host that will accept UUCP-addressed email. 52038032Speter If not defined, all UUCP sites must be directly 52138032Speter connected. 52238032SpeterBITNET_RELAY The host that will accept BITNET-addressed email. 52338032Speter If not defined, the .BITNET pseudo-domain won't work. 52438032SpeterDECNET_RELAY The host that will accept DECNET-addressed email. 52538032Speter If not defined, the .DECNET pseudo-domain and addresses 52638032Speter of the form node::user will not work. 52738032SpeterFAX_RELAY The host that will accept mail to the .FAX pseudo-domain. 52838032Speter The "fax" mailer overrides this value. 52971345SgshapiroLOCAL_RELAY The site that will handle unqualified names -- that 53082017Sgshapiro is, names without an @domain extension. 53171345Sgshapiro Normally MAIL_HUB is preferred for this function. 53271345Sgshapiro LOCAL_RELAY is mostly useful in conjunction with 53390792Sgshapiro FEATURE(`stickyhost') -- see the discussion of 53471345Sgshapiro stickyhost below. If not set, they are assumed to 53571345Sgshapiro belong on this machine. This allows you to have a 53671345Sgshapiro central site to store a company- or department-wide 53771345Sgshapiro alias database. This only works at small sites, 53871345Sgshapiro and only with some user agents. 53938032SpeterLUSER_RELAY The site that will handle lusers -- that is, apparently 54064562Sgshapiro local names that aren't local accounts or aliases. To 54164562Sgshapiro specify a local user instead of a site, set this to 54264562Sgshapiro ``local:username''. 54338032Speter 54438032SpeterAny of these can be either ``mailer:hostname'' (in which case the 54538032Spetermailer is the internal mailer name, such as ``uucp-new'' and the hostname 54638032Speteris the name of the host as appropriate for that mailer) or just a 54738032Speter``hostname'', in which case a default mailer type (usually ``relay'', 54838032Spetera variant on SMTP) is used. WARNING: if you have a wildcard MX 54938032Speterrecord matching your domain, you probably want to define these to 55038032Speterhave a trailing dot so that you won't get the mail diverted back 55138032Speterto yourself. 55238032Speter 55338032SpeterThe domain file can also be used to define a domain name, if needed 55438032Speter(using "DD<domain>") and set certain site-wide features. If all hosts 55538032Speterat your site masquerade behind one email name, you could also use 55638032SpeterMASQUERADE_AS here. 55738032Speter 55838032SpeterYou do not have to define a domain -- in particular, if you are a 55938032Spetersingle machine sitting off somewhere, it is probably more work than 56038032Speterit's worth. This is just a mechanism for combining "domain dependent 56138032Speterknowledge" into one place. 56238032Speter 56390792Sgshapiro 56438032Speter+---------+ 56538032Speter| MAILERS | 56638032Speter+---------+ 56738032Speter 56838032SpeterThere are fewer mailers supported in this version than the previous 56938032Speterversion, owing mostly to a simpler world. As a general rule, put the 57090792SgshapiroMAILER definitions last in your .mc file. 57138032Speter 57238032Speterlocal The local and prog mailers. You will almost always 57338032Speter need these; the only exception is if you relay ALL 57438032Speter your mail to another site. This mailer is included 57538032Speter automatically. 57638032Speter 57738032Spetersmtp The Simple Mail Transport Protocol mailer. This does 57838032Speter not hide hosts behind a gateway or another other 57938032Speter such hack; it assumes a world where everyone is 58038032Speter running the name server. This file actually defines 58164562Sgshapiro five mailers: "smtp" for regular (old-style) SMTP to 58238032Speter other servers, "esmtp" for extended SMTP to other 58338032Speter servers, "smtp8" to do SMTP to other servers without 58438032Speter converting 8-bit data to MIME (essentially, this is 58538032Speter your statement that you know the other end is 8-bit 58664562Sgshapiro clean even if it doesn't say so), "dsmtp" to do on 58764562Sgshapiro demand delivery, and "relay" for transmission to the 58864562Sgshapiro RELAY_HOST, LUSER_RELAY, or MAIL_HUB. 58938032Speter 59066494Sgshapirouucp The UNIX-to-UNIX Copy Program mailer. Actually, this 59138032Speter defines two mailers, "uucp-old" (a.k.a. "uucp") and 59238032Speter "uucp-new" (a.k.a. "suucp"). The latter is for when you 59338032Speter know that the UUCP mailer at the other end can handle 59438032Speter multiple recipients in one transfer. If the smtp mailer 59590792Sgshapiro is included in your configuration, two other mailers 59690792Sgshapiro ("uucp-dom" and "uucp-uudom") are also defined [warning: you 59790792Sgshapiro MUST specify MAILER(`smtp') before MAILER(`uucp')]. When you 59838032Speter include the uucp mailer, sendmail looks for all names in 59964562Sgshapiro class {U} and sends them to the uucp-old mailer; all 60064562Sgshapiro names in class {Y} are sent to uucp-new; and all 60164562Sgshapiro names in class {Z} are sent to uucp-uudom. Note that 60238032Speter this is a function of what version of rmail runs on 60338032Speter the receiving end, and hence may be out of your control. 60438032Speter See the section below describing UUCP mailers in more 60538032Speter detail. 60638032Speter 60738032Speterusenet Usenet (network news) delivery. If this is specified, 60838032Speter an extra rule is added to ruleset 0 that forwards all 60938032Speter local email for users named ``group.usenet'' to the 61038032Speter ``inews'' program. Note that this works for all groups, 61138032Speter and may be considered a security problem. 61238032Speter 61338032Speterfax Facsimile transmission. This is experimental and based 61438032Speter on Sam Leffler's HylaFAX software. For more information, 61571345Sgshapiro see http://www.hylafax.org/. 61638032Speter 61738032Speterpop Post Office Protocol. 61838032Speter 61938032Speterprocmail An interface to procmail (does not come with sendmail). 62038032Speter This is designed to be used in mailertables. For example, 62138032Speter a common question is "how do I forward all mail for a given 62238032Speter domain to a single person?". If you have this mailer 62338032Speter defined, you could set up a mailertable reading: 62438032Speter 62538032Speter host.com procmail:/etc/procmailrcs/host.com 62638032Speter 62738032Speter with the file /etc/procmailrcs/host.com reading: 62838032Speter 62938032Speter :0 # forward mail for host.com 63038032Speter ! -oi -f $1 person@other.host 63138032Speter 63238032Speter This would arrange for (anything)@host.com to be sent 63338032Speter to person@other.host. Within the procmail script, $1 is 63438032Speter the name of the sender and $2 is the name of the recipient. 63543730Speter If you use this with FEATURE(`local_procmail'), the FEATURE 63638032Speter should be listed first. 63738032Speter 63890792Sgshapiro Of course there are other ways to solve this particular 63990792Sgshapiro problem, e.g., a catch-all entry in a virtusertable. 64090792Sgshapiro 64138032Spetermail11 The DECnet mail11 mailer, useful only if you have the mail11 64238032Speter program from gatekeeper.dec.com:/pub/DEC/gwtools (and 64338032Speter DECnet, of course). This is for Phase IV DECnet support; 64438032Speter if you have Phase V at your site you may have additional 64538032Speter problems. 64638032Speter 64738032Speterphquery The phquery program. This is somewhat counterintuitively 64838032Speter referenced as the "ph" mailer internally. It can be used 64938032Speter to do CCSO name server lookups. The phquery program, which 65038032Speter this mailer uses, is distributed with the ph client. 65138032Speter 65238032Spetercyrus The cyrus and cyrusbb mailers. The cyrus mailer delivers to 65338032Speter a local cyrus user. this mailer can make use of the 65490792Sgshapiro "user+detail@local.host" syntax (see 65590792Sgshapiro FEATURE(`preserve_local_plus_detail')); it will deliver the 65690792Sgshapiro mail to the user's "detail" mailbox if the mailbox's ACL 65790792Sgshapiro permits. The cyrusbb mailer delivers to a system-wide 65890792Sgshapiro cyrus mailbox if the mailbox's ACL permits. The cyrus 65990792Sgshapiro mailer must be defined after the local mailer. 66038032Speter 66198121Sgshapirocyrusv2 The mailer for Cyrus v2.x. The cyrusv2 mailer delivers to 66298121Sgshapiro local cyrus users via LMTP. This mailer can make use of the 66398121Sgshapiro "user+detail@local.host" syntax (see 66498121Sgshapiro FEATURE(`preserve_local_plus_detail')); it will deliver the 66598121Sgshapiro mail to the user's "detail" mailbox if the mailbox's ACL 66698121Sgshapiro permits. The cyrusv2 mailer must be defined after the 66798121Sgshapiro local mailer. 66898121Sgshapiro 66964562Sgshapiroqpage A mailer for QuickPage, a pager interface. See 67064562Sgshapiro http://www.qpage.org/ for further information. 67138032Speter 67238032SpeterThe local mailer accepts addresses of the form "user+detail", where 67338032Speterthe "+detail" is not used for mailbox matching but is available 67443730Speterto certain local mail programs (in particular, see 67543730SpeterFEATURE(`local_procmail')). For example, "eric", "eric+sendmail", and 67643730Speter"eric+sww" all indicate the same user, but additional arguments <null>, 67743730Speter"sendmail", and "sww" may be provided for use in sorting mail. 67838032Speter 67938032Speter 68038032Speter+----------+ 68138032Speter| FEATURES | 68238032Speter+----------+ 68338032Speter 68438032SpeterSpecial features can be requested using the "FEATURE" macro. For 68538032Speterexample, the .mc line: 68638032Speter 68743730Speter FEATURE(`use_cw_file') 68838032Speter 68964562Sgshapirotells sendmail that you want to have it read an /etc/mail/local-host-names 69090792Sgshapirofile to get values for class {w}. A FEATURE may contain up to 9 69164562Sgshapirooptional parameters -- for example: 69238032Speter 69343730Speter FEATURE(`mailertable', `dbm /usr/lib/mailertable') 69438032Speter 69538032SpeterThe default database map type for the table features can be set with 69664562Sgshapiro 69738032Speter define(`DATABASE_MAP_TYPE', `dbm') 69838032Speter 69938032Speterwhich would set it to use ndbm databases. The default is the Berkeley DB 70038032Speterhash database format. Note that you must still declare a database map type 70138032Speterif you specify an argument to a FEATURE. DATABASE_MAP_TYPE is only used 70264562Sgshapiroif no argument is given for the FEATURE. It must be specified before any 70364562Sgshapirofeature that uses a map. 70438032Speter 70590792SgshapiroAlso, features which can take a map definition as an argument can also take 70690792Sgshapirothe special keyword `LDAP'. If that keyword is used, the map will use the 70790792SgshapiroLDAP definition described in the ``USING LDAP FOR ALIASES, MAPS, AND 70890792SgshapiroCLASSES'' section below. 70990792Sgshapiro 71038032SpeterAvailable features are: 71138032Speter 71264562Sgshapirouse_cw_file Read the file /etc/mail/local-host-names file to get 71364562Sgshapiro alternate names for this host. This might be used if you 71464562Sgshapiro were on a host that MXed for a dynamic set of other hosts. 71564562Sgshapiro If the set is static, just including the line "Cw<name1> 71664562Sgshapiro <name2> ..." (where the names are fully qualified domain 71764562Sgshapiro names) is probably superior. The actual filename can be 71864562Sgshapiro overridden by redefining confCW_FILE. 71938032Speter 72064562Sgshapirouse_ct_file Read the file /etc/mail/trusted-users file to get the 72164562Sgshapiro names of users that will be ``trusted'', that is, able to 72264562Sgshapiro set their envelope from address using -f without generating 72364562Sgshapiro a warning message. The actual filename can be overridden 72464562Sgshapiro by redefining confCT_FILE. 72538032Speter 72638032Speterredirect Reject all mail addressed to "address.REDIRECT" with 72764562Sgshapiro a ``551 User has moved; please try <address>'' message. 72838032Speter If this is set, you can alias people who have left 72938032Speter to their new address with ".REDIRECT" appended. 73038032Speter 73164562Sgshapironouucp Don't route UUCP addresses. This feature takes one 73264562Sgshapiro parameter: 73364562Sgshapiro `reject': reject addresses which have "!" in the local 73464562Sgshapiro part unless it originates from a system 73564562Sgshapiro that is allowed to relay. 73664562Sgshapiro `nospecial': don't do anything special with "!". 73790792Sgshapiro Warnings: 1. See the notice in the anti-spam section. 73864562Sgshapiro 2. don't remove "!" from OperatorChars if `reject' is 73964562Sgshapiro given as parameter. 74038032Speter 74164562Sgshapironocanonify Don't pass addresses to $[ ... $] for canonification 74271345Sgshapiro by default, i.e., host/domain names are considered canonical, 74371345Sgshapiro except for unqualified names, which must not be used in this 74471345Sgshapiro mode (violation of the standard). It can be changed by 74571345Sgshapiro setting the DaemonPortOptions modifiers (M=). That is, 74664562Sgshapiro FEATURE(`nocanonify') will be overridden by setting the 74764562Sgshapiro 'c' flag. Conversely, if FEATURE(`nocanonify') is not used, 74864562Sgshapiro it can be emulated by setting the 'C' flag 74964562Sgshapiro (DaemonPortOptions=Modifiers=C). This would generally only 75064562Sgshapiro be used by sites that only act as mail gateways or which have 75164562Sgshapiro user agents that do full canonification themselves. You may 75264562Sgshapiro also want to use 75364562Sgshapiro "define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')" to turn off 75464562Sgshapiro the usual resolver options that do a similar thing. 75538032Speter 75664562Sgshapiro An exception list for FEATURE(`nocanonify') can be 75764562Sgshapiro specified with CANONIFY_DOMAIN or CANONIFY_DOMAIN_FILE, 75864562Sgshapiro i.e., a list of domains which are nevertheless passed to 75964562Sgshapiro $[ ... $] for canonification. This is useful to turn on 76064562Sgshapiro canonification for local domains, e.g., use 76164562Sgshapiro CANONIFY_DOMAIN(`my.domain my') to canonify addresses 76264562Sgshapiro which end in "my.domain" or "my". 76364562Sgshapiro Another way to require canonification in the local 76464562Sgshapiro domain is CANONIFY_DOMAIN(`$=m'). 76564562Sgshapiro 76664562Sgshapiro A trailing dot is added to addresses with more than 76764562Sgshapiro one component in it such that other features which 76864562Sgshapiro expect a trailing dot (e.g., virtusertable) will 76964562Sgshapiro still work. 77064562Sgshapiro 77164562Sgshapiro If `canonify_hosts' is specified as parameter, i.e., 77264562Sgshapiro FEATURE(`nocanonify', `canonify_hosts'), then 77364562Sgshapiro addresses which have only a hostname, e.g., 77464562Sgshapiro <user@host>, will be canonified (and hopefully fully 77564562Sgshapiro qualified), too. 77664562Sgshapiro 77771345Sgshapirostickyhost This feature is sometimes used with LOCAL_RELAY, 77871345Sgshapiro although it can be used for a different effect with 77971345Sgshapiro MAIL_HUB. 78038032Speter 78173188Sgshapiro When used without MAIL_HUB, email sent to 78271345Sgshapiro "user@local.host" are marked as "sticky" -- that 78371345Sgshapiro is, the local addresses aren't matched against UDB, 78471345Sgshapiro don't go through ruleset 5, and are not forwarded to 78571345Sgshapiro the LOCAL_RELAY (if defined). 78671345Sgshapiro 78771345Sgshapiro With MAIL_HUB, mail addressed to "user@local.host" 78871345Sgshapiro is forwarded to the mail hub, with the envelope 78971345Sgshapiro address still remaining "user@local.host". 79071345Sgshapiro Without stickyhost, the envelope would be changed 79171345Sgshapiro to "user@mail_hub", in order to protect against 79271345Sgshapiro mailing loops. 79371345Sgshapiro 79438032Spetermailertable Include a "mailer table" which can be used to override 79564562Sgshapiro routing for particular domains (which are not in class {w}, 79664562Sgshapiro i.e. local host names). The argument of the FEATURE may be 79764562Sgshapiro the key definition. If none is specified, the definition 79864562Sgshapiro used is: 79943730Speter 80064562Sgshapiro hash /etc/mail/mailertable 80143730Speter 80238032Speter Keys in this database are fully qualified domain names 80338032Speter or partial domains preceded by a dot -- for example, 80464562Sgshapiro "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". As a 80564562Sgshapiro special case of the latter, "." matches any domain not 80664562Sgshapiro covered by other keys. Values must be of the form: 80738032Speter mailer:domain 80838032Speter where "mailer" is the internal mailer name, and "domain" 80938032Speter is where to send the message. These maps are not 81038032Speter reflected into the message header. As a special case, 81138032Speter the forms: 81238032Speter local:user 81338032Speter will forward to the indicated user using the local mailer, 81438032Speter local: 81538032Speter will forward to the original user in the e-mail address 81638032Speter using the local mailer, and 81738032Speter error:code message 81864562Sgshapiro error:D.S.N:code message 81964562Sgshapiro will give an error message with the indicated SMTP reply 82064562Sgshapiro code and message, where D.S.N is an RFC 1893 compliant 82164562Sgshapiro error code. 82238032Speter 82338032Speterdomaintable Include a "domain table" which can be used to provide 82438032Speter domain name mapping. Use of this should really be 82538032Speter limited to your own domains. It may be useful if you 82638032Speter change names (e.g., your company changes names from 82738032Speter oldname.com to newname.com). The argument of the 82838032Speter FEATURE may be the key definition. If none is specified, 82938032Speter the definition used is: 83043730Speter 83164562Sgshapiro hash /etc/mail/domaintable 83243730Speter 83338032Speter The key in this table is the domain name; the value is 83438032Speter the new (fully qualified) domain. Anything in the 83538032Speter domaintable is reflected into headers; that is, this 83638032Speter is done in ruleset 3. 83738032Speter 83838032Speterbitdomain Look up bitnet hosts in a table to try to turn them into 83938032Speter internet addresses. The table can be built using the 84038032Speter bitdomain program contributed by John Gardiner Myers. 84138032Speter The argument of the FEATURE may be the key definition; if 84238032Speter none is specified, the definition used is: 84343730Speter 84464562Sgshapiro hash /etc/mail/bitdomain 84543730Speter 84638032Speter Keys are the bitnet hostname; values are the corresponding 84738032Speter internet hostname. 84838032Speter 84938032Speteruucpdomain Similar feature for UUCP hosts. The default map definition 85038032Speter is: 85143730Speter 85264562Sgshapiro hash /etc/mail/uudomain 85343730Speter 85438032Speter At the moment there is no automagic tool to build this 85538032Speter database. 85638032Speter 85738032Speteralways_add_domain 85838032Speter Include the local host domain even on locally delivered 85938032Speter mail. Normally it is not added on unqualified names. 86038032Speter However, if you use a shared message store but do not use 86138032Speter the same user name space everywhere, you may need the host 86290792Sgshapiro name on local names. An optional argument specifies 86390792Sgshapiro another domain to be added than the local. 86438032Speter 86538032Speterallmasquerade If masquerading is enabled (using MASQUERADE_AS), this 86638032Speter feature will cause recipient addresses to also masquerade 86738032Speter as being from the masquerade host. Normally they get 86838032Speter the local hostname. Although this may be right for 86938032Speter ordinary users, it can break local aliases. For example, 87038032Speter if you send to "localalias", the originating sendmail will 87138032Speter find that alias and send to all members, but send the 87238032Speter message with "To: localalias@masqueradehost". Since that 87338032Speter alias likely does not exist, replies will fail. Use this 87438032Speter feature ONLY if you can guarantee that the ENTIRE 87538032Speter namespace on your masquerade host supersets all the 87638032Speter local entries. 87738032Speter 87838032Speterlimited_masquerade 87964562Sgshapiro Normally, any hosts listed in class {w} are masqueraded. If 88064562Sgshapiro this feature is given, only the hosts listed in class {M} (see 88164562Sgshapiro below: MASQUERADE_DOMAIN) are masqueraded. This is useful 88264562Sgshapiro if you have several domains with disjoint namespaces hosted 88364562Sgshapiro on the same machine. 88438032Speter 88538032Spetermasquerade_entire_domain 88664562Sgshapiro If masquerading is enabled (using MASQUERADE_AS) and 88738032Speter MASQUERADE_DOMAIN (see below) is set, this feature will 88838032Speter cause addresses to be rewritten such that the masquerading 88938032Speter domains are actually entire domains to be hidden. All 89038032Speter hosts within the masquerading domains will be rewritten 89138032Speter to the masquerade name (used in MASQUERADE_AS). For example, 89238032Speter if you have: 89338032Speter 89464562Sgshapiro MASQUERADE_AS(`masq.com') 89564562Sgshapiro MASQUERADE_DOMAIN(`foo.org') 89664562Sgshapiro MASQUERADE_DOMAIN(`bar.com') 89738032Speter 89838032Speter then *foo.org and *bar.com are converted to masq.com. Without 89938032Speter this feature, only foo.org and bar.com are masqueraded. 90038032Speter 90138032Speter NOTE: only domains within your jurisdiction and 90238032Speter current hierarchy should be masqueraded using this. 90338032Speter 90490792Sgshapirolocal_no_masquerade 90590792Sgshapiro This feature prevents the local mailer from masquerading even 90690792Sgshapiro if MASQUERADE_AS is used. MASQUERADE_AS will only have effect 90790792Sgshapiro on addresses of mail going outside the local domain. 90890792Sgshapiro 909110560Sgshapiromasquerade_envelope 910110560Sgshapiro If masquerading is enabled (using MASQUERADE_AS) or the 911110560Sgshapiro genericstable is in use, this feature will cause envelope 912110560Sgshapiro addresses to also masquerade as being from the masquerade 913110560Sgshapiro host. Normally only the header addresses are masqueraded. 914110560Sgshapiro 91564562Sgshapirogenericstable This feature will cause unqualified addresses (i.e., without 91664562Sgshapiro a domain) and addresses with a domain listed in class {G} 91764562Sgshapiro to be looked up in a map and turned into another ("generic") 91864562Sgshapiro form, which can change both the domain name and the user name. 91990792Sgshapiro Notice: if you use an MSP (as it is default starting with 92090792Sgshapiro 8.12), the MTA will only receive qualified addresses from the 92190792Sgshapiro MSP (as required by the RFCs). Hence you need to add your 92290792Sgshapiro domain to class {G}. This feature is similar to the userdb 92390792Sgshapiro functionality. The same types of addresses as for 92490792Sgshapiro masquerading are looked up, i.e., only header sender 92590792Sgshapiro addresses unless the allmasquerade and/or masquerade_envelope 92690792Sgshapiro features are given. Qualified addresses must have the domain 92790792Sgshapiro part in class {G}; entries can be added to this class by the 92890792Sgshapiro macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE (analogously 92990792Sgshapiro to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). 93038032Speter 93143730Speter The argument of FEATURE(`genericstable') may be the map 93238032Speter definition; the default map definition is: 93338032Speter 93464562Sgshapiro hash /etc/mail/genericstable 93538032Speter 93664562Sgshapiro The key for this table is either the full address, the domain 93764562Sgshapiro (with a leading @; the localpart is passed as first argument) 93864562Sgshapiro or the unqualified username (tried in the order mentioned); 93964562Sgshapiro the value is the new user address. If the new user address 94064562Sgshapiro does not include a domain, it will be qualified in the standard 94164562Sgshapiro manner, i.e., using $j or the masquerade name. Note that the 94238032Speter address being looked up must be fully qualified. For local 94343730Speter mail, it is necessary to use FEATURE(`always_add_domain') 94443730Speter for the addresses to be qualified. 94564562Sgshapiro The "+detail" of an address is passed as %1, so entries like 94638032Speter 94764562Sgshapiro old+*@foo.org new+%1@example.com 94864562Sgshapiro gen+*@foo.org %1@example.com 94964562Sgshapiro 95064562Sgshapiro and other forms are possible. 95164562Sgshapiro 95264562Sgshapirogenerics_entire_domain 95364562Sgshapiro If the genericstable is enabled and GENERICS_DOMAIN or 95464562Sgshapiro GENERICS_DOMAIN_FILE is used, this feature will cause 95564562Sgshapiro addresses to be searched in the map if their domain 95664562Sgshapiro parts are subdomains of elements in class {G}. 95764562Sgshapiro 95838032Spetervirtusertable A domain-specific form of aliasing, allowing multiple 95938032Speter virtual domains to be hosted on one machine. For example, 96038032Speter if the virtuser table contained: 96138032Speter 96238032Speter info@foo.com foo-info 96338032Speter info@bar.com bar-info 96490792Sgshapiro joe@bar.com error:nouser 550 No such user here 96590792Sgshapiro jax@bar.com error:5.7.0:550 Address invalid 96664562Sgshapiro @baz.org jane@example.net 96738032Speter 96838032Speter then mail addressed to info@foo.com will be sent to the 96938032Speter address foo-info, mail addressed to info@bar.com will be 97064562Sgshapiro delivered to bar-info, and mail addressed to anyone at baz.org 97164562Sgshapiro will be sent to jane@example.net, mail to joe@bar.com will 97264562Sgshapiro be rejected with the specified error message, and mail to 97364562Sgshapiro jax@bar.com will also have a RFC 1893 compliant error code 97490792Sgshapiro 5.7.0. 97538032Speter 97664562Sgshapiro The username from the original address is passed 97764562Sgshapiro as %1 allowing: 97838032Speter 97964562Sgshapiro @foo.org %1@example.com 98038032Speter 98164562Sgshapiro meaning someone@foo.org will be sent to someone@example.com. 98264562Sgshapiro Additionally, if the local part consists of "user+detail" 98390792Sgshapiro then "detail" is passed as %2 and "+detail" is passed as %3 98490792Sgshapiro when a match against user+* is attempted, so entries like 98564562Sgshapiro 98664562Sgshapiro old+*@foo.org new+%2@example.com 98764562Sgshapiro gen+*@foo.org %2@example.com 98890792Sgshapiro +*@foo.org %1%3@example.com 98990792Sgshapiro X++@foo.org Z%3@example.com 99090792Sgshapiro @bar.org %1%3 99164562Sgshapiro 99264562Sgshapiro and other forms are possible. Note: to preserve "+detail" 99390792Sgshapiro for a default case (@domain) %1%3 must be used as RHS. 99490792Sgshapiro There are two wildcards after "+": "+" matches only a non-empty 99590792Sgshapiro detail, "*" matches also empty details, e.g., user+@foo.org 99690792Sgshapiro matches +*@foo.org but not ++@foo.org. This can be used 99790792Sgshapiro to ensure that the parameters %2 and %3 are not empty. 99864562Sgshapiro 99938032Speter All the host names on the left hand side (foo.com, bar.com, 100090792Sgshapiro and baz.org) must be in class {w} or class {VirtHost}. The 100164562Sgshapiro latter can be defined by the macros VIRTUSER_DOMAIN or 100264562Sgshapiro VIRTUSER_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 100364562Sgshapiro MASQUERADE_DOMAIN_FILE, see below). If VIRTUSER_DOMAIN or 100464562Sgshapiro VIRTUSER_DOMAIN_FILE is used, then the entries of class 100564562Sgshapiro {VirtHost} are added to class {R}, i.e., relaying is allowed 100664562Sgshapiro to (and from) those domains. The default map definition is: 100738032Speter 100864562Sgshapiro hash /etc/mail/virtusertable 100938032Speter 101038032Speter A new definition can be specified as the second argument of 101138032Speter the FEATURE macro, such as 101238032Speter 101364562Sgshapiro FEATURE(`virtusertable', `dbm /etc/mail/virtusers') 101438032Speter 101564562Sgshapirovirtuser_entire_domain 101664562Sgshapiro If the virtusertable is enabled and VIRTUSER_DOMAIN or 101764562Sgshapiro VIRTUSER_DOMAIN_FILE is used, this feature will cause 101864562Sgshapiro addresses to be searched in the map if their domain 101964562Sgshapiro parts are subdomains of elements in class {VirtHost}. 102064562Sgshapiro 102164562Sgshapiroldap_routing Implement LDAP-based e-mail recipient routing according to 102264562Sgshapiro the Internet Draft draft-lachman-laser-ldap-mail-routing-01. 102364562Sgshapiro This provides a method to re-route addresses with a 102464562Sgshapiro domain portion in class {LDAPRoute} to either a 102564562Sgshapiro different mail host or a different address. Hosts can 102664562Sgshapiro be added to this class using LDAPROUTE_DOMAIN and 102764562Sgshapiro LDAPROUTE_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 102864562Sgshapiro MASQUERADE_DOMAIN_FILE, see below). 102964562Sgshapiro 103064562Sgshapiro See the LDAP ROUTING section below for more information. 103164562Sgshapiro 103264562Sgshapironodns If you aren't running DNS at your site (for example, 103364562Sgshapiro you are UUCP-only connected). It's hard to consider 103438032Speter this a "feature", but hey, it had to go somewhere. 103538032Speter Actually, as of 8.7 this is a no-op -- remove "dns" from 103638032Speter the hosts service switch entry instead. 103738032Speter 103864562Sgshapironullclient This is a special case -- it creates a configuration file 103964562Sgshapiro containing nothing but support for forwarding all mail to a 104064562Sgshapiro central hub via a local SMTP-based network. The argument 104164562Sgshapiro is the name of that hub. 104264562Sgshapiro 104338032Speter The only other feature that should be used in conjunction 104464562Sgshapiro with this one is FEATURE(`nocanonify'). No mailers 104538032Speter should be defined. No aliasing or forwarding is done. 104638032Speter 104738032Speterlocal_lmtp Use an LMTP capable local mailer. The argument to this 104838032Speter feature is the pathname of an LMTP capable mailer. By 104938032Speter default, mail.local is used. This is expected to be the 105038032Speter mail.local which came with the 8.9 distribution which is 105138032Speter LMTP capable. The path to mail.local is set by the 105238032Speter confEBINDIR m4 variable -- making the default 105338032Speter LOCAL_MAILER_PATH /usr/libexec/mail.local. 105464562Sgshapiro WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, 105564562Sgshapiro i.e., without respecting any definitions in an OSTYPE setting. 105638032Speter 105764562Sgshapirolocal_procmail Use procmail or another delivery agent as the local mailer. 105864562Sgshapiro The argument to this feature is the pathname of the 105964562Sgshapiro delivery agent, which defaults to PROCMAIL_MAILER_PATH. 106064562Sgshapiro Note that this does NOT use PROCMAIL_MAILER_FLAGS or 106164562Sgshapiro PROCMAIL_MAILER_ARGS for the local mailer; tweak 106264562Sgshapiro LOCAL_MAILER_FLAGS and LOCAL_MAILER_ARGS instead, or 106364562Sgshapiro specify the appropriate parameters. When procmail is used, 106464562Sgshapiro the local mailer can make use of the 106564562Sgshapiro "user+indicator@local.host" syntax; normally the +indicator 106664562Sgshapiro is just tossed, but by default it is passed as the -a 106764562Sgshapiro argument to procmail. 106838032Speter 106964562Sgshapiro This feature can take up to three arguments: 107064562Sgshapiro 107164562Sgshapiro 1. Path to the mailer program 107264562Sgshapiro [default: /usr/local/bin/procmail] 107364562Sgshapiro 2. Argument vector including name of the program 107464562Sgshapiro [default: procmail -Y -a $h -d $u] 107564562Sgshapiro 3. Flags for the mailer [default: SPfhn9] 107664562Sgshapiro 107764562Sgshapiro Empty arguments cause the defaults to be taken. 1078110560Sgshapiro Note that if you are on a system with a broken 1079110560Sgshapiro setreuid() call, you may need to add -f $f to the procmail 1080110560Sgshapiro argument vector to pass the proper sender to procmail. 108164562Sgshapiro 108264562Sgshapiro For example, this allows it to use the maildrop 108364562Sgshapiro (http://www.flounder.net/~mrsam/maildrop/) mailer instead 108464562Sgshapiro by specifying: 108564562Sgshapiro 108664562Sgshapiro FEATURE(`local_procmail', `/usr/local/bin/maildrop', 108764562Sgshapiro `maildrop -d $u') 108864562Sgshapiro 108964562Sgshapiro or scanmails using: 109064562Sgshapiro 109164562Sgshapiro FEATURE(`local_procmail', `/usr/local/bin/scanmails') 109264562Sgshapiro 109364562Sgshapiro WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, 109464562Sgshapiro i.e., without respecting any definitions in an OSTYPE setting. 109564562Sgshapiro 109638032Speterbestmx_is_local Accept mail as though locally addressed for any host that 109738032Speter lists us as the best possible MX record. This generates 109838032Speter additional DNS traffic, but should be OK for low to 109938032Speter medium traffic hosts. The argument may be a set of 110038032Speter domains, which will limit the feature to only apply to 110138032Speter these domains -- this will reduce unnecessary DNS 110238032Speter traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH 110338032Speter WILDCARD MX RECORDS!!! If you have a wildcard MX record 110438032Speter that matches your domain, you cannot use this feature. 110538032Speter 110638032Spetersmrsh Use the SendMail Restricted SHell (smrsh) provided 110738032Speter with the distribution instead of /bin/sh for mailing 110838032Speter to programs. This improves the ability of the local 110938032Speter system administrator to control what gets run via 111038032Speter e-mail. If an argument is provided it is used as the 111138032Speter pathname to smrsh; otherwise, the path defined by 111238032Speter confEBINDIR is used for the smrsh binary -- by default, 111338032Speter /usr/libexec/smrsh is assumed. 111438032Speter 111538032Speterpromiscuous_relay 111638032Speter By default, the sendmail configuration files do not permit 111738032Speter mail relaying (that is, accepting mail from outside your 111864562Sgshapiro local host (class {w}) and sending it to another host than 111964562Sgshapiro your local host). This option sets your site to allow 112064562Sgshapiro mail relaying from any site to any site. In almost all 112164562Sgshapiro cases, it is better to control relaying more carefully 112264562Sgshapiro with the access map, class {R}, or authentication. Domains 112364562Sgshapiro can be added to class {R} by the macros RELAY_DOMAIN or 112464562Sgshapiro RELAY_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 112564562Sgshapiro MASQUERADE_DOMAIN_FILE, see below). 112638032Speter 112738032Speterrelay_entire_domain 112898121Sgshapiro This option allows any host in your domain as defined by 112998121Sgshapiro class {m} to use your server for relaying. Notice: make 113098121Sgshapiro sure that your domain is not just a top level domain, 113198121Sgshapiro e.g., com. This can happen if you give your host a name 113298121Sgshapiro like example.com instead of host.example.com. 113338032Speter 113438032Speterrelay_hosts_only 113538032Speter By default, names that are listed as RELAY in the access 113698121Sgshapiro db and class {R} are treated as domain names, not host names. 113738032Speter For example, if you specify ``foo.com'', then mail to or 113838032Speter from foo.com, abc.foo.com, or a.very.deep.domain.foo.com 113938032Speter will all be accepted for relaying. This feature changes 114038032Speter the behaviour to lookup individual host names only. 114138032Speter 114238032Speterrelay_based_on_MX 114338032Speter Turns on the ability to allow relaying based on the MX 114442575Speter records of the host portion of an incoming recipient; that 114542575Speter is, if an MX record for host foo.com points to your site, 114642575Speter you will accept and relay mail addressed to foo.com. See 114738032Speter description below for more information before using this 114842575Speter feature. Also, see the KNOWNBUGS entry regarding bestmx 114942575Speter map lookups. 115038032Speter 115143730Speter FEATURE(`relay_based_on_MX') does not necessarily allow 115242575Speter routing of these messages which you expect to be allowed, 115342575Speter if route address syntax (or %-hack syntax) is used. If 115442575Speter this is a problem, add entries to the access-table or use 115543730Speter FEATURE(`loose_relay_check'). 115642575Speter 115764562Sgshapirorelay_mail_from 115864562Sgshapiro Allows relaying if the mail sender is listed as RELAY in 1159110560Sgshapiro the access map. If an optional argument `domain' (this 1160110560Sgshapiro is the literal word `domain', not a placeholder) is given, 116190792Sgshapiro relaying can be allowed just based on the domain portion 116290792Sgshapiro of the sender address. This feature should only be used if 116390792Sgshapiro absolutely necessary as the sender address can be easily 116498121Sgshapiro forged. Use of this feature requires the "From:" tag to 116598121Sgshapiro be used for the key in the access map; see the discussion 116690792Sgshapiro of tags and FEATURE(`relay_mail_from') in the section on 116790792Sgshapiro anti-spam configuration control. 116864562Sgshapiro 116938032Speterrelay_local_from 117038032Speter Allows relaying if the domain portion of the mail sender 117138032Speter is a local host. This should only be used if absolutely 117242575Speter necessary as it opens a window for spammers. Specifically, 117342575Speter they can send mail to your mail server that claims to be 117442575Speter from your domain (either directly or via a routed address), 117542575Speter and you will go ahead and relay it out to arbitrary hosts 117642575Speter on the Internet. 117764562Sgshapiro 117838032Speteraccept_unqualified_senders 117938032Speter Normally, MAIL FROM: commands in the SMTP session will be 118038032Speter refused if the connection is a network connection and the 118138032Speter sender address does not include a domain name. If your 118264562Sgshapiro setup sends local mail unqualified (i.e., MAIL FROM: <joe>), 118338032Speter you will need to use this feature to accept unqualified 118464562Sgshapiro sender addresses. Setting the DaemonPortOptions modifier 118564562Sgshapiro 'u' overrides the default behavior, i.e., unqualified 118664562Sgshapiro addresses are accepted even without this FEATURE. 118764562Sgshapiro If this FEATURE is not used, the DaemonPortOptions modifier 118864562Sgshapiro 'f' can be used to enforce fully qualified addresses. 118964562Sgshapiro 119038032Speteraccept_unresolvable_domains 119138032Speter Normally, MAIL FROM: commands in the SMTP session will be 119264562Sgshapiro refused if the host part of the argument to MAIL FROM: 119364562Sgshapiro cannot be located in the host name service (e.g., an A or 119464562Sgshapiro MX record in DNS). If you are inside a firewall that has 119564562Sgshapiro only a limited view of the Internet host name space, this 119664562Sgshapiro could cause problems. In this case you probably want to 119764562Sgshapiro use this feature to accept all domains on input, even if 119864562Sgshapiro they are unresolvable. 119938032Speter 120038032Speteraccess_db Turns on the access database feature. The access db gives 120138032Speter you the ability to allow or refuse to accept mail from 120290792Sgshapiro specified domains for administrative reasons. Moreover, 120390792Sgshapiro it can control the behavior of sendmail in various situations. 120490792Sgshapiro By default, the access database specification is: 120538032Speter 120690792Sgshapiro hash -T<TMPF> /etc/mail/access 120743730Speter 120890792Sgshapiro See the anti-spam configuration control section for further 120990792Sgshapiro important information about this feature. Notice: 121090792Sgshapiro "-T<TMPF>" is meant literal, do not replace it by anything. 121143730Speter 121238032Speterblacklist_recipients 121338032Speter Turns on the ability to block incoming mail for certain 121438032Speter recipient usernames, hostnames, or addresses. For 121538032Speter example, you can block incoming mail to user nobody, 121638032Speter host foo.mydomain.com, or guest@bar.mydomain.com. 121738032Speter These specifications are put in the access db as 121864562Sgshapiro described in the anti-spam configuration control section 121964562Sgshapiro later in this document. 122038032Speter 122171345Sgshapirodelay_checks The rulesets check_mail and check_relay will not be called 122271345Sgshapiro when a client connects or issues a MAIL command, respectively. 122371345Sgshapiro Instead, those rulesets will be called by the check_rcpt 122471345Sgshapiro ruleset; they will be skipped under certain circumstances. 122590792Sgshapiro See "Delay all checks" in the anti-spam configuration control 122690792Sgshapiro section. Note: this feature is incompatible to the versions 122790792Sgshapiro in 8.10 and 8.11. 122871345Sgshapiro 122964562Sgshapirodnsbl Turns on rejection of hosts found in an DNS based rejection 123064562Sgshapiro list. If an argument is provided it is used as the domain 123164562Sgshapiro in which blocked hosts are listed; otherwise it defaults to 123271345Sgshapiro blackholes.mail-abuse.org. An explanation for an DNS based 123390792Sgshapiro rejection list can be found at http://mail-abuse.org/rbl/. 123490792Sgshapiro A second argument can be used to change the default error 123590792Sgshapiro message. Without that second argument, the error message 123690792Sgshapiro will be 123798841Sgshapiro Rejected: IP-ADDRESS listed at SERVER 123890792Sgshapiro where IP-ADDRESS and SERVER are replaced by the appropriate 123990792Sgshapiro information. By default, temporary lookup failures are 124090792Sgshapiro ignored. This behavior can be changed by specifying a 124190792Sgshapiro third argument, which must be either `t' or a full error 124290792Sgshapiro message. See the anti-spam configuration control section for 124390792Sgshapiro an example. The dnsbl feature can be included several times 124490792Sgshapiro to query different DNS based rejection lists. See also 124590792Sgshapiro enhdnsbl for an enhanced version. 124664562Sgshapiro 1247110560Sgshapiro Set the DNSBL_MAP mc option to change the default map 1248110560Sgshapiro definition from `host'. Set the DNSBL_MAP_OPT mc option 1249110560Sgshapiro to add additional options to the map specification used. 1250110560Sgshapiro 125198121Sgshapiro Some DNS based rejection lists cause failures if asked 125298121Sgshapiro for AAAA records. If your sendmail version is compiled 125398121Sgshapiro with IPv6 support (NETINET6) and you experience this 125498121Sgshapiro problem, add 125598121Sgshapiro 125698121Sgshapiro define(`DNSBL_MAP', `dns -R A') 125798121Sgshapiro 125898121Sgshapiro before the first use of this feature. Alternatively you 125998121Sgshapiro can use enhdnsbl instead (see below). 126098121Sgshapiro 126180785Sgshapiro NOTE: The default DNS blacklist, blackholes.mail-abuse.org, 126280785Sgshapiro is a service offered by the Mail Abuse Prevention System 126380785Sgshapiro (MAPS). As of July 31, 2001, MAPS is a subscription 126480785Sgshapiro service, so using that network address won't work if you 126580785Sgshapiro haven't subscribed. Contact MAPS to subscribe 126680785Sgshapiro (http://mail-abuse.org/). 126780785Sgshapiro 126890792Sgshapiroenhdnsbl Enhanced version of dnsbl (see above). Further arguments 126990792Sgshapiro (up to 5) can be used to specify specific return values 127090792Sgshapiro from lookups. Temporary lookup failures are ignored unless 127190792Sgshapiro a third argument is given, which must be either `t' or a full 127290792Sgshapiro error message. By default, any successful lookup will 127390792Sgshapiro generate an error. Otherwise the result of the lookup is 127490792Sgshapiro compared with the supplied argument(s), and only if a match 127590792Sgshapiro occurs an error is generated. For example, 127690792Sgshapiro 127790792Sgshapiro FEATURE(`enhdnsbl', `dnsbl.example.com', `', `t', `127.0.0.2.') 127890792Sgshapiro 127990792Sgshapiro will reject the e-mail if the lookup returns the value 128090792Sgshapiro ``127.0.0.2.'', or generate a 451 response if the lookup 128190792Sgshapiro temporarily failed. The arguments can contain metasymbols 128290792Sgshapiro as they are allowed in the LHS of rules. As the example 128390792Sgshapiro shows, the default values are also used if an empty argument, 128490792Sgshapiro i.e., `', is specified. This feature requires that sendmail 128590792Sgshapiro has been compiled with the flag DNSMAP (see sendmail/README). 128690792Sgshapiro 1287110560Sgshapiro Set the EDNSBL_TO mc option to change the DNS retry count 1288110560Sgshapiro from the default value of 5. 1289110560Sgshapiro 129090792Sgshapirolookupdotdomain Look up also .domain in the access map. This allows to 129190792Sgshapiro match only subdomains. It does not work well with 129290792Sgshapiro FEATURE(`relay_hosts_only'), because most lookups for 129390792Sgshapiro subdomains are suppressed by the latter feature. 129490792Sgshapiro 129538032Speterloose_relay_check 129664562Sgshapiro Normally, if % addressing is used for a recipient, e.g. 129764562Sgshapiro user%site@othersite, and othersite is in class {R}, the 129838032Speter check_rcpt ruleset will strip @othersite and recheck 129938032Speter user@site for relaying. This feature changes that 130038032Speter behavior. It should not be needed for most installations. 130138032Speter 130290792Sgshapiroauthinfo Provide a separate map for client side authentication 130390792Sgshapiro information. See SMTP AUTHENTICATION for details. 130490792Sgshapiro By default, the authinfo database specification is: 130590792Sgshapiro 130690792Sgshapiro hash /etc/mail/authinfo 130790792Sgshapiro 130890792Sgshapiropreserve_luser_host 130990792Sgshapiro Preserve the name of the recipient host if LUSER_RELAY is 131090792Sgshapiro used. Without this option, the domain part of the 131190792Sgshapiro recipient address will be replaced by the host specified as 131290792Sgshapiro LUSER_RELAY. This feature only works if the hostname is 131390792Sgshapiro passed to the mailer (see mailer triple in op.me). Note 131490792Sgshapiro that in the default configuration the local mailer does not 131590792Sgshapiro receive the hostname, i.e., the mailer triple has an empty 131690792Sgshapiro hostname. 131790792Sgshapiro 131890792Sgshapiropreserve_local_plus_detail 131990792Sgshapiro Preserve the +detail portion of the address when passing 132090792Sgshapiro address to local delivery agent. Disables alias and 132190792Sgshapiro .forward +detail stripping (e.g., given user+detail, only 132290792Sgshapiro that address will be looked up in the alias file; user+* and 132390792Sgshapiro user will not be looked up). Only use if the local 132490792Sgshapiro delivery agent in use supports +detail addressing. 132590792Sgshapiro 132690792Sgshapirocompat_check Enable ruleset check_compat to look up pairs of addresses 132790792Sgshapiro with the Compat: tag -- Compat:sender<@>recipient -- in the 132890792Sgshapiro access map. Valid values for the RHS include 132990792Sgshapiro DISCARD silently discard recipient 133090792Sgshapiro TEMP: return a temporary error 133190792Sgshapiro ERROR: return a permanent error 133290792Sgshapiro In the last two cases, a 4xy/5xy SMTP reply code should 133390792Sgshapiro follow the colon. 133490792Sgshapiro 133564562Sgshapirono_default_msa Don't generate the default MSA daemon, i.e., 133664562Sgshapiro DAEMON_OPTIONS(`Port=587,Name=MSA,M=E') 133764562Sgshapiro To define a MSA daemon with other parameters, use this 133864562Sgshapiro FEATURE and introduce new settings via DAEMON_OPTIONS(). 133938032Speter 134090792Sgshapiromsp Defines config file for Message Submission Program. 134194334Sgshapiro See sendmail/SECURITY for details and cf/cf/submit.mc how 134294334Sgshapiro to use it. An optional argument can be used to override 134394334Sgshapiro the default of `[localhost]' to use as host to send all 134494334Sgshapiro e-mails to. Note that MX records will be used if the 134594334Sgshapiro specified hostname is not in square brackets (e.g., 134694334Sgshapiro [hostname]). If `MSA' is specified as second argument then 134794334Sgshapiro port 587 is used to contact the server. Example: 134890792Sgshapiro 134990792Sgshapiro FEATURE(`msp', `', `MSA') 135090792Sgshapiro 135190792Sgshapiro Some more hints about possible changes can be found below 135290792Sgshapiro in the section MESSAGE SUBMISSION PROGRAM. 135390792Sgshapiro 1354110560Sgshapiro Note: Due to many problems, submit.mc uses 135598121Sgshapiro 135698121Sgshapiro FEATURE(`msp', `[127.0.0.1]') 135798121Sgshapiro 1358110560Sgshapiro by default. If you have a machine with IPv6 only, 1359110560Sgshapiro change it to 1360110560Sgshapiro 1361110560Sgshapiro FEATURE(`msp', `[IPv6:::1]') 1362110560Sgshapiro 1363110560Sgshapiro If you want to continue using '[localhost]', (the behavior 1364110560Sgshapiro up to 8.12.6), use 1365110560Sgshapiro 1366110560Sgshapiro FEATURE(`msp') 1367110560Sgshapiro 136890792Sgshapiroqueuegroup A simple example how to select a queue group based 136990792Sgshapiro on the full e-mail address or the domain of the 137090792Sgshapiro recipient. Selection is done via entries in the 137190792Sgshapiro access map using the tag QGRP:, for example: 137290792Sgshapiro 137390792Sgshapiro QGRP:example.com main 137490792Sgshapiro QGRP:friend@some.org others 137590792Sgshapiro QGRP:my.domain local 137690792Sgshapiro 137790792Sgshapiro where "main", "others", and "local" are names of 137890792Sgshapiro queue groups. If an argument is specified, it is used 137990792Sgshapiro as default queue group. 138090792Sgshapiro 138194334Sgshapiro Note: please read the warning in doc/op/op.me about 138294334Sgshapiro queue groups and possible queue manipulations. 138394334Sgshapiro 138438032Speter+-------+ 138538032Speter| HACKS | 138638032Speter+-------+ 138738032Speter 138838032SpeterSome things just can't be called features. To make this clear, 138938032Speterthey go in the hack subdirectory and are referenced using the HACK 139038032Spetermacro. These will tend to be site-dependent. The release 139138032Speterincludes the Berkeley-dependent "cssubdomain" hack (that makes 139238032Spetersendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; 139364562Sgshapirothis is intended as a short-term aid while moving hosts into 139438032Spetersubdomains. 139538032Speter 139638032Speter 139738032Speter+--------------------+ 139838032Speter| SITE CONFIGURATION | 139938032Speter+--------------------+ 140038032Speter 140138032Speter ***************************************************** 140238032Speter * This section is really obsolete, and is preserved * 140338032Speter * only for back compatibility. You should plan on * 140490792Sgshapiro * using mailertables for new installations. In * 140538032Speter * particular, it doesn't work for the newer forms * 140638032Speter * of UUCP mailers, such as uucp-uudom. * 140738032Speter ***************************************************** 140838032Speter 140938032SpeterComplex sites will need more local configuration information, such as 141038032Speterlists of UUCP hosts they speak with directly. This can get a bit more 141138032Spetertricky. For an example of a "complex" site, see cf/ucbvax.mc. 141238032Speter 141338032SpeterThe SITECONFIG macro allows you to indirectly reference site-dependent 141438032Speterconfiguration information stored in the siteconfig subdirectory. For 141538032Speterexample, the line 141638032Speter 141764562Sgshapiro SITECONFIG(`uucp.ucbvax', `ucbvax', `U') 141838032Speter 141938032Speterreads the file uucp.ucbvax for local connection information. The 142038032Spetersecond parameter is the local name (in this case just "ucbvax" since 142138032Speterit is locally connected, and hence a UUCP hostname). The third 142238032Speterparameter is the name of both a macro to store the local name (in 142364562Sgshapirothis case, {U}) and the name of the class (e.g., {U}) in which to store 142438032Speterthe host information read from the file. Another SITECONFIG line reads 142538032Speter 142664562Sgshapiro SITECONFIG(`uucp.ucbarpa', `ucbarpa.Berkeley.EDU', `W') 142738032Speter 142838032SpeterThis says that the file uucp.ucbarpa contains the list of UUCP sites 142964562Sgshapiroconnected to ucbarpa.Berkeley.EDU. Class {W} will be used to 143038032Speterstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that 143138032Speteris, the name of the relay to which the hosts listed in uucp.ucbarpa 143264562Sgshapiroare connected. [The machine ucbarpa is gone now, but this 143364562Sgshapiroout-of-date configuration file has been left around to demonstrate 143464562Sgshapirohow you might do this.] 143538032Speter 143638032SpeterNote that the case of SITECONFIG with a third parameter of ``U'' is 143738032Speterspecial; the second parameter is assumed to be the UUCP name of the 143838032Speterlocal site, rather than the name of a remote site, and the UUCP name 143964562Sgshapirois entered into class {w} (the list of local hostnames) as $U.UUCP. 144038032Speter 144138032SpeterThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing 144238032Spetermore than a sequence of SITE macros describing connectivity. For 144338032Speterexample: 144438032Speter 144564562Sgshapiro SITE(`cnmat') 144664562Sgshapiro SITE(`sgi olympus') 144738032Speter 144838032SpeterThe second example demonstrates that you can use two names on the 144938032Spetersame line; these are usually aliases for the same host (or are at 145038032Speterleast in the same company). 145138032Speter 145238032Speter 145338032Speter+--------------------+ 145438032Speter| USING UUCP MAILERS | 145538032Speter+--------------------+ 145638032Speter 145738032SpeterIt's hard to get UUCP mailers right because of the extremely ad hoc 145838032Speternature of UUCP addressing. These config files are really designed 145938032Speterfor domain-based addressing, even for UUCP sites. 146038032Speter 146138032SpeterThere are four UUCP mailers available. The choice of which one to 146238032Speteruse is partly a matter of local preferences and what is running at 146338032Speterthe other end of your UUCP connection. Unlike good protocols that 146438032Speterdefine what will go over the wire, UUCP uses the policy that you 146538032Spetershould do what is right for the other end; if they change, you have 146638032Speterto change. This makes it hard to do the right thing, and discourages 146738032Speterpeople from updating their software. In general, if you can avoid 146838032SpeterUUCP, please do. 146938032Speter 147038032SpeterThe major choice is whether to go for a domainized scheme or a 147138032Speternon-domainized scheme. This depends entirely on what the other 147238032Speterend will recognize. If at all possible, you should encourage the 147338032Speterother end to go to a domain-based system -- non-domainized addresses 147438032Speterdon't work entirely properly. 147538032Speter 147638032SpeterThe four mailers are: 147738032Speter 147838032Speter uucp-old (obsolete name: "uucp") 147938032Speter This is the oldest, the worst (but the closest to UUCP) way of 148038032Speter sending messages accros UUCP connections. It does bangify 148138032Speter everything and prepends $U (your UUCP name) to the sender's 148238032Speter address (which can already be a bang path itself). It can 148338032Speter only send to one address at a time, so it spends a lot of 148438032Speter time copying duplicates of messages. Avoid this if at all 148538032Speter possible. 148638032Speter 148738032Speter uucp-new (obsolete name: "suucp") 148838032Speter The same as above, except that it assumes that in one rmail 148938032Speter command you can specify several recipients. It still has a 149038032Speter lot of other problems. 149138032Speter 149238032Speter uucp-dom 149338032Speter This UUCP mailer keeps everything as domain addresses. 149438032Speter Basically, it uses the SMTP mailer rewriting rules. This mailer 149590792Sgshapiro is only included if MAILER(`smtp') is specified before 149690792Sgshapiro MAILER(`uucp'). 149738032Speter 149838032Speter Unfortunately, a lot of UUCP mailer transport agents require 149938032Speter bangified addresses in the envelope, although you can use 150038032Speter domain-based addresses in the message header. (The envelope 150138032Speter shows up as the From_ line on UNIX mail.) So.... 150238032Speter 150338032Speter uucp-uudom 150438032Speter This is a cross between uucp-new (for the envelope addresses) 150538032Speter and uucp-dom (for the header addresses). It bangifies the 150638032Speter envelope sender (From_ line in messages) without adding the 150738032Speter local hostname, unless there is no host name on the address 150838032Speter at all (e.g., "wolf") or the host component is a UUCP host name 150938032Speter instead of a domain name ("somehost!wolf" instead of 151064562Sgshapiro "some.dom.ain!wolf"). This is also included only if MAILER(`smtp') 151190792Sgshapiro is also specified earlier. 151238032Speter 151338032SpeterExamples: 151438032Speter 151564562SgshapiroOn host grasp.insa-lyon.fr (UUCP host name "grasp"), the following 151664562Sgshapirosummarizes the sender rewriting for various mailers. 151738032Speter 151866494SgshapiroMailer sender rewriting in the envelope 151938032Speter------ ------ ------------------------- 152038032Speteruucp-{old,new} wolf grasp!wolf 152138032Speteruucp-dom wolf wolf@grasp.insa-lyon.fr 152238032Speteruucp-uudom wolf grasp.insa-lyon.fr!wolf 152338032Speter 152438032Speteruucp-{old,new} wolf@fr.net grasp!fr.net!wolf 152538032Speteruucp-dom wolf@fr.net wolf@fr.net 152638032Speteruucp-uudom wolf@fr.net fr.net!wolf 152738032Speter 152838032Speteruucp-{old,new} somehost!wolf grasp!somehost!wolf 152938032Speteruucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr 153038032Speteruucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf 153138032Speter 153238032SpeterIf you are using one of the domainized UUCP mailers, you really want 153338032Speterto convert all UUCP addresses to domain format -- otherwise, it will 153438032Speterdo it for you (and probably not the way you expected). For example, 153538032Speterif you have the address foo!bar!baz (and you are not sending to foo), 153638032Speterthe heuristics will add the @uucp.relay.name or @local.host.name to 153738032Speterthis address. However, if you map foo to foo.host.name first, it 153838032Speterwill not add the local hostname. You can do this using the uucpdomain 153938032Speterfeature. 154038032Speter 154138032Speter 154238032Speter+-------------------+ 154338032Speter| TWEAKING RULESETS | 154438032Speter+-------------------+ 154538032Speter 154638032SpeterFor more complex configurations, you can define special rules. 154738032SpeterThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing 154838032Speterthe names. Any modifications made here are reflected in the header. 154938032Speter 155038032SpeterA common use is to convert old UUCP addresses to SMTP addresses using 155138032Speterthe UUCPSMTP macro. For example: 155238032Speter 155338032Speter LOCAL_RULE_3 155464562Sgshapiro UUCPSMTP(`decvax', `decvax.dec.com') 155564562Sgshapiro UUCPSMTP(`research', `research.att.com') 155638032Speter 155738032Speterwill cause addresses of the form "decvax!user" and "research!user" 155838032Speterto be converted to "user@decvax.dec.com" and "user@research.att.com" 155938032Speterrespectively. 156038032Speter 156138032SpeterThis could also be used to look up hosts in a database map: 156238032Speter 156338032Speter LOCAL_RULE_3 156438032Speter R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 156538032Speter 156638032SpeterThis map would be defined in the LOCAL_CONFIG portion, as shown below. 156738032Speter 156838032SpeterSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules. 156938032SpeterFor example, new rules are needed to parse hostnames that you accept 157038032Spetervia MX records. For example, you might have: 157138032Speter 157238032Speter LOCAL_RULE_0 157338032Speter R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> 157438032Speter 157538032SpeterYou would use this if you had installed an MX record for cnmat.Berkeley.EDU 157638032Speterpointing at this host; this rule catches the message and forwards it on 157738032Speterusing UUCP. 157838032Speter 157938032SpeterYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. 158038032SpeterThese rulesets are normally empty. 158138032Speter 158238032SpeterA similar macro is LOCAL_CONFIG. This introduces lines added after the 158364562Sgshapiroboilerplate option setting but before rulesets. Do not declare rulesets in 158464562Sgshapirothe LOCAL_CONFIG section. It can be used to declare local database maps or 158564562Sgshapirowhatever. For example: 158638032Speter 158738032Speter LOCAL_CONFIG 158864562Sgshapiro Khostmap hash /etc/mail/hostmap 158938032Speter Kyplocal nis -m hosts.byname 159038032Speter 159138032Speter 159238032Speter+---------------------------+ 159338032Speter| MASQUERADING AND RELAYING | 159438032Speter+---------------------------+ 159538032Speter 159638032SpeterYou can have your host masquerade as another using 159738032Speter 159864562Sgshapiro MASQUERADE_AS(`host.domain') 159938032Speter 160038032SpeterThis causes mail being sent to be labeled as coming from the 160138032Speterindicated host.domain, rather than $j. One normally masquerades as 160264562Sgshapiroone of one's own subdomains (for example, it's unlikely that 160364562SgshapiroBerkeley would choose to masquerade as an MIT site). This 160464562Sgshapirobehaviour is modified by a plethora of FEATUREs; in particular, see 160564562Sgshapiromasquerade_envelope, allmasquerade, limited_masquerade, and 160664562Sgshapiromasquerade_entire_domain. 160738032Speter 160838032SpeterThe masquerade name is not normally canonified, so it is important 160938032Speterthat it be your One True Name, that is, fully qualified and not a 161038032SpeterCNAME. However, if you use a CNAME, the receiving side may canonify 161138032Speterit for you, so don't think you can cheat CNAME mapping this way. 161238032Speter 161338032SpeterNormally the only addresses that are masqueraded are those that come 161464562Sgshapirofrom this host (that is, are either unqualified or in class {w}, the list 161564562Sgshapiroof local domain names). You can augment this list, which is realized 161664562Sgshapiroby class {M} using 161738032Speter 161864562Sgshapiro MASQUERADE_DOMAIN(`otherhost.domain') 161938032Speter 162038032SpeterThe effect of this is that although mail to user@otherhost.domain 162138032Speterwill not be delivered locally, any mail including any user@otherhost.domain 162238032Speterwill, when relayed, be rewritten to have the MASQUERADE_AS address. 162338032SpeterThis can be a space-separated list of names. 162438032Speter 162538032SpeterIf these names are in a file, you can use 162638032Speter 162764562Sgshapiro MASQUERADE_DOMAIN_FILE(`filename') 162838032Speter 162964562Sgshapiroto read the list of names from the indicated file (i.e., to add 163064562Sgshapiroelements to class {M}). 163138032Speter 163264562SgshapiroTo exempt hosts or subdomains from being masqueraded, you can use 163364562Sgshapiro 163464562Sgshapiro MASQUERADE_EXCEPTION(`host.domain') 163564562Sgshapiro 163664562SgshapiroThis can come handy if you want to masquerade a whole domain 163790792Sgshapiroexcept for one (or a few) host(s). If these names are in a file, 163890792Sgshapiroyou can use 163964562Sgshapiro 164090792Sgshapiro MASQUERADE_EXCEPTION_FILE(`filename') 164190792Sgshapiro 164238032SpeterNormally only header addresses are masqueraded. If you want to 164338032Spetermasquerade the envelope as well, use 164438032Speter 164543730Speter FEATURE(`masquerade_envelope') 164638032Speter 164738032SpeterThere are always users that need to be "exposed" -- that is, their 164838032Speterinternal site name should be displayed instead of the masquerade name. 164964562SgshapiroRoot is an example (which has been "exposed" by default prior to 8.10). 165064562SgshapiroYou can add users to this list using 165138032Speter 165264562Sgshapiro EXPOSED_USER(`usernames') 165338032Speter 165490792SgshapiroThis adds users to class {E}; you could also use 165538032Speter 165690792Sgshapiro EXPOSED_USER_FILE(`filename') 165738032Speter 165838032SpeterYou can also arrange to relay all unqualified names (that is, names 165938032Speterwithout @host) to a relay host. For example, if you have a central 166038032Speteremail server, you might relay to that host so that users don't have 166138032Speterto have .forward files or aliases. You can do this using 166238032Speter 166343730Speter define(`LOCAL_RELAY', `mailer:hostname') 166438032Speter 166538032SpeterThe ``mailer:'' can be omitted, in which case the mailer defaults to 166638032Speter"relay". There are some user names that you don't want relayed, perhaps 166738032Speterbecause of local aliases. A common example is root, which may be 166838032Speterlocally aliased. You can add entries to this list using 166938032Speter 167064562Sgshapiro LOCAL_USER(`usernames') 167138032Speter 167290792SgshapiroThis adds users to class {L}; you could also use 167338032Speter 167490792Sgshapiro LOCAL_USER_FILE(`filename') 167538032Speter 167638032SpeterIf you want all incoming mail sent to a centralized hub, as for a 167738032Spetershared /var/spool/mail scheme, use 167838032Speter 167943730Speter define(`MAIL_HUB', `mailer:hostname') 168038032Speter 168138032SpeterAgain, ``mailer:'' defaults to "relay". If you define both LOCAL_RELAY 168243730Speterand MAIL_HUB _AND_ you have FEATURE(`stickyhost'), unqualified names will 168338032Speterbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB. 168464562SgshapiroNote: there is a (long standing) bug which keeps this combination from 168564562Sgshapiroworking for addresses of the form user+detail. 168664562SgshapiroNames in class {L} will be delivered locally, so you MUST have aliases or 168738032Speter.forward files for them. 168838032Speter 168938032SpeterFor example, if you are on machine mastodon.CS.Berkeley.EDU and you have 169043730SpeterFEATURE(`stickyhost'), the following combinations of settings will have the 169138032Speterindicated effects: 169238032Speter 169338032Speteremail sent to.... eric eric@mastodon.CS.Berkeley.EDU 169438032Speter 169538032SpeterLOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) 169638032Spetermail.CS.Berkeley.EDU (no local aliasing) (aliasing done) 169738032Speter 169838032SpeterMAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 169938032Spetermammoth.CS.Berkeley.EDU (aliasing done) (aliasing done) 170038032Speter 170138032SpeterBoth LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 170238032SpeterMAIL_HUB set as above (no local aliasing) (aliasing done) 170338032Speter 170443730SpeterIf you do not have FEATURE(`stickyhost') set, then LOCAL_RELAY and 170538032SpeterMAIL_HUB act identically, with MAIL_HUB taking precedence. 170638032Speter 170738032SpeterIf you want all outgoing mail to go to a central relay site, define 170838032SpeterSMART_HOST as well. Briefly: 170938032Speter 171038032Speter LOCAL_RELAY applies to unqualified names (e.g., "eric"). 171138032Speter MAIL_HUB applies to names qualified with the name of the 171238032Speter local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). 171364562Sgshapiro SMART_HOST applies to names qualified with other hosts or 171464562Sgshapiro bracketed addresses (e.g., "eric@mastodon.CS.Berkeley.EDU" 171564562Sgshapiro or "eric@[127.0.0.1]"). 171638032Speter 171738032SpeterHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, 171838032SpeterDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you 171938032Speterreally want absolutely everything to go to a single central site you will 172038032Speterneed to unset all the other relays -- or better yet, find or build a 172138032Speterminimal config file that does this. 172238032Speter 172338032SpeterFor duplicate suppression to work properly, the host name is best 172438032Speterspecified with a terminal dot: 172538032Speter 172638032Speter define(`MAIL_HUB', `host.domain.') 172738032Speter note the trailing dot ---^ 172838032Speter 172938032Speter 173090792Sgshapiro+-------------------------------------------+ 173190792Sgshapiro| USING LDAP FOR ALIASES, MAPS, AND CLASSES | 173290792Sgshapiro+-------------------------------------------+ 173390792Sgshapiro 173490792SgshapiroLDAP can be used for aliases, maps, and classes by either specifying your 173590792Sgshapiroown LDAP map specification or using the built-in default LDAP map 173690792Sgshapirospecification. The built-in default specifications all provide lookups 173790792Sgshapirowhich match against either the machine's fully qualified hostname (${j}) or 173890792Sgshapiroa "cluster". The cluster allows you to share LDAP entries among a large 173990792Sgshapironumber of machines without having to enter each of the machine names into 174090792Sgshapiroeach LDAP entry. To set the LDAP cluster name to use for a particular 174190792Sgshapiromachine or set of machines, set the confLDAP_CLUSTER m4 variable to a 174290792Sgshapirounique name. For example: 174390792Sgshapiro 174490792Sgshapiro define(`confLDAP_CLUSTER', `Servers') 174590792Sgshapiro 174690792SgshapiroHere, the word `Servers' will be the cluster name. As an example, assume 174790792Sgshapirothat smtp.sendmail.org, etrn.sendmail.org, and mx.sendmail.org all belong 174890792Sgshapiroto the Servers cluster. 174990792Sgshapiro 175090792SgshapiroSome of the LDAP LDIF examples below show use of the Servers cluster. 175190792SgshapiroEvery entry must have either a sendmailMTAHost or sendmailMTACluster 175290792Sgshapiroattribute or it will be ignored. Be careful as mixing clusters and 175390792Sgshapiroindividual host records can have surprising results (see the CAUTION 175490792Sgshapirosections below). 175590792Sgshapiro 175690792SgshapiroSee the file cf/sendmail.schema for the actual LDAP schemas. Note that 175790792Sgshapirothis schema (and therefore the lookups and examples below) is experimental 175890792Sgshapiroat this point as it has had little public review. Therefore, it may change 175990792Sgshapiroin future versions. Feedback via sendmail@sendmail.org is encouraged. 176090792Sgshapiro 176190792Sgshapiro------- 176290792SgshapiroAliases 176390792Sgshapiro------- 176490792Sgshapiro 176590792SgshapiroThe ALIAS_FILE (O AliasFile) option can be set to use LDAP for alias 176690792Sgshapirolookups. To use the default schema, simply use: 176790792Sgshapiro 176890792Sgshapiro define(`ALIAS_FILE', `ldap:') 176990792Sgshapiro 177090792SgshapiroBy doing so, you will use the default schema which expands to a map 177190792Sgshapirodeclared as follows: 177290792Sgshapiro 177390792Sgshapiro ldap -k (&(objectClass=sendmailMTAAliasObject) 177490792Sgshapiro (sendmailMTAAliasGrouping=aliases) 177590792Sgshapiro (|(sendmailMTACluster=${sendmailMTACluster}) 177690792Sgshapiro (sendmailMTAHost=$j)) 177790792Sgshapiro (sendmailMTAKey=%0)) 177890792Sgshapiro -v sendmailMTAAliasValue 177990792Sgshapiro 178090792SgshapiroNOTE: The macros shown above ${sendmailMTACluster} and $j are not actually 178190792Sgshapiroused when the binary expands the `ldap:' token as the AliasFile option is 178290792Sgshapironot actually macro-expanded when read from the sendmail.cf file. 178390792Sgshapiro 178490792SgshapiroExample LDAP LDIF entries might be: 178590792Sgshapiro 178690792Sgshapiro dn: sendmailMTAKey=sendmail-list, dc=sendmail, dc=org 178790792Sgshapiro objectClass: sendmailMTA 178890792Sgshapiro objectClass: sendmailMTAAlias 178990792Sgshapiro objectClass: sendmailMTAAliasObject 179090792Sgshapiro sendmailMTAAliasGrouping: aliases 179190792Sgshapiro sendmailMTAHost: etrn.sendmail.org 179290792Sgshapiro sendmailMTAKey: sendmail-list 179390792Sgshapiro sendmailMTAAliasValue: ca@example.org 179490792Sgshapiro sendmailMTAAliasValue: eric 179590792Sgshapiro sendmailMTAAliasValue: gshapiro@example.com 179690792Sgshapiro 179790792Sgshapiro dn: sendmailMTAKey=owner-sendmail-list, dc=sendmail, dc=org 179890792Sgshapiro objectClass: sendmailMTA 179990792Sgshapiro objectClass: sendmailMTAAlias 180090792Sgshapiro objectClass: sendmailMTAAliasObject 180190792Sgshapiro sendmailMTAAliasGrouping: aliases 180290792Sgshapiro sendmailMTAHost: etrn.sendmail.org 180390792Sgshapiro sendmailMTAKey: owner-sendmail-list 180490792Sgshapiro sendmailMTAAliasValue: eric 180590792Sgshapiro 180690792Sgshapiro dn: sendmailMTAKey=postmaster, dc=sendmail, dc=org 180790792Sgshapiro objectClass: sendmailMTA 180890792Sgshapiro objectClass: sendmailMTAAlias 180990792Sgshapiro objectClass: sendmailMTAAliasObject 181090792Sgshapiro sendmailMTAAliasGrouping: aliases 181190792Sgshapiro sendmailMTACluster: Servers 181290792Sgshapiro sendmailMTAKey: postmaster 181390792Sgshapiro sendmailMTAAliasValue: eric 181490792Sgshapiro 181590792SgshapiroHere, the aliases sendmail-list and owner-sendmail-list will be available 181690792Sgshapiroonly on etrn.sendmail.org but the postmaster alias will be available on 181790792Sgshapiroevery machine in the Servers cluster (including etrn.sendmail.org). 181890792Sgshapiro 181990792SgshapiroCAUTION: aliases are additive so that entries like these: 182090792Sgshapiro 182190792Sgshapiro dn: sendmailMTAKey=bob, dc=sendmail, dc=org 182290792Sgshapiro objectClass: sendmailMTA 182390792Sgshapiro objectClass: sendmailMTAAlias 182490792Sgshapiro objectClass: sendmailMTAAliasObject 182590792Sgshapiro sendmailMTAAliasGrouping: aliases 182690792Sgshapiro sendmailMTACluster: Servers 182790792Sgshapiro sendmailMTAKey: bob 182890792Sgshapiro sendmailMTAAliasValue: eric 182990792Sgshapiro 183094334Sgshapiro dn: sendmailMTAKey=bobetrn, dc=sendmail, dc=org 183190792Sgshapiro objectClass: sendmailMTA 183290792Sgshapiro objectClass: sendmailMTAAlias 183390792Sgshapiro objectClass: sendmailMTAAliasObject 183490792Sgshapiro sendmailMTAAliasGrouping: aliases 183590792Sgshapiro sendmailMTAHost: etrn.sendmail.org 183690792Sgshapiro sendmailMTAKey: bob 183790792Sgshapiro sendmailMTAAliasValue: gshapiro 183890792Sgshapiro 183990792Sgshapirowould mean that on all of the hosts in the cluster, mail to bob would go to 184090792Sgshapiroeric EXCEPT on etrn.sendmail.org in which case it would go to BOTH eric and 184190792Sgshapirogshapiro. 184290792Sgshapiro 184390792SgshapiroIf you prefer not to use the default LDAP schema for your aliases, you can 184490792Sgshapirospecify the map parameters when setting ALIAS_FILE. For example: 184590792Sgshapiro 184690792Sgshapiro define(`ALIAS_FILE', `ldap:-k (&(objectClass=mailGroup)(mail=%0)) -v mgrpRFC822MailMember') 184790792Sgshapiro 184890792Sgshapiro---- 184990792SgshapiroMaps 185090792Sgshapiro---- 185190792Sgshapiro 185290792SgshapiroFEATURE()'s which take an optional map definition argument (e.g., access, 185390792Sgshapiromailertable, virtusertable, etc.) can instead take the special keyword 185490792Sgshapiro`LDAP', e.g.: 185590792Sgshapiro 185690792Sgshapiro FEATURE(`access_db', `LDAP') 185790792Sgshapiro FEATURE(`virtusertable', `LDAP') 185890792Sgshapiro 185990792SgshapiroWhen this keyword is given, that map will use LDAP lookups consisting of 186090792Sgshapirothe objectClass sendmailMTAClassObject, the attribute sendmailMTAMapName 186190792Sgshapirowith the map name, a search attribute of sendmailMTAKey, and the value 186290792Sgshapiroattribute sendmailMTAMapValue. 186390792Sgshapiro 186490792SgshapiroThe values for sendmailMTAMapName are: 186590792Sgshapiro 186690792Sgshapiro FEATURE() sendmailMTAMapName 186790792Sgshapiro --------- ------------------ 186890792Sgshapiro access_db access 186990792Sgshapiro authinfo authinfo 187090792Sgshapiro bitdomain bitdomain 187190792Sgshapiro domaintable domain 187290792Sgshapiro genericstable generics 187390792Sgshapiro mailertable mailer 187490792Sgshapiro uucpdomain uucpdomain 187590792Sgshapiro virtusertable virtuser 187690792Sgshapiro 187790792SgshapiroFor example, FEATURE(`mailertable', `LDAP') would use the map definition: 187890792Sgshapiro 187990792Sgshapiro Kmailertable ldap -k (&(objectClass=sendmailMTAMapObject) 188090792Sgshapiro (sendmailMTAMapName=mailer) 188190792Sgshapiro (|(sendmailMTACluster=${sendmailMTACluster}) 188290792Sgshapiro (sendmailMTAHost=$j)) 188390792Sgshapiro (sendmailMTAKey=%0)) 188490792Sgshapiro -1 -v sendmailMTAMapValue 188590792Sgshapiro 188690792SgshapiroAn example LDAP LDIF entry using this map might be: 188790792Sgshapiro 188890792Sgshapiro dn: sendmailMTAMapName=mailer, dc=sendmail, dc=org 188990792Sgshapiro objectClass: sendmailMTA 189090792Sgshapiro objectClass: sendmailMTAMap 189190792Sgshapiro sendmailMTACluster: Servers 189290792Sgshapiro sendmailMTAMapName: mailer 189390792Sgshapiro 189490792Sgshapiro dn: sendmailMTAKey=example.com, sendmailMTAMapName=mailer, dc=sendmail, dc=org 189590792Sgshapiro objectClass: sendmailMTA 189690792Sgshapiro objectClass: sendmailMTAMap 189790792Sgshapiro objectClass: sendmailMTAMapObject 189890792Sgshapiro sendmailMTAMapName: mailer 189990792Sgshapiro sendmailMTACluster: Servers 190090792Sgshapiro sendmailMTAKey: example.com 190190792Sgshapiro sendmailMTAMapValue: relay:[smtp.example.com] 190290792Sgshapiro 190390792SgshapiroCAUTION: If your LDAP database contains the record above and *ALSO* a host 190490792Sgshapirospecific record such as: 190590792Sgshapiro 190690792Sgshapiro dn: sendmailMTAKey=example.com@etrn, sendmailMTAMapName=mailer, dc=sendmail, dc=org 190790792Sgshapiro objectClass: sendmailMTA 190890792Sgshapiro objectClass: sendmailMTAMap 190990792Sgshapiro objectClass: sendmailMTAMapObject 191090792Sgshapiro sendmailMTAMapName: mailer 191190792Sgshapiro sendmailMTAHost: etrn.sendmail.org 191290792Sgshapiro sendmailMTAKey: example.com 191390792Sgshapiro sendmailMTAMapValue: relay:[mx.example.com] 191490792Sgshapiro 191590792Sgshapirothen these entries will give unexpected results. When the lookup is done 191690792Sgshapiroon etrn.sendmail.org, the effect is that there is *NO* match at all as maps 191790792Sgshapirorequire a single match. Since the host etrn.sendmail.org is also in the 191890792SgshapiroServers cluster, LDAP would return two answers for the example.com map key 191990792Sgshapiroin which case sendmail would treat this as no match at all. 192090792Sgshapiro 192190792SgshapiroIf you prefer not to use the default LDAP schema for your maps, you can 192290792Sgshapirospecify the map parameters when using the FEATURE(). For example: 192390792Sgshapiro 192490792Sgshapiro FEATURE(`access_db', `ldap:-1 -k (&(objectClass=mapDatabase)(key=%0)) -v value') 192590792Sgshapiro 192690792Sgshapiro------- 192790792SgshapiroClasses 192890792Sgshapiro------- 192990792Sgshapiro 193090792SgshapiroNormally, classes can be filled via files or programs. As of 8.12, they 193190792Sgshapirocan also be filled via map lookups using a new syntax: 193290792Sgshapiro 193390792Sgshapiro F{ClassName}mapkey@mapclass:mapspec 193490792Sgshapiro 193590792Sgshapiromapkey is optional and if not provided the map key will be empty. This can 193690792Sgshapirobe used with LDAP to read classes from LDAP. Note that the lookup is only 193790792Sgshapirodone when sendmail is initially started. Use the special value `@LDAP' to 193890792Sgshapirouse the default LDAP schema. For example: 193990792Sgshapiro 194090792Sgshapiro RELAY_DOMAIN_FILE(`@LDAP') 194190792Sgshapiro 194290792Sgshapirowould put all of the attribute sendmailMTAClassValue values of LDAP records 194390792Sgshapirowith objectClass sendmailMTAClass and an attribute sendmailMTAClassName of 194490792Sgshapiro'R' into class $={R}. In other words, it is equivalent to the LDAP map 194590792Sgshapirospecification: 194690792Sgshapiro 194790792Sgshapiro F{R}@ldap:-k (&(objectClass=sendmailMTAClass) 194890792Sgshapiro (sendmailMTAClassName=R) 194990792Sgshapiro (|(sendmailMTACluster=${sendmailMTACluster}) 195090792Sgshapiro (sendmailMTAHost=$j))) 195190792Sgshapiro -v sendmailMTAClassValue 195290792Sgshapiro 195390792SgshapiroNOTE: The macros shown above ${sendmailMTACluster} and $j are not actually 195490792Sgshapiroused when the binary expands the `@LDAP' token as class declarations are 195590792Sgshapironot actually macro-expanded when read from the sendmail.cf file. 195690792Sgshapiro 195790792SgshapiroThis can be used with class related commands such as RELAY_DOMAIN_FILE(), 195890792SgshapiroMASQUERADE_DOMAIN_FILE(), etc: 195990792Sgshapiro 196090792Sgshapiro Command sendmailMTAClassName 196190792Sgshapiro ------- -------------------- 196290792Sgshapiro CANONIFY_DOMAIN_FILE() Canonify 196390792Sgshapiro EXPOSED_USER_FILE() E 196490792Sgshapiro GENERICS_DOMAIN_FILE() G 196590792Sgshapiro LDAPROUTE_DOMAIN_FILE() LDAPRoute 196690792Sgshapiro LDAPROUTE_EQUIVALENT_FILE() LDAPRouteEquiv 196790792Sgshapiro LOCAL_USER_FILE() L 196890792Sgshapiro MASQUERADE_DOMAIN_FILE() M 196990792Sgshapiro MASQUERADE_EXCEPTION_FILE() N 197090792Sgshapiro RELAY_DOMAIN_FILE() R 197190792Sgshapiro VIRTUSER_DOMAIN_FILE() VirtHost 197290792Sgshapiro 197390792SgshapiroYou can also add your own as any 'F'ile class of the form: 197490792Sgshapiro 197590792Sgshapiro F{ClassName}@LDAP 197690792Sgshapiro ^^^^^^^^^ 197790792Sgshapirowill use "ClassName" for the sendmailMTAClassName. 197890792Sgshapiro 197990792SgshapiroAn example LDAP LDIF entry would look like: 198090792Sgshapiro 198190792Sgshapiro dn: sendmailMTAClassName=R, dc=sendmail, dc=org 198290792Sgshapiro objectClass: sendmailMTA 198390792Sgshapiro objectClass: sendmailMTAClass 198490792Sgshapiro sendmailMTACluster: Servers 198590792Sgshapiro sendmailMTAClassName: R 198690792Sgshapiro sendmailMTAClassValue: sendmail.org 198790792Sgshapiro sendmailMTAClassValue: example.com 198890792Sgshapiro sendmailMTAClassValue: 10.56.23 198990792Sgshapiro 199090792SgshapiroCAUTION: If your LDAP database contains the record above and *ALSO* a host 199190792Sgshapirospecific record such as: 199290792Sgshapiro 199390792Sgshapiro dn: sendmailMTAClassName=R@etrn.sendmail.org, dc=sendmail, dc=org 199490792Sgshapiro objectClass: sendmailMTA 199590792Sgshapiro objectClass: sendmailMTAClass 199690792Sgshapiro sendmailMTAHost: etrn.sendmail.org 199790792Sgshapiro sendmailMTAClassName: R 199890792Sgshapiro sendmailMTAClassValue: example.com 199990792Sgshapiro 200090792Sgshapirothe result will be similar to the aliases caution above. When the lookup 200190792Sgshapirois done on etrn.sendmail.org, $={R} would contain all of the entries (from 200290792Sgshapiroboth the cluster match and the host match). In other words, the effective 200390792Sgshapirois additive. 200490792Sgshapiro 200590792SgshapiroIf you prefer not to use the default LDAP schema for your classes, you can 200690792Sgshapirospecify the map parameters when using the class command. For example: 200790792Sgshapiro 200890792Sgshapiro VIRTUSER_DOMAIN_FILE(`@ldap:-k (&(objectClass=virtHosts)(host=*)) -v host') 200990792Sgshapiro 201090792SgshapiroRemember, macros can not be used in a class declaration as the binary does 201190792Sgshapironot expand them. 201290792Sgshapiro 201390792Sgshapiro 201464562Sgshapiro+--------------+ 201564562Sgshapiro| LDAP ROUTING | 201664562Sgshapiro+--------------+ 201764562Sgshapiro 201864562SgshapiroFEATURE(`ldap_routing') can be used to implement the IETF Internet Draft 201964562SgshapiroLDAP Schema for Intranet Mail Routing 202064562Sgshapiro(draft-lachman-laser-ldap-mail-routing-01). This feature enables 202164562SgshapiroLDAP-based rerouting of a particular address to either a different host 202264562Sgshapiroor a different address. The LDAP lookup is first attempted on the full 202364562Sgshapiroaddress (e.g., user@example.com) and then on the domain portion 202464562Sgshapiro(e.g., @example.com). Be sure to setup your domain for LDAP routing using 202564562SgshapiroLDAPROUTE_DOMAIN(), e.g.: 202664562Sgshapiro 202764562Sgshapiro LDAPROUTE_DOMAIN(`example.com') 202864562Sgshapiro 202990792SgshapiroAdditionally, you can specify equivalent domains for LDAP routing using 203090792SgshapiroLDAPROUTE_EQUIVALENT() and LDAPROUTE_EQUIVALENT_FILE(). 'Equivalent' 203190792Sgshapirohostnames are mapped to $M (the masqueraded hostname for the server) before 203290792Sgshapirothe LDAP query. For example, if the mail is addressed to 203390792Sgshapirouser@host1.example.com, normally the LDAP lookup would only be done for 203490792Sgshapiro'user@host1.example.com' and '@host1.example.com'. However, if 203590792SgshapiroLDAPROUTE_EQUIVALENT(`host1.example.com') is used, the lookups would also be 203690792Sgshapirodone on 'user@example.com' and '@example.com' after attempting the 203790792Sgshapirohost1.example.com lookups. 203890792Sgshapiro 203964562SgshapiroBy default, the feature will use the schemas as specified in the draft 204064562Sgshapiroand will not reject addresses not found by the LDAP lookup. However, 204164562Sgshapirothis behavior can be changed by giving additional arguments to the FEATURE() 204264562Sgshapirocommand: 204364562Sgshapiro 204490792Sgshapiro FEATURE(`ldap_routing', <mailHost>, <mailRoutingAddress>, <bounce>, <detail>) 204564562Sgshapiro 204664562Sgshapirowhere <mailHost> is a map definition describing how to lookup an alternative 204764562Sgshapiromail host for a particular address; <mailRoutingAddress> is a map definition 204890792Sgshapirodescribing how to lookup an alternative address for a particular address; 204964562Sgshapirothe <bounce> argument, if present and not the word "passthru", dictates 205064562Sgshapirothat mail should be bounced if neither a mailHost nor mailRoutingAddress 205190792Sgshapirois found; and <detail> indicates what actions to take if the address 205290792Sgshapirocontains +detail information -- `strip' tries the lookup with the +detail 205390792Sgshapiroand if no matches are found, strips the +detail and tries the lookup again; 205490792Sgshapiro`preserve', does the same as `strip' but if a mailRoutingAddress match is 205590792Sgshapirofound, the +detail information is copied to the new address. 205664562Sgshapiro 205764562SgshapiroThe default <mailHost> map definition is: 205864562Sgshapiro 205994334Sgshapiro ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient) 206064562Sgshapiro (mailLocalAddress=%0)) 206164562Sgshapiro 206264562SgshapiroThe default <mailRoutingAddress> map definition is: 206364562Sgshapiro 206494334Sgshapiro ldap -1 -T<TMPF> -v mailRoutingAddress 206594334Sgshapiro -k (&(objectClass=inetLocalMailRecipient) 206694334Sgshapiro (mailLocalAddress=%0)) 206764562Sgshapiro 206864562SgshapiroNote that neither includes the LDAP server hostname (-h server) or base DN 206964562Sgshapiro(-b o=org,c=COUNTRY), both necessary for LDAP queries. It is presumed that 207064562Sgshapiroyour .mc file contains a setting for the confLDAP_DEFAULT_SPEC option with 207164562Sgshapirothese settings. If this is not the case, the map definitions should be 207294334Sgshapirochanged as described above. The "-T<TMPF>" is required in any user 207394334Sgshapirospecified map definition to catch temporary errors. 207464562Sgshapiro 207564562SgshapiroThe following possibilities exist as a result of an LDAP lookup on an 207664562Sgshapiroaddress: 207764562Sgshapiro 207864562Sgshapiro mailHost is mailRoutingAddress is Results in 207964562Sgshapiro ----------- --------------------- ---------- 208064562Sgshapiro set to a set mail delivered to 208164562Sgshapiro "local" host mailRoutingAddress 208264562Sgshapiro 208364562Sgshapiro set to a not set delivered to 208464562Sgshapiro "local" host original address 208564562Sgshapiro 208664562Sgshapiro set to a set mailRoutingAddress 208764562Sgshapiro remote host relayed to mailHost 208864562Sgshapiro 208964562Sgshapiro set to a not set original address 209064562Sgshapiro remote host relayed to mailHost 209164562Sgshapiro 209264562Sgshapiro not set set mail delivered to 209364562Sgshapiro mailRoutingAddress 209464562Sgshapiro 209564562Sgshapiro not set not set delivered to 209664562Sgshapiro original address *OR* 209764562Sgshapiro bounced as unknown user 209864562Sgshapiro 209990792SgshapiroThe term "local" host above means the host specified is in class {w}. If 210090792Sgshapirothe result would mean sending the mail to a different host, that host is 210190792Sgshapirolooked up in the mailertable before delivery. 210290792Sgshapiro 210364562SgshapiroNote that the last case depends on whether the third argument is given 210464562Sgshapiroto the FEATURE() command. The default is to deliver the message to the 210564562Sgshapirooriginal address. 210664562Sgshapiro 210764562SgshapiroThe LDAP entries should be set up with an objectClass of 210864562SgshapiroinetLocalMailRecipient and the address be listed in a mailLocalAddress 210964562Sgshapiroattribute. If present, there must be only one mailHost attribute and it 211064562Sgshapiromust contain a fully qualified host name as its value. Similarly, if 211164562Sgshapiropresent, there must be only one mailRoutingAddress attribute and it must 211290792Sgshapirocontain an RFC 822 compliant address. Some example LDAP records (in LDIF 211364562Sgshapiroformat): 211464562Sgshapiro 211564562Sgshapiro dn: uid=tom, o=example.com, c=US 211664562Sgshapiro objectClass: inetLocalMailRecipient 211764562Sgshapiro mailLocalAddress: tom@example.com 211864562Sgshapiro mailRoutingAddress: thomas@mailhost.example.com 211964562Sgshapiro 212064562SgshapiroThis would deliver mail for tom@example.com to thomas@mailhost.example.com. 212164562Sgshapiro 212264562Sgshapiro dn: uid=dick, o=example.com, c=US 212364562Sgshapiro objectClass: inetLocalMailRecipient 212464562Sgshapiro mailLocalAddress: dick@example.com 212564562Sgshapiro mailHost: eng.example.com 212664562Sgshapiro 212764562SgshapiroThis would relay mail for dick@example.com to the same address but redirect 212890792Sgshapirothe mail to MX records listed for the host eng.example.com (unless the 212990792Sgshapiromailertable overrides). 213064562Sgshapiro 213164562Sgshapiro dn: uid=harry, o=example.com, c=US 213264562Sgshapiro objectClass: inetLocalMailRecipient 213364562Sgshapiro mailLocalAddress: harry@example.com 213464562Sgshapiro mailHost: mktmail.example.com 213564562Sgshapiro mailRoutingAddress: harry@mkt.example.com 213664562Sgshapiro 213764562SgshapiroThis would relay mail for harry@example.com to the MX records listed for 213864562Sgshapirothe host mktmail.example.com using the new address harry@mkt.example.com 213964562Sgshapirowhen talking to that host. 214064562Sgshapiro 214164562Sgshapiro dn: uid=virtual.example.com, o=example.com, c=US 214264562Sgshapiro objectClass: inetLocalMailRecipient 214364562Sgshapiro mailLocalAddress: @virtual.example.com 214464562Sgshapiro mailHost: server.example.com 214564562Sgshapiro mailRoutingAddress: virtual@example.com 214664562Sgshapiro 214764562SgshapiroThis would send all mail destined for any username @virtual.example.com to 214864562Sgshapirothe machine server.example.com's MX servers and deliver to the address 214964562Sgshapirovirtual@example.com on that relay machine. 215064562Sgshapiro 215164562Sgshapiro 215238032Speter+---------------------------------+ 215338032Speter| ANTI-SPAM CONFIGURATION CONTROL | 215438032Speter+---------------------------------+ 215538032Speter 215638032SpeterThe primary anti-spam features available in sendmail are: 215738032Speter 215838032Speter* Relaying is denied by default. 215938032Speter* Better checking on sender information. 216038032Speter* Access database. 216138032Speter* Header checks. 216238032Speter 216364562SgshapiroRelaying (transmission of messages from a site outside your host (class 216464562Sgshapiro{w}) to another site except yours) is denied by default. Note that this 216564562Sgshapirochanged in sendmail 8.9; previous versions allowed relaying by default. 216664562SgshapiroIf you really want to revert to the old behaviour, you will need to use 216764562SgshapiroFEATURE(`promiscuous_relay'). You can allow certain domains to relay 216864562Sgshapirothrough your server by adding their domain name or IP address to class 216964562Sgshapiro{R} using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the access database 217090792Sgshapiro(described below). Note that IPv6 addresses must be prefaced with "IPv6:". 217190792SgshapiroThe file consists (like any other file based class) of entries listed on 217290792Sgshapiroseparate lines, e.g., 217338032Speter 217464562Sgshapiro sendmail.org 217564562Sgshapiro 128.32 217690792Sgshapiro IPv6:2002:c0a8:02c7 217790792Sgshapiro IPv6:2002:c0a8:51d2::23f4 217864562Sgshapiro host.mydomain.com 217990792Sgshapiro [UNIX:localhost] 218064562Sgshapiro 218190792SgshapiroNotice: the last entry allows relaying for connections via a UNIX 218290792Sgshapirosocket to the MTA/MSP. This might be necessary if your configuration 218390792Sgshapirodoesn't allow relaying by other means in that case, e.g., by having 218490792Sgshapirolocalhost.$m in class {R} (make sure $m is not just a top level 218590792Sgshapirodomain). 218690792Sgshapiro 218738032SpeterIf you use 218838032Speter 218943730Speter FEATURE(`relay_entire_domain') 219038032Speter 219164562Sgshapirothen any host in any of your local domains (that is, class {m}) 219242575Speterwill be relayed (that is, you will accept mail either to or from any 219342575Speterhost in your domain). 219438032Speter 219538032SpeterYou can also allow relaying based on the MX records of the host 219638032Speterportion of an incoming recipient address by using 219738032Speter 219843730Speter FEATURE(`relay_based_on_MX') 219938032Speter 220038032SpeterFor example, if your server receives a recipient of user@domain.com 220138032Speterand domain.com lists your server in its MX records, the mail will be 220290792Sgshapiroaccepted for relay to domain.com. This feature may cause problems 220390792Sgshapiroif MX lookups for the recipient domain are slow or time out. In that 220490792Sgshapirocase, mail will be temporarily rejected. It is usually better to 220590792Sgshapiromaintain a list of hosts/domains for which the server acts as relay. 220690792SgshapiroNote also that this feature will stop spammers from using your host 220790792Sgshapiroto relay spam but it will not stop outsiders from using your server 220890792Sgshapiroas a relay for their site (that is, they set up an MX record pointing 220990792Sgshapiroto your mail server, and you will relay mail addressed to them 221090792Sgshapirowithout any prior arrangement). Along the same lines, 221138032Speter 221243730Speter FEATURE(`relay_local_from') 221338032Speter 221438032Speterwill allow relaying if the sender specifies a return path (i.e. 221590792SgshapiroMAIL FROM: <user@domain>) domain which is a local domain. This is a 221638032Speterdangerous feature as it will allow spammers to spam using your mail 221738032Speterserver by simply specifying a return address of user@your.domain.com. 221838032SpeterIt should not be used unless absolutely necessary. 221964562SgshapiroA slightly better solution is 222038032Speter 222164562Sgshapiro FEATURE(`relay_mail_from') 222264562Sgshapiro 222364562Sgshapirowhich allows relaying if the mail sender is listed as RELAY in the 2224110560Sgshapiroaccess map. If an optional argument `domain' (this is the literal 2225110560Sgshapiroword `domain', not a placeholder) is given, the domain portion of 2226110560Sgshapirothe mail sender is also checked to allowing relaying. This option 2227110560Sgshapiroonly works together with the tag From: for the LHS of the access 2228110560Sgshapiromap entries (see below: Finer control...). This feature allows 2229110560Sgshapirospammers to abuse your mail server by specifying a return address 2230110560Sgshapirothat you enabled in your access file. This may be harder to figure 2231110560Sgshapiroout for spammers, but it should not be used unless necessary. 2232110560SgshapiroInstead use SMTP AUTH or STARTTLS to allow relaying for roaming 2233110560Sgshapirousers. 223464562Sgshapiro 223564562Sgshapiro 223690792SgshapiroIf source routing is used in the recipient address (e.g., 223738032SpeterRCPT TO: <user%site.com@othersite.com>), sendmail will check 223838032Speteruser@site.com for relaying if othersite.com is an allowed relay host 223964562Sgshapiroin either class {R}, class {m} if FEATURE(`relay_entire_domain') is used, 224043730Speteror the access database if FEATURE(`access_db') is used. To prevent 224138032Speterthe address from being stripped down, use: 224238032Speter 224343730Speter FEATURE(`loose_relay_check') 224438032Speter 224538032SpeterIf you think you need to use this feature, you probably do not. This 224638032Spetershould only be used for sites which have no control over the addresses 224738032Speterthat they provide a gateway for. Use this FEATURE with caution as it 224838032Spetercan allow spammers to relay through your server if not setup properly. 224938032Speter 225064562SgshapiroNOTICE: It is possible to relay mail through a system which the anti-relay 225164562Sgshapirorules do not prevent: the case of a system that does use FEATURE(`nouucp', 225264562Sgshapiro`nospecial') (system A) and relays local messages to a mail hub (e.g., via 225364562SgshapiroLOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use 225464562SgshapiroFEATURE(`nouucp') at all, addresses of the form 225564562Sgshapiro<example.net!user@local.host> would be relayed to <user@example.net>. 225664562SgshapiroSystem A doesn't recognize `!' as an address separator and therefore 225764562Sgshapiroforwards it to the mail hub which in turns relays it because it came from 225864562Sgshapiroa trusted local host. So if a mailserver allows UUCP (bang-format) 225964562Sgshapiroaddresses, all systems from which it allows relaying should do the same 226064562Sgshapiroor reject those addresses. 226164562Sgshapiro 226238032SpeterAs of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has 226338032Speteran unresolvable domain (i.e., one that DNS, your local name service, 226490792Sgshapiroor special case rules in ruleset 3 cannot locate). This also applies 226590792Sgshapiroto addresses that use domain literals, e.g., <user@[1.2.3.4]>, if the 226690792SgshapiroIP address can't be mapped to a host name. If you want to continue 226790792Sgshapiroto accept such domains, e.g., because you are inside a firewall that 226890792Sgshapirohas only a limited view of the Internet host name space (note that you 226990792Sgshapirowill not be able to return mail to them unless you have some "smart 227090792Sgshapirohost" forwarder), use 227138032Speter 227243730Speter FEATURE(`accept_unresolvable_domains') 227338032Speter 227490792SgshapiroAlternatively, you can allow specific addresses by adding them to 227590792Sgshapirothe access map, e.g., 227690792Sgshapiro 227790792Sgshapiro From:unresolvable.domain OK 227890792Sgshapiro From:[1.2.3.4] OK 227990792Sgshapiro From:[1.2.4] OK 228090792Sgshapiro 228190792SgshapiroNotice: domains which are temporarily unresolvable are (temporarily) 228290792Sgshapirorejected with a 451 reply code. If those domains should be accepted 228390792Sgshapiro(which is discouraged) then you can use 228490792Sgshapiro 228590792Sgshapiro LOCAL_CONFIG 228690792Sgshapiro C{ResOk}TEMP 228790792Sgshapiro 228838032Spetersendmail will also refuse mail if the MAIL FROM: parameter is not 228938032Speterfully qualified (i.e., contains a domain as well as a user). If you 229038032Speterwant to continue to accept such senders, use 229138032Speter 229243730Speter FEATURE(`accept_unqualified_senders') 229338032Speter 229464562SgshapiroSetting the DaemonPortOptions modifier 'u' overrides the default behavior, 229564562Sgshapiroi.e., unqualified addresses are accepted even without this FEATURE. If 229664562Sgshapirothis FEATURE is not used, the DaemonPortOptions modifier 'f' can be used 229790792Sgshapiroto enforce fully qualified domain names. 229864562Sgshapiro 229938032SpeterAn ``access'' database can be created to accept or reject mail from 230038032Speterselected domains. For example, you may choose to reject all mail 230138032Speteroriginating from known spammers. To enable such a database, use 230238032Speter 230343730Speter FEATURE(`access_db') 230438032Speter 230590792SgshapiroNotice: the access database is applied to the envelope addresses 230690792Sgshapiroand the connection information, not to the header. 230790792Sgshapiro 230890792SgshapiroThe FEATURE macro can accept as second parameter the key file 230938032Speterdefinition for the database; for example 231038032Speter 231190792Sgshapiro FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access_map') 231238032Speter 231390792SgshapiroNotice: If a second argument is specified it must contain the option 231490792Sgshapiro`-T<TMPF>' as shown above. The optional third and fourth parameters 231590792Sgshapiromay be `skip' or `lookupdotdomain'. The former enables SKIP as 231690792Sgshapirovalue part (see below), the latter is another way to enable the 231790792Sgshapirofeature of the same name (see above). 231890792Sgshapiro 231942575SpeterRemember, since /etc/mail/access is a database, after creating the text 232042575Speterfile as described below, you must use makemap to create the database 232142575Spetermap. For example: 232242575Speter 232343730Speter makemap hash /etc/mail/access < /etc/mail/access 232442575Speter 232538032SpeterThe table itself uses e-mail addresses, domain names, and network 232690792Sgshapironumbers as keys. Note that IPv6 addresses must be prefaced with "IPv6:". 232790792SgshapiroFor example, 232838032Speter 232990792Sgshapiro spammer@aol.com REJECT 233090792Sgshapiro cyberspammer.com REJECT 233194334Sgshapiro TLD REJECT 233290792Sgshapiro 192.168.212 REJECT 233390792Sgshapiro IPv6:2002:c0a8:02c7 RELAY 233490792Sgshapiro IPv6:2002:c0a8:51d2::23f4 REJECT 233538032Speter 233638032Speterwould refuse mail from spammer@aol.com, any user from cyberspammer.com 233794334Sgshapiro(or any host within the cyberspammer.com domain), any host in the entire 233894334Sgshapirotop level domain TLD, 192.168.212.* network, and the IPv6 address 233994334Sgshapiro2002:c0a8:51d2::23f4. It would allow relay for the IPv6 network 234094334Sgshapiro2002:c0a8:02c7::/48. 234138032Speter 234238032SpeterThe value part of the map can contain: 234338032Speter 234490792Sgshapiro OK Accept mail even if other rules in the running 234590792Sgshapiro ruleset would reject it, for example, if the domain 234690792Sgshapiro name is unresolvable. "Accept" does not mean 234790792Sgshapiro "relay", but at most acceptance for local 234890792Sgshapiro recipients. That is, OK allows less than RELAY. 234942575Speter RELAY Accept mail addressed to the indicated domain or 235042575Speter received from the indicated domain for relaying 235142575Speter through your SMTP server. RELAY also serves as 235242575Speter an implicit OK for the other checks. 235342575Speter REJECT Reject the sender or recipient with a general 235438032Speter purpose message. 235542575Speter DISCARD Discard the message completely using the 235671345Sgshapiro $#discard mailer. If it is used in check_compat, 235771345Sgshapiro it affects only the designated recipient, not 235871345Sgshapiro the whole message as it does in all other cases. 235971345Sgshapiro This should only be used if really necessary. 236090792Sgshapiro SKIP This can only be used for host/domain names 236190792Sgshapiro and IP addresses/nets. It will abort the current 236290792Sgshapiro search for this entry without accepting or rejecting 236390792Sgshapiro it but causing the default action. 236466494Sgshapiro ### any text where ### is an RFC 821 compliant error code and 236566494Sgshapiro "any text" is a message to return for the command. 236666494Sgshapiro The string should be quoted to avoid surprises, 236766494Sgshapiro e.g., sendmail may remove spaces otherwise. 236890792Sgshapiro This type is deprecated, use one the two 236990792Sgshapiro ERROR: entries below instead. 237064562Sgshapiro ERROR:### any text 237164562Sgshapiro as above, but useful to mark error messages as such. 237264562Sgshapiro ERROR:D.S.N:### any text 237364562Sgshapiro where D.S.N is an RFC 1893 compliant error code 237464562Sgshapiro and the rest as above. 237538032Speter 237638032SpeterFor example: 237738032Speter 2378110560Sgshapiro cyberspammer.com ERROR:"550 We don't accept mail from spammers" 237938032Speter okay.cyberspammer.com OK 238064562Sgshapiro sendmail.org RELAY 238138032Speter 128.32 RELAY 238290792Sgshapiro IPv6:1:2:3:4:5:6:7 RELAY 238364562Sgshapiro [127.0.0.3] OK 238490792Sgshapiro [IPv6:1:2:3:4:5:6:7:8] OK 238538032Speter 238664562Sgshapirowould accept mail from okay.cyberspammer.com, but would reject mail from 238764562Sgshapiroall other hosts at cyberspammer.com with the indicated message. It would 238864562Sgshapiroallow relaying mail from and to any hosts in the sendmail.org domain, and 238964562Sgshapiroallow relaying from the 128.32.*.* network and the IPv6 1:2:3:4:5:6:7:* 239064562Sgshapironetwork. The latter two entries are for checks against ${client_name} if 239164562Sgshapirothe IP address doesn't resolve to a hostname (or is considered as "may be 239290792Sgshapiroforged"). That is, using square brackets means these are host names, 239390792Sgshapironot network numbers. 239438032Speter 239564562SgshapiroWarning: if you change the RFC 821 compliant error code from the default 239664562Sgshapirovalue of 550, then you should probably also change the RFC 1893 compliant 239764562Sgshapiroerror code to match it. For example, if you use 239864562Sgshapiro 239990792Sgshapiro user@example.com ERROR:450 mailbox full 240064562Sgshapiro 240190792Sgshapirothe error returned would be "450 5.0.0 mailbox full" which is wrong. 240290792SgshapiroUse "ERROR:4.2.2:450 mailbox full" instead. 240364562Sgshapiro 240464562SgshapiroNote, UUCP users may need to add hostname.UUCP to the access database 240590792Sgshapiroor class {R}. 240664562Sgshapiro 240790792SgshapiroIf you also use: 240890792Sgshapiro 240943730Speter FEATURE(`relay_hosts_only') 241038032Speter 241138032Speterthen the above example will allow relaying for sendmail.org, but not 241238032Speterhosts within the sendmail.org domain. Note that this will also require 241364562Sgshapirohosts listed in class {R} to be fully qualified host names. 241438032Speter 241538032SpeterYou can also use the access database to block sender addresses based on 241638032Speterthe username portion of the address. For example: 241738032Speter 241866494Sgshapiro FREE.STEALTH.MAILER@ ERROR:550 Spam not accepted 241938032Speter 242038032SpeterNote that you must include the @ after the username to signify that 242138032Speterthis database entry is for checking only the username portion of the 242238032Spetersender address. 242338032Speter 242438032SpeterIf you use: 242538032Speter 242643730Speter FEATURE(`blacklist_recipients') 242738032Speter 242838032Speterthen you can add entries to the map for local users, hosts in your 242938032Speterdomains, or addresses in your domain which should not receive mail: 243038032Speter 243166494Sgshapiro badlocaluser@ ERROR:550 Mailbox disabled for this username 243266494Sgshapiro host.mydomain.com ERROR:550 That host does not accept mail 243366494Sgshapiro user@otherhost.mydomain.com ERROR:550 Mailbox disabled for this recipient 243438032Speter 243538032SpeterThis would prevent a recipient of badlocaluser@mydomain.com, any 243638032Speteruser at host.mydomain.com, and the single address 243764562Sgshapirouser@otherhost.mydomain.com from receiving mail. Please note: a 243864562Sgshapirolocal username must be now tagged with an @ (this is consistent 243964562Sgshapirowith the check of the sender address, and hence it is possible to 244064562Sgshapirodistinguish between hostnames and usernames). Enabling this feature 244164562Sgshapirowill keep you from sending mails to all addresses that have an 244264562Sgshapiroerror message or REJECT as value part in the access map. Taking 244364562Sgshapirothe example from above: 244438032Speter 244542575Speter spammer@aol.com REJECT 244642575Speter cyberspammer.com REJECT 244742575Speter 244842575SpeterMail can't be sent to spammer@aol.com or anyone at cyberspammer.com. 244942575Speter 245090792SgshapiroThere are several DNS based blacklists, the first of which was 245190792Sgshapirothe RBL (``Realtime Blackhole List'') run by the MAPS project, 245290792Sgshapirosee http://mail-abuse.org/. These are databases of spammers 245390792Sgshapiromaintained in DNS. To use such a database, specify 245438032Speter 245564562Sgshapiro FEATURE(`dnsbl') 245638032Speter 245790792SgshapiroThis will cause sendmail to reject mail from any site in the original 245880785SgshapiroRealtime Blackhole List database. This default DNS blacklist, 245980785Sgshapiroblackholes.mail-abuse.org, is a service offered by the Mail Abuse 246080785SgshapiroPrevention System (MAPS). As of July 31, 2001, MAPS is a subscription 246180785Sgshapiroservice, so using that network address won't work if you haven't 246280785Sgshapirosubscribed. Contact MAPS to subscribe (http://mail-abuse.org/). 246338032Speter 246480785SgshapiroYou can specify an alternative RBL server to check by specifying an 246580785Sgshapiroargument to the FEATURE. The default error message is 246680785Sgshapiro 246798841Sgshapiro Rejected: IP-ADDRESS listed at SERVER 246880785Sgshapiro 246990792Sgshapirowhere IP-ADDRESS and SERVER are replaced by the appropriate 247090792Sgshapiroinformation. A second argument can be used to specify a different 247190792Sgshapirotext. By default, temporary lookup failures are ignored and hence 247290792Sgshapirocause the connection not to be rejected by the DNS based rejection 247390792Sgshapirolist. This behavior can be changed by specifying a third argument, 247490792Sgshapirowhich must be either `t' or a full error message. For example: 247571345Sgshapiro 247690792Sgshapiro FEATURE(`dnsbl', `dnsbl.example.com', `', 247790792Sgshapiro `"451 Temporary lookup failure for " $&{client_addr} " in dnsbl.example.com"') 247871345Sgshapiro 247990792SgshapiroIf `t' is used, the error message is: 248090792Sgshapiro 248190792Sgshapiro 451 Temporary lookup failure of IP-ADDRESS at SERVER 248290792Sgshapiro 248390792Sgshapirowhere IP-ADDRESS and SERVER are replaced by the appropriate 248490792Sgshapiroinformation. 248590792Sgshapiro 248690792SgshapiroThis FEATURE can be included several times to query different 248790792SgshapiroDNS based rejection lists, e.g., the dial-up user list (see 248890792Sgshapirohttp://mail-abuse.org/dul/). 248990792Sgshapiro 249090792SgshapiroNotice: to avoid checking your own local domains against those 249190792Sgshapiroblacklists, use the access_db feature and add: 249290792Sgshapiro 249390792Sgshapiro Connect:10.1 OK 249490792Sgshapiro Connect:127.0.0.1 RELAY 249590792Sgshapiro 249690792Sgshapiroto the access map, where 10.1 is your local network. You may 249790792Sgshapirowant to use "RELAY" instead of "OK" to allow also relaying 249890792Sgshapiroinstead of just disabling the DNS lookups in the backlists. 249990792Sgshapiro 250090792Sgshapiro 250138032SpeterThe features described above make use of the check_relay, check_mail, 2502110560Sgshapiroand check_rcpt rulesets. Note that check_relay checks the SMTP 2503110560Sgshapiroclient hostname and IP address when the connection is made to your 2504110560Sgshapiroserver. It does not check if a mail message is being relayed to 2505110560Sgshapiroanother server. That check is done in check_rcpt. If you wish to 2506110560Sgshapiroinclude your own checks, you can put your checks in the rulesets 2507110560SgshapiroLocal_check_relay, Local_check_mail, and Local_check_rcpt. For 2508110560Sgshapiroexample if you wanted to block senders with all numeric usernames 2509110560Sgshapiro(i.e. 2312343@bigisp.com), you would use Local_check_mail and the 2510110560Sgshapiroregex map: 251138032Speter 251264562Sgshapiro LOCAL_CONFIG 251364562Sgshapiro Kallnumbers regex -a@MATCH ^[0-9]+$ 251464562Sgshapiro 251564562Sgshapiro LOCAL_RULESETS 251664562Sgshapiro SLocal_check_mail 251764562Sgshapiro # check address against various regex checks 251838032Speter R$* $: $>Parse0 $>3 $1 251964562Sgshapiro R$+ < @ bigisp.com. > $* $: $(allnumbers $1 $) 252064562Sgshapiro R@MATCH $#error $: 553 Header Error 252138032Speter 252238032SpeterThese rules are called with the original arguments of the corresponding 252338032Spetercheck_* ruleset. If the local ruleset returns $#OK, no further checking 252438032Speteris done by the features described above and the mail is accepted. If the 252538032Speterlocal ruleset resolves to a mailer (such as $#error or $#discard), the 252638032Speterappropriate action is taken. Otherwise, the results of the local 252738032Speterrewriting are ignored. 252838032Speter 252964562SgshapiroFiner control by using tags for the LHS of the access map 253090792Sgshapiro--------------------------------------------------------- 253138032Speter 253264562SgshapiroRead this section only if the options listed so far are not sufficient 253364562Sgshapirofor your purposes. There is now the option to tag entries in the 253464562Sgshapiroaccess map according to their type. Three tags are available: 253564562Sgshapiro 253664562Sgshapiro Connect: connection information (${client_addr}, ${client_name}) 253773188Sgshapiro From: envelope sender 253873188Sgshapiro To: envelope recipient 253964562Sgshapiro 254064562SgshapiroIf the required item is looked up in a map, it will be tried first 254164562Sgshapirowith the corresponding tag in front, then (as fallback to enable 254290792Sgshapirobackward compatibility) without any tag, unless the specific feature 254390792Sgshapirorequires a tag. For example, 254464562Sgshapiro 254564562Sgshapiro From:spammer@some.dom REJECT 254664562Sgshapiro To:friend.domain RELAY 254764562Sgshapiro Connect:friend.domain OK 254864562Sgshapiro Connect:from.domain RELAY 254964562Sgshapiro From:good@another.dom OK 255064562Sgshapiro From:another.dom REJECT 255164562Sgshapiro 255264562SgshapiroThis would deny mails from spammer@some.dom but you could still 255364562Sgshapirosend mail to that address even if FEATURE(`blacklist_recipients') 255464562Sgshapirois enabled. Your system will allow relaying to friend.domain, but 255564562Sgshapironot from it (unless enabled by other means). Connections from that 255664562Sgshapirodomain will be allowed even if it ends up in one of the DNS based 255764562Sgshapirorejection lists. Relaying is enabled from from.domain but not to 255864562Sgshapiroit (since relaying is based on the connection information for 255964562Sgshapirooutgoing relaying, the tag Connect: must be used; for incoming 256064562Sgshapirorelaying, which is based on the recipient address, To: must be 256164562Sgshapiroused). The last two entries allow mails from good@another.dom but 256264562Sgshapiroreject mail from all other addresses with another.dom as domain 256364562Sgshapiropart. 256464562Sgshapiro 256564562SgshapiroDelay all checks 256690792Sgshapiro---------------- 256764562Sgshapiro 256864562SgshapiroBy using FEATURE(`delay_checks') the rulesets check_mail and check_relay 256964562Sgshapirowill not be called when a client connects or issues a MAIL command, 257064562Sgshapirorespectively. Instead, those rulesets will be called by the check_rcpt 257164562Sgshapiroruleset; they will be skipped if a sender has been authenticated using 257264562Sgshapiroa "trusted" mechanism, i.e., one that is defined via TRUST_AUTH_MECH(). 257364562SgshapiroIf check_mail returns an error then the RCPT TO command will be rejected 257464562Sgshapirowith that error. If it returns some other result starting with $# then 257564562Sgshapirocheck_relay will be skipped. If the sender address (or a part of it) is 257664562Sgshapirolisted in the access map and it has a RHS of OK or RELAY, then check_relay 257764562Sgshapirowill be skipped. This has an interesting side effect: if your domain is 257864562Sgshapiromy.domain and you have 257964562Sgshapiro 258064562Sgshapiro my.domain RELAY 258164562Sgshapiro 258264562Sgshapiroin the access map, then all e-mail with a sender address of 258364562Sgshapiro<user@my.domain> gets through, even if check_relay would reject it 258464562Sgshapiro(e.g., based on the hostname or IP address). This allows spammers 258564562Sgshapiroto get around DNS based blacklist by faking the sender address. To 258664562Sgshapiroavoid this problem you have to use tagged entries: 258764562Sgshapiro 258864562Sgshapiro To:my.domain RELAY 258964562Sgshapiro Connect:my.domain RELAY 259064562Sgshapiro 259164562Sgshapiroif you need those entries at all (class {R} may take care of them). 259273188Sgshapiro 259364562SgshapiroFEATURE(`delay_checks') can take an optional argument: 259464562Sgshapiro 259564562Sgshapiro FEATURE(`delay_checks', `friend') 259664562Sgshapiro enables spamfriend test 259764562Sgshapiro FEATURE(`delay_checks', `hater') 259864562Sgshapiro enables spamhater test 259964562Sgshapiro 260094334SgshapiroIf such an argument is given, the recipient will be looked up in the 260194334Sgshapiroaccess map (using the tag Spam:). If the argument is `friend', then 260294334Sgshapirothe default behavior is to apply the other rulesets and make a SPAM 260394334Sgshapirofriend the exception. The rulesets check_mail and check_relay will be 260494334Sgshapiroskipped only if the recipient address is found and has RHS FRIEND. If 260594334Sgshapirothe argument is `hater', then the default behavior is to skip the rulesets 260694334Sgshapirocheck_mail and check_relay and make a SPAM hater the exception. The 260794334Sgshapiroother two rulesets will be applied only if the recipient address is 260894334Sgshapirofound and has RHS HATER. 260964562Sgshapiro 261064562SgshapiroThis allows for simple exceptions from the tests, e.g., by activating 261190792Sgshapirothe friend option and having 261264562Sgshapiro 261390792Sgshapiro Spam:abuse@ FRIEND 261464562Sgshapiro 2615110560Sgshapiroin the access map, mail to abuse@localdomain will get through (where 2616110560Sgshapiro"localdomain" is any domain in class {w}). It is also possible to 2617110560Sgshapirospecify a full address or an address with +detail: 261864562Sgshapiro 261990792Sgshapiro Spam:abuse@my.domain FRIEND 262090792Sgshapiro Spam:me+abuse@ FRIEND 262190792Sgshapiro Spam:spam.domain FRIEND 262264562Sgshapiro 262390792SgshapiroNote: The required tag has been changed in 8.12 from To: to Spam:. 262490792SgshapiroThis change is incompatible to previous versions. However, you can 262590792Sgshapiro(for now) simply add the new entries to the access map, the old 262690792Sgshapiroones will be ignored. As soon as you removed the old entries from 262790792Sgshapirothe access map, specify a third parameter (`n') to this feature and 262890792Sgshapirothe backward compatibility rules will not be in the generated .cf 262990792Sgshapirofile. 263064562Sgshapiro 263164562SgshapiroHeader Checks 263290792Sgshapiro------------- 263364562Sgshapiro 263438032SpeterYou can also reject mail on the basis of the contents of headers. 263538032SpeterThis is done by adding a ruleset call to the 'H' header definition command 263638032Speterin sendmail.cf. For example, this can be used to check the validity of 263738032Spetera Message-ID: header: 263838032Speter 2639110560Sgshapiro LOCAL_CONFIG 264038032Speter HMessage-Id: $>CheckMessageId 264138032Speter 2642110560Sgshapiro LOCAL_RULESETS 264338032Speter SCheckMessageId 264438032Speter R< $+ @ $+ > $@ OK 264538032Speter R$* $#error $: 553 Header Error 264638032Speter 264764562SgshapiroThe alternative format: 264838032Speter 264964562Sgshapiro HSubject: $>+CheckSubject 265042575Speter 265164562Sgshapirothat is, $>+ instead of $>, gives the full Subject: header including 265264562Sgshapirocomments to the ruleset (comments in parentheses () are stripped 265364562Sgshapiroby default). 265442575Speter 265564562SgshapiroA default ruleset for headers which don't have a specific ruleset 265664562Sgshapirodefined for them can be given by: 265742575Speter 265864562Sgshapiro H*: $>CheckHdr 265943730Speter 266090792SgshapiroNotice: 266190792Sgshapiro1. All rules act on tokens as explained in doc/op/op.{me,ps,txt}. 266273188SgshapiroThat may cause problems with simple header checks due to the 266390792Sgshapirotokenization. It might be simpler to use a regex map and apply it 266473188Sgshapiroto $&{currHeader}. 266590792Sgshapiro2. There are no default rulesets coming with this distribution of 266690792Sgshapirosendmail. You can either write your own or you can search the 266790792SgshapiroWWW for examples, e.g., http://www.digitalanswers.org/check_local/ 266873188Sgshapiro 266964562SgshapiroAfter all of the headers are read, the check_eoh ruleset will be called for 267064562Sgshapiroany final header-related checks. The ruleset is called with the number of 267164562Sgshapiroheaders and the size of all of the headers in bytes separated by $|. One 267264562Sgshapiroexample usage is to reject messages which do not have a Message-Id: 267364562Sgshapiroheader. However, the Message-Id: header is *NOT* a required header and is 267464562Sgshapironot a guaranteed spam indicator. This ruleset is an example and should 267564562Sgshapiroprobably not be used in production. 267664562Sgshapiro 267764562Sgshapiro LOCAL_CONFIG 267864562Sgshapiro Kstorage macro 2679110560Sgshapiro HMessage-Id: $>CheckMessageId 268064562Sgshapiro 268164562Sgshapiro LOCAL_RULESETS 268264562Sgshapiro SCheckMessageId 268364562Sgshapiro # Record the presence of the header 268464562Sgshapiro R$* $: $(storage {MessageIdCheck} $@ OK $) $1 268564562Sgshapiro R< $+ @ $+ > $@ OK 268664562Sgshapiro R$* $#error $: 553 Header Error 268764562Sgshapiro 268864562Sgshapiro Scheck_eoh 268964562Sgshapiro # Check the macro 269064562Sgshapiro R$* $: < $&{MessageIdCheck} > 269164562Sgshapiro # Clear the macro for the next message 269264562Sgshapiro R$* $: $(storage {MessageIdCheck} $) $1 269364562Sgshapiro # Has a Message-Id: header 269464562Sgshapiro R< $+ > $@ OK 269564562Sgshapiro # Allow missing Message-Id: from local mail 269664562Sgshapiro R$* $: < $&{client_name} > 269764562Sgshapiro R< > $@ OK 269864562Sgshapiro R< $=w > $@ OK 269964562Sgshapiro # Otherwise, reject the mail 270064562Sgshapiro R$* $#error $: 553 Header Error 270164562Sgshapiro 270266494Sgshapiro+----------+ 270366494Sgshapiro| STARTTLS | 270466494Sgshapiro+----------+ 270564562Sgshapiro 270664562SgshapiroIn this text, cert will be used as an abreviation for X.509 certificate, 270790792SgshapiroDN (CN) is the distinguished (common) name of a cert, and CA is a 270890792Sgshapirocertification authority, which signs (issues) certs. 270964562Sgshapiro 271080785SgshapiroFor STARTTLS to be offered by sendmail you need to set at least 271180785Sgshapirothis variables (the file names and paths are just examples): 271280785Sgshapiro 271380785Sgshapiro define(`confCACERT_PATH', `/etc/mail/certs/') 271480785Sgshapiro define(`confCACERT', `/etc/mail/certs/CA.cert.pem') 271580785Sgshapiro define(`confSERVER_CERT', `/etc/mail/certs/my.cert.pem') 271680785Sgshapiro define(`confSERVER_KEY', `/etc/mail/certs/my.key.pem') 271780785Sgshapiro 271880785SgshapiroOn systems which do not have the compile flag HASURANDOM set (see 271980785Sgshapirosendmail/README) you also must set confRAND_FILE. 272080785Sgshapiro 272190792SgshapiroSee doc/op/op.{me,ps,txt} for more information about these options, 272290792Sgshapiroespecially the sections ``Certificates for STARTTLS'' and ``PRNG for 272380785SgshapiroSTARTTLS''. 272480785Sgshapiro 272564562SgshapiroMacros related to STARTTLS are: 272664562Sgshapiro 272764562Sgshapiro${cert_issuer} holds the DN of the CA (the cert issuer). 272864562Sgshapiro${cert_subject} holds the DN of the cert (called the cert subject). 272990792Sgshapiro${cn_issuer} holds the CN of the CA (the cert issuer). 273090792Sgshapiro${cn_subject} holds the CN of the cert (called the cert subject). 273164562Sgshapiro${tls_version} the TLS/SSL version used for the connection, e.g., TLSv1, 273290792Sgshapiro TLSv1/SSLv3, SSLv3, SSLv2. 273364562Sgshapiro${cipher} the cipher used for the connection, e.g., EDH-DSS-DES-CBC3-SHA, 273464562Sgshapiro EDH-RSA-DES-CBC-SHA, DES-CBC-MD5, DES-CBC3-SHA. 273564562Sgshapiro${cipher_bits} the keylength (in bits) of the symmetric encryption algorithm 273664562Sgshapiro used for the connection. 273790792Sgshapiro${verify} holds the result of the verification of the presented cert. 273890792Sgshapiro Possible values are: 273990792Sgshapiro OK verification succeeded. 274090792Sgshapiro NO no cert presented. 274190792Sgshapiro NOT no cert requested. 274290792Sgshapiro FAIL cert presented but could not be verified, 274390792Sgshapiro e.g., the cert of the signing CA is missing. 274490792Sgshapiro NONE STARTTLS has not been performed. 274590792Sgshapiro TEMP temporary error occurred. 274690792Sgshapiro PROTOCOL protocol error occurred (SMTP level). 274764562Sgshapiro SOFTWARE STARTTLS handshake failed. 274890792Sgshapiro${server_name} the name of the server of the current outgoing SMTP 274964562Sgshapiro connection. 275090792Sgshapiro${server_addr} the address of the server of the current outgoing SMTP 275164562Sgshapiro connection. 275264562Sgshapiro 275364562SgshapiroRelaying 275490792Sgshapiro-------- 275564562Sgshapiro 275664562Sgshapiro 2757110560SgshapiroSMTP STARTTLS can allow relaying for remote SMTP clients which have 2758110560Sgshapirosuccessfully authenticated themselves. This is done in the ruleset 2759110560SgshapiroRelayAuth. If the verification of the cert failed (${verify} != OK), 2760110560Sgshapirorelaying is subject to the usual rules. Otherwise the DN of the issuer is 2761110560Sgshapirolooked up in the access map using the tag CERTISSUER. If the resulting 2762110560Sgshapirovalue is RELAY, relaying is allowed. If it is SUBJECT, the DN of the cert 2763110560Sgshapirosubject is looked up next in the access map using the tag CERTSUBJECT. If 2764110560Sgshapirothe value is RELAY, relaying is allowed. 2765110560Sgshapiro 276664562Sgshapiro${cert_issuer} and ${cert_subject} can be optionally modified by regular 276764562Sgshapiroexpressions defined in the m4 variables _CERT_REGEX_ISSUER_ and 276890792Sgshapiro_CERT_REGEX_SUBJECT_, respectively. To avoid problems with those macros in 276964562Sgshapirorulesets and map lookups, they are modified as follows: each non-printable 2770110560Sgshapirocharacter and the characters '<', '>', '(', ')', '"', '+', ' ' are replaced 2771110560Sgshapiroby their HEX value with a leading '+'. For example: 277264562Sgshapiro 277364562Sgshapiro/C=US/ST=California/O=endmail.org/OU=private/CN=Darth Mail (Cert)/Email= 277464562Sgshapirodarth+cert@endmail.org 277564562Sgshapiro 277664562Sgshapirois encoded as: 277764562Sgshapiro 277864562Sgshapiro/C=US/ST=California/O=endmail.org/OU=private/CN= 277964562SgshapiroDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 278064562Sgshapiro 278164562Sgshapiro(line breaks have been inserted for readability). 278264562Sgshapiro 2783110560SgshapiroThe macros which are subject to this encoding are ${cert_subject}, 2784110560Sgshapiro${cert_issuer}, ${cn_subject}, and ${cn_issuer}. 2785110560Sgshapiro 278690792SgshapiroExamples: 278790792Sgshapiro 278890792SgshapiroTo allow relaying for everyone who can present a cert signed by 278990792Sgshapiro 279090792Sgshapiro/C=US/ST=California/O=endmail.org/OU=private/CN= 279190792SgshapiroDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 279290792Sgshapiro 279390792Sgshapirosimply use: 279490792Sgshapiro 2795110560SgshapiroCertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= 279690792SgshapiroDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org RELAY 279790792Sgshapiro 279890792SgshapiroTo allow relaying only for a subset of machines that have a cert signed by 279990792Sgshapiro 280090792Sgshapiro/C=US/ST=California/O=endmail.org/OU=private/CN= 280190792SgshapiroDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 280290792Sgshapiro 280390792Sgshapirouse: 280490792Sgshapiro 2805110560SgshapiroCertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= 280690792SgshapiroDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org SUBJECT 2807110560SgshapiroCertSubject:/C=US/ST=California/O=endmail.org/OU=private/CN= 280890792SgshapiroDeathStar/Email=deathstar@endmail.org RELAY 280990792Sgshapiro 281090792SgshapiroNote: line breaks have been inserted after "CN=" for readability, 281190792Sgshapiroeach tagged entry must be one (long) line in the access map. 281290792Sgshapiro 281390792SgshapiroOf course it is also possible to write a simple ruleset that allows 281464562Sgshapirorelaying for everyone who can present a cert that can be verified, e.g., 281564562Sgshapiro 281664562SgshapiroLOCAL_RULESETS 281764562SgshapiroSLocal_check_rcpt 281864562SgshapiroR$* $: $&{verify} 281964562SgshapiroROK $# OK 282064562Sgshapiro 282164562SgshapiroAllowing Connections 282290792Sgshapiro-------------------- 282364562Sgshapiro 282490792SgshapiroThe rulesets tls_server, tls_client, and tls_rcpt are used to decide whether 282590792Sgshapiroan SMTP connection is accepted (or should continue). 282664562Sgshapiro 282764562Sgshapirotls_server is called when sendmail acts as client after a STARTTLS command 282890792Sgshapiro(should) have been issued. The parameter is the value of ${verify}. 282964562Sgshapiro 283064562Sgshapirotls_client is called when sendmail acts as server, after a STARTTLS command 283190792Sgshapirohas been issued, and from check_mail. The parameter is the value of 283264562Sgshapiro${verify} and STARTTLS or MAIL, respectively. 283364562Sgshapiro 283490792SgshapiroBoth rulesets behave the same. If no access map is in use, the connection 283564562Sgshapirowill be accepted unless ${verify} is SOFTWARE, in which case the connection 283690792Sgshapirois always aborted. For tls_server/tls_client, ${client_name}/${server_name} 283790792Sgshapirois looked up in the access map using the tag TLS_Srv/TLS_Clt, which is done 283890792Sgshapirowith the ruleset LookUpDomain. If no entry is found, ${client_addr} 283964562Sgshapiro(${server_addr}) is looked up in the access map (same tag, ruleset 284090792SgshapiroLookUpAddr). If this doesn't result in an entry either, just the tag is 284190792Sgshapirolooked up in the access map (included the trailing colon). Notice: 284290792Sgshapirorequiring that e-mail is sent to a server only encrypted, e.g., via 284364562Sgshapiro 284490792SgshapiroTLS_Srv:secure.domain ENCR:112 284590792Sgshapiro 284690792Sgshapirodoesn't necessarily mean that e-mail sent to that domain is encrypted. 284790792SgshapiroIf the domain has multiple MX servers, e.g., 284890792Sgshapiro 284990792Sgshapirosecure.domain. IN MX 10 mail.secure.domain. 285090792Sgshapirosecure.domain. IN MX 50 mail.other.domain. 285190792Sgshapiro 285290792Sgshapirothen mail to user@secure.domain may go unencrypted to mail.other.domain. 285390792Sgshapirotls_rcpt can be used to address this problem. 285490792Sgshapiro 285590792Sgshapirotls_rcpt is called before a RCPT TO: command is sent. The parameter is the 285690792Sgshapirocurrent recipient. This ruleset is only defined if FEATURE(`access_db') 285790792Sgshapirois selected. A recipient address user@domain is looked up in the access 285890792Sgshapiromap in four formats: TLS_Rcpt:user@domain, TLS_Rcpt:user@, TLS_Rcpt:domain, 285990792Sgshapiroand TLS_Rcpt:; the first match is taken. 286090792Sgshapiro 286190792SgshapiroThe result of the lookups is then used to call the ruleset TLS_connection, 286290792Sgshapirowhich checks the requirement specified by the RHS in the access map against 286390792Sgshapirothe actual parameters of the current TLS connection, esp. ${verify} and 286490792Sgshapiro${cipher_bits}. Legal RHSs in the access map are: 286590792Sgshapiro 286664562SgshapiroVERIFY verification must have succeeded 286764562SgshapiroVERIFY:bits verification must have succeeded and ${cipher_bits} must 286864562Sgshapiro be greater than or equal bits. 286964562SgshapiroENCR:bits ${cipher_bits} must be greater than or equal bits. 287064562Sgshapiro 287164562SgshapiroThe RHS can optionally be prefixed by TEMP+ or PERM+ to select a temporary 287290792Sgshapiroor permanent error. The default is a temporary error code (403 4.7.0) 287364562Sgshapirounless the macro TLS_PERM_ERR is set during generation of the .cf file. 287464562Sgshapiro 287564562SgshapiroIf a certain level of encryption is required, then it might also be 287664562Sgshapiropossible that this level is provided by the security layer from a SASL 287764562Sgshapiroalgorithm, e.g., DIGEST-MD5. 287864562Sgshapiro 287990792SgshapiroFurthermore, there can be a list of extensions added. Such a list 288090792Sgshapirostarts with '+' and the items are separated by '++'. Allowed 288190792Sgshapiroextensions are: 288290792Sgshapiro 288390792SgshapiroCN:name name must match ${cn_subject} 288490792SgshapiroCN ${server_name} must match ${cn_subject} 288590792SgshapiroCS:name name must match ${cert_subject} 288690792SgshapiroCI:name name must match ${cert_issuer} 288790792Sgshapiro 288882017SgshapiroExample: e-mail sent to secure.example.com should only use an encrypted 288990792Sgshapiroconnection. E-mail received from hosts within the laptop.example.com domain 289090792Sgshapiroshould only be accepted if they have been authenticated. The host which 289190792Sgshapiroreceives e-mail for darth@endmail.org must present a cert that uses the 289290792SgshapiroCN smtp.endmail.org. 289390792Sgshapiro 289464562SgshapiroTLS_Srv:secure.example.com ENCR:112 289564562SgshapiroTLS_Clt:laptop.example.com PERM+VERIFY:112 289690792SgshapiroTLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org 289764562Sgshapiro 289873188Sgshapiro 289990792SgshapiroDisabling STARTTLS And Setting SMTP Server Features 290090792Sgshapiro--------------------------------------------------- 290173188Sgshapiro 290290792SgshapiroBy default STARTTLS is used whenever possible. However, there are 290390792Sgshapirosome broken MTAs that don't properly implement STARTTLS. To be able 290490792Sgshapiroto send to (or receive from) those MTAs, the ruleset try_tls 290590792Sgshapiro(srv_features) can be used that work together with the access map. 290690792SgshapiroEntries for the access map must be tagged with Try_TLS (Srv_Features) 290790792Sgshapiroand refer to the hostname or IP address of the connecting system. 290890792SgshapiroA default case can be specified by using just the tag. For example, 290990792Sgshapirothe following entries in the access map: 291073188Sgshapiro 291190792Sgshapiro Try_TLS:broken.server NO 291290792Sgshapiro Srv_Features:my.domain v 291390792Sgshapiro Srv_Features: V 291473188Sgshapiro 291590792Sgshapirowill turn off STARTTLS when sending to broken.server (or any host 291690792Sgshapiroin that domain), and request a client certificate during the TLS 291790792Sgshapirohandshake only for hosts in my.domain. The valid entries on the RHS 291890792Sgshapirofor Srv_Features are listed in the Sendmail Installation and 291990792SgshapiroOperations Guide. 292073188Sgshapiro 292173188Sgshapiro 292264562SgshapiroReceived: Header 292390792Sgshapiro---------------- 292464562Sgshapiro 292590792SgshapiroThe Received: header reveals whether STARTTLS has been used. It contains an 292664562Sgshapiroextra line: 292764562Sgshapiro 292890792Sgshapiro(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify}) 292964562Sgshapiro 293090792Sgshapiro 293166494Sgshapiro+---------------------+ 293266494Sgshapiro| SMTP AUTHENTICATION | 293366494Sgshapiro+---------------------+ 293464562Sgshapiro 293564562SgshapiroThe macros ${auth_authen}, ${auth_author}, and ${auth_type} can be 293664562Sgshapiroused in anti-relay rulesets to allow relaying for those users that 293764562Sgshapiroauthenticated themselves. A very simple example is: 293864562Sgshapiro 293964562SgshapiroSLocal_check_rcpt 294064562SgshapiroR$* $: $&{auth_type} 294164562SgshapiroR$+ $# OK 294264562Sgshapiro 294364562Sgshapirowhich checks whether a user has successfully authenticated using 294464562Sgshapiroany available mechanism. Depending on the setup of the CYRUS SASL 294564562Sgshapirolibrary, more sophisticated rulesets might be required, e.g., 294664562Sgshapiro 294764562SgshapiroSLocal_check_rcpt 294864562SgshapiroR$* $: $&{auth_type} $| $&{auth_authen} 294964562SgshapiroRDIGEST-MD5 $| $+@$=w $# OK 295064562Sgshapiro 295164562Sgshapiroto allow relaying for users that authenticated using DIGEST-MD5 295264562Sgshapiroand have an identity in the local domains. 295364562Sgshapiro 295490792SgshapiroThe ruleset trust_auth is used to determine whether a given AUTH= 295564562Sgshapiroparameter (that is passed to this ruleset) should be trusted. This 295664562Sgshapiroruleset may make use of the other ${auth_*} macros. Only if the 295764562Sgshapiroruleset resolves to the error mailer, the AUTH= parameter is not 295864562Sgshapirotrusted. A user supplied ruleset Local_trust_auth can be written 295964562Sgshapiroto modify the default behavior, which only trust the AUTH= 296064562Sgshapiroparameter if it is identical to the authenticated user. 296164562Sgshapiro 296264562SgshapiroPer default, relaying is allowed for any user who authenticated 296364562Sgshapirovia a "trusted" mechanism, i.e., one that is defined via 296464562SgshapiroTRUST_AUTH_MECH(`list of mechanisms') 296571345SgshapiroFor example: 296671345SgshapiroTRUST_AUTH_MECH(`KERBEROS_V4 DIGEST-MD5') 296764562Sgshapiro 296864562SgshapiroIf the selected mechanism provides a security layer the number of 296964562Sgshapirobits used for the key of the symmetric cipher is stored in the 297064562Sgshapiromacro ${auth_ssf}. 297164562Sgshapiro 297290792SgshapiroIf sendmail acts as client, it needs some information how to 297390792Sgshapiroauthenticate against another MTA. This information can be provided 297490792Sgshapiroby the ruleset authinfo or by the option DefaultAuthInfo. The 297590792Sgshapiroauthinfo ruleset looks up {server_name} using the tag AuthInfo: in 297690792Sgshapirothe access map. If no entry is found, {server_addr} is looked up 297790792Sgshapiroin the same way and finally just the tag AuthInfo: to provide 297890792Sgshapirodefault values. 297990792Sgshapiro 298090792SgshapiroNotice: the default configuration file causes the option DefaultAuthInfo 298190792Sgshapiroto fail since the ruleset authinfo is in the .cf file. If you really 298290792Sgshapirowant to use DefaultAuthInfo (it is deprecated) then you have to 298390792Sgshapiroremove the ruleset. 298490792Sgshapiro 298590792SgshapiroThe RHS for an AuthInfo: entry in the access map should consists of a 298690792Sgshapirolist of tokens, each of which has the form: "TDstring" (including 298790792Sgshapirothe quotes). T is a tag which describes the item, D is a delimiter, 298890792Sgshapiroeither ':' for simple text or '=' for a base64 encoded string. 298990792SgshapiroValid values for the tag are: 299090792Sgshapiro 299190792Sgshapiro U user (authorization) id 299290792Sgshapiro I authentication id 299390792Sgshapiro P password 299490792Sgshapiro R realm 299590792Sgshapiro M list of mechanisms delimited by spaces 299690792Sgshapiro 299790792SgshapiroExample entries are: 299890792Sgshapiro 299990792SgshapiroAuthInfo:other.dom "U:user" "I:user" "P:secret" "R:other.dom" "M:DIGEST-MD5" 300090792SgshapiroAuthInfo:more.dom "U:user" "P=c2VjcmV0" 300190792Sgshapiro 300290792SgshapiroUser or authentication id must exist as well as the password. All 300390792Sgshapiroother entries have default values. If one of user or authentication 300490792Sgshapiroid is missing, the existing value is used for the missing item. 300590792SgshapiroIf "R:" is not specified, realm defaults to $j. The list of mechanisms 300690792Sgshapirodefaults to those specified by AuthMechanisms. 300790792Sgshapiro 300890792SgshapiroSince this map contains sensitive information, either the access 300990792Sgshapiromap must be unreadable by everyone but root (or the trusted user) 301090792Sgshapiroor FEATURE(`authinfo') must be used which provides a separate map. 301190792SgshapiroNotice: It is not checked whether the map is actually 301290792Sgshapirogroup/world-unreadable, this is left to the user. 301390792Sgshapiro 301464562Sgshapiro+--------------------------------+ 301538032Speter| ADDING NEW MAILERS OR RULESETS | 301638032Speter+--------------------------------+ 301738032Speter 301838032SpeterSometimes you may need to add entirely new mailers or rulesets. They 301938032Spetershould be introduced with the constructs MAILER_DEFINITIONS and 302038032SpeterLOCAL_RULESETS respectively. For example: 302138032Speter 302238032Speter MAILER_DEFINITIONS 302338032Speter Mmymailer, ... 302438032Speter ... 302538032Speter 302638032Speter LOCAL_RULESETS 302738032Speter Smyruleset 302838032Speter ... 302938032Speter 303090792SgshapiroLocal additions for the rulesets srv_features, try_tls, tls_rcpt, 303190792Sgshapirotls_client, and tls_server can be made using LOCAL_SRV_FEATURES, 303290792SgshapiroLOCAL_TRY_TLS, LOCAL_TLS_RCPT, LOCAL_TLS_CLIENT, and LOCAL_TLS_SERVER, 303390792Sgshapirorespectively. For example, to add a local ruleset that decides 303490792Sgshapirowhether to try STARTTLS in a sendmail client, use: 303538032Speter 303690792Sgshapiro LOCAL_TRY_TLS 303790792Sgshapiro R... 303890792Sgshapiro 303990792SgshapiroNote: you don't need to add a name for the ruleset, it is implicitly 304090792Sgshapirodefined by using the appropriate macro. 304190792Sgshapiro 304290792Sgshapiro 304371345Sgshapiro+-------------------------+ 304471345Sgshapiro| ADDING NEW MAIL FILTERS | 304571345Sgshapiro+-------------------------+ 304664562Sgshapiro 304764562SgshapiroSendmail supports mail filters to filter incoming SMTP messages according 304864562Sgshapiroto the "Sendmail Mail Filter API" documentation. These filters can be 304964562Sgshapiroconfigured in your mc file using the two commands: 305064562Sgshapiro 305164562Sgshapiro MAIL_FILTER(`name', `equates') 305264562Sgshapiro INPUT_MAIL_FILTER(`name', `equates') 305364562Sgshapiro 305464562SgshapiroThe first command, MAIL_FILTER(), simply defines a filter with the given 305564562Sgshapironame and equates. For example: 305664562Sgshapiro 305764562Sgshapiro MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 305864562Sgshapiro 305964562SgshapiroThis creates the equivalent sendmail.cf entry: 306064562Sgshapiro 306164562Sgshapiro Xarchive, S=local:/var/run/archivesock, F=R 306264562Sgshapiro 306364562SgshapiroThe INPUT_MAIL_FILTER() command performs the same actions as MAIL_FILTER 306464562Sgshapirobut also populates the m4 variable `confINPUT_MAIL_FILTERS' with the name 306564562Sgshapiroof the filter such that the filter will actually be called by sendmail. 306664562Sgshapiro 306764562SgshapiroFor example, the two commands: 306864562Sgshapiro 306964562Sgshapiro INPUT_MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 307064562Sgshapiro INPUT_MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T') 307164562Sgshapiro 307264562Sgshapiroare equivalent to the three commands: 307364562Sgshapiro 307464562Sgshapiro MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 307564562Sgshapiro MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T') 307664562Sgshapiro define(`confINPUT_MAIL_FILTERS', `archive, spamcheck') 307764562Sgshapiro 307864562SgshapiroIn general, INPUT_MAIL_FILTER() should be used unless you need to define 307964562Sgshapiromore filters than you want to use for `confINPUT_MAIL_FILTERS'. 308064562Sgshapiro 308164562SgshapiroNote that setting `confINPUT_MAIL_FILTERS' after any INPUT_MAIL_FILTER() 308264562Sgshapirocommands will clear the list created by the prior INPUT_MAIL_FILTER() 308364562Sgshapirocommands. 308464562Sgshapiro 308564562Sgshapiro 308690792Sgshapiro+-------------------------+ 308790792Sgshapiro| QUEUE GROUP DEFINITIONS | 308890792Sgshapiro+-------------------------+ 308990792Sgshapiro 309090792SgshapiroIn addition to the queue directory (which is the default queue group 309190792Sgshapirocalled "mqueue"), sendmail can deal with multiple queue groups, which 309290792Sgshapiroare collections of queue directories with the same behaviour. Queue 309390792Sgshapirogroups can be defined using the command: 309490792Sgshapiro 309590792Sgshapiro QUEUE_GROUP(`name', `equates') 309690792Sgshapiro 309790792SgshapiroFor details about queue groups, please see doc/op/op.{me,ps,txt}. 309890792Sgshapiro 309938032Speter+-------------------------------+ 310038032Speter| NON-SMTP BASED CONFIGURATIONS | 310138032Speter+-------------------------------+ 310238032Speter 310364562SgshapiroThese configuration files are designed primarily for use by 310464562SgshapiroSMTP-based sites. They may not be well tuned for UUCP-only or 310538032SpeterUUCP-primarily nodes (the latter is defined as a small local net 310664562Sgshapiroconnected to the rest of the world via UUCP). However, there is 310764562Sgshapiroone hook to handle some special cases. 310838032Speter 310938032SpeterYou can define a ``smart host'' that understands a richer address syntax 311038032Speterusing: 311138032Speter 311243730Speter define(`SMART_HOST', `mailer:hostname') 311338032Speter 311438032SpeterIn this case, the ``mailer:'' defaults to "relay". Any messages that 311538032Spetercan't be handled using the usual UUCP rules are passed to this host. 311638032Speter 311738032SpeterIf you are on a local SMTP-based net that connects to the outside 311838032Speterworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. 311938032SpeterFor example: 312038032Speter 312164562Sgshapiro define(`SMART_HOST', `uucp-new:uunet') 312238032Speter LOCAL_NET_CONFIG 312338032Speter R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 312438032Speter 312594334SgshapiroThis will cause all names that end in your domain name ($m) to be sent 312694334Sgshapirovia SMTP; anything else will be sent via uucp-new (smart UUCP) to uunet. 312743730SpeterIf you have FEATURE(`nocanonify'), you may need to omit the dots after 312838032Speterthe $m. If you are running a local DNS inside your domain which is 312938032Speternot otherwise connected to the outside world, you probably want to 313038032Speteruse: 313138032Speter 313243730Speter define(`SMART_HOST', `smtp:fire.wall.com') 313338032Speter LOCAL_NET_CONFIG 313438032Speter R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 313538032Speter 313638032SpeterThat is, send directly only to things you found in your DNS lookup; 313738032Speteranything else goes through SMART_HOST. 313838032Speter 313938032SpeterYou may need to turn off the anti-spam rules in order to accept 314043730SpeterUUCP mail with FEATURE(`promiscuous_relay') and 314143730SpeterFEATURE(`accept_unresolvable_domains'). 314238032Speter 314338032Speter 314438032Speter+-----------+ 314538032Speter| WHO AM I? | 314638032Speter+-----------+ 314738032Speter 314838032SpeterNormally, the $j macro is automatically defined to be your fully 314938032Speterqualified domain name (FQDN). Sendmail does this by getting your 315038032Speterhost name using gethostname and then calling gethostbyname on the 315138032Speterresult. For example, in some environments gethostname returns 315238032Speteronly the root of the host name (such as "foo"); gethostbyname is 315338032Spetersupposed to return the FQDN ("foo.bar.com"). In some (fairly rare) 315438032Spetercases, gethostbyname may fail to return the FQDN. In this case 315538032Speteryou MUST define confDOMAIN_NAME to be your fully qualified domain 315638032Spetername. This is usually done using: 315738032Speter 315838032Speter Dmbar.com 315938032Speter define(`confDOMAIN_NAME', `$w.$m')dnl 316038032Speter 316138032Speter 316264562Sgshapiro+-----------------------------------+ 316364562Sgshapiro| ACCEPTING MAIL FOR MULTIPLE NAMES | 316464562Sgshapiro+-----------------------------------+ 316564562Sgshapiro 316664562SgshapiroIf your host is known by several different names, you need to augment 316764562Sgshapiroclass {w}. This is a list of names by which your host is known, and 316864562Sgshapiroanything sent to an address using a host name in this list will be 316964562Sgshapirotreated as local mail. You can do this in two ways: either create the 317064562Sgshapirofile /etc/mail/local-host-names containing a list of your aliases (one per 317164562Sgshapiroline), and use ``FEATURE(`use_cw_file')'' in the .mc file, or add 317264562Sgshapiro``LOCAL_DOMAIN(`alias.host.name')''. Be sure you use the fully-qualified 317364562Sgshapironame of the host, rather than a short name. 317464562Sgshapiro 317564562SgshapiroIf you want to have different address in different domains, take 317664562Sgshapiroa look at the virtusertable feature, which is also explained at 317764562Sgshapirohttp://www.sendmail.org/virtual-hosting.html 317864562Sgshapiro 317964562Sgshapiro 318038032Speter+--------------------+ 318138032Speter| USING MAILERTABLES | 318238032Speter+--------------------+ 318338032Speter 318443730SpeterTo use FEATURE(`mailertable'), you will have to create an external 318538032Speterdatabase containing the routing information for various domains. 318638032SpeterFor example, a mailertable file in text format might be: 318738032Speter 318838032Speter .my.domain xnet:%1.my.domain 318964562Sgshapiro uuhost1.my.domain uucp-new:uuhost1 319038032Speter .bitnet smtp:relay.bit.net 319138032Speter 319264562SgshapiroThis should normally be stored in /etc/mail/mailertable. The actual 319338032Speterdatabase version of the mailertable is built using: 319438032Speter 319564562Sgshapiro makemap hash /etc/mail/mailertable < /etc/mail/mailertable 319638032Speter 319738032SpeterThe semantics are simple. Any LHS entry that does not begin with 319838032Spetera dot matches the full host name indicated. LHS entries beginning 319966494Sgshapirowith a dot match anything ending with that domain name (including 320066494Sgshapirothe leading dot) -- that is, they can be thought of as having a 320166494Sgshapiroleading ".+" regular expression pattern for a non-empty sequence of 320266494Sgshapirocharacters. Matching is done in order of most-to-least qualified 320366494Sgshapiro-- for example, even though ".my.domain" is listed first in the 320466494Sgshapiroabove example, an entry of "uuhost1.my.domain" will match the second 320566494Sgshapiroentry since it is more explicit. Note: e-mail to "user@my.domain" 320666494Sgshapirodoes not match any entry in the above table. You need to have 320766494Sgshapirosomething like: 320838032Speter 320964562Sgshapiro my.domain esmtp:host.my.domain 321064562Sgshapiro 321138032SpeterThe RHS should always be a "mailer:host" pair. The mailer is the 321290792Sgshapiroconfiguration name of a mailer (that is, an M line in the 321338032Spetersendmail.cf file). The "host" will be the hostname passed to 321438032Speterthat mailer. In domain-based matches (that is, those with leading 321538032Speterdots) the "%1" may be used to interpolate the wildcarded part of 321638032Speterthe host name. For example, the first line above sends everything 321738032Speteraddressed to "anything.my.domain" to that same host name, but using 321838032Speterthe (presumably experimental) xnet mailer. 321938032Speter 322038032SpeterIn some cases you may want to temporarily turn off MX records, 322138032Speterparticularly on gateways. For example, you may want to MX 322238032Spetereverything in a domain to one machine that then forwards it 322338032Speterdirectly. To do this, you might use the DNS configuration: 322438032Speter 322538032Speter *.domain. IN MX 0 relay.machine 322638032Speter 322738032Speterand on relay.machine use the mailertable: 322838032Speter 322938032Speter .domain smtp:[gateway.domain] 323038032Speter 323138032SpeterThe [square brackets] turn off MX records for this host only. 323238032SpeterIf you didn't do this, the mailertable would use the MX record 323338032Speteragain, which would give you an MX loop. 323438032Speter 323538032Speter 323638032Speter+--------------------------------+ 323738032Speter| USING USERDB TO MAP FULL NAMES | 323838032Speter+--------------------------------+ 323938032Speter 324038032SpeterThe user database was not originally intended for mapping full names 324138032Speterto login names (e.g., Eric.Allman => eric), but some people are using 324264562Sgshapiroit that way. (it is recommended that you set up aliases for this 324338032Speterpurpose instead -- since you can specify multiple alias files, this 324438032Speteris fairly easy.) The intent was to locate the default maildrop at 324538032Spetera site, but allow you to override this by sending to a specific host. 324638032Speter 324738032SpeterIf you decide to set up the user database in this fashion, it is 324843730Speterimperative that you not use FEATURE(`stickyhost') -- otherwise, 324938032Spetere-mail sent to Full.Name@local.host.name will be rejected. 325038032Speter 325138032SpeterTo build the internal form of the user database, use: 325238032Speter 325364562Sgshapiro makemap btree /etc/mail/userdb < /etc/mail/userdb.txt 325438032Speter 325564562SgshapiroAs a general rule, it is an extremely bad idea to using full names 325664562Sgshapiroas e-mail addresses, since they are not in any sense unique. For 325766494Sgshapiroexample, the UNIX software-development community has at least two 325864562Sgshapirowell-known Peter Deutsches, and at one time Bell Labs had two 325964562SgshapiroStephen R. Bournes with offices along the same hallway. Which one 326064562Sgshapirowill be forced to suffer the indignity of being Stephen_R_Bourne_2? 326164562SgshapiroThe less famous of the two, or the one that was hired later? 326238032Speter 326338032SpeterFinger should handle full names (and be fuzzy). Mail should use 326464562Sgshapirohandles, and not be fuzzy. 326538032Speter 326638032Speter 326738032Speter+--------------------------------+ 326838032Speter| MISCELLANEOUS SPECIAL FEATURES | 326938032Speter+--------------------------------+ 327038032Speter 327138032SpeterPlussed users 327238032Speter Sometimes it is convenient to merge configuration on a 327338032Speter centralized mail machine, for example, to forward all 327438032Speter root mail to a mail server. In this case it might be 327538032Speter useful to be able to treat the root addresses as a class 327638032Speter of addresses with subtle differences. You can do this 327738032Speter using plussed users. For example, a client might include 327838032Speter the alias: 327938032Speter 328038032Speter root: root+client1@server 328138032Speter 328238032Speter On the server, this will match an alias for "root+client1". 328338032Speter If that is not found, the alias "root+*" will be tried, 328438032Speter then "root". 328538032Speter 328638032Speter 328738032Speter+----------------+ 328838032Speter| SECURITY NOTES | 328938032Speter+----------------+ 329038032Speter 329138032SpeterA lot of sendmail security comes down to you. Sendmail 8 is much 329238032Spetermore careful about checking for security problems than previous 329338032Speterversions, but there are some things that you still need to watch 329438032Speterfor. In particular: 329538032Speter 329698121Sgshapiro* Make sure the aliases file is not writable except by trusted 329738032Speter system personnel. This includes both the text and database 329838032Speter version. 329938032Speter 330038032Speter* Make sure that other files that sendmail reads, such as the 330138032Speter mailertable, are only writable by trusted system personnel. 330238032Speter 330338032Speter* The queue directory should not be world writable PARTICULARLY 330438032Speter if your system allows "file giveaways" (that is, if a non-root 330538032Speter user can chown any file they own to any other user). 330638032Speter 330738032Speter* If your system allows file giveaways, DO NOT create a publically 330838032Speter writable directory for forward files. This will allow anyone 330938032Speter to steal anyone else's e-mail. Instead, create a script that 331038032Speter copies the .forward file from users' home directories once a 331138032Speter night (if you want the non-NFS-mounted forward directory). 331238032Speter 331338032Speter* If your system allows file giveaways, you'll find that 331438032Speter sendmail is much less trusting of :include: files -- in 331538032Speter particular, you'll have to have /SENDMAIL/ANY/SHELL/ in 331638032Speter /etc/shells before they will be trusted (that is, before 331738032Speter files and programs listed in them will be honored). 331838032Speter 331938032SpeterIn general, file giveaways are a mistake -- if you can turn them 332064562Sgshapirooff, do so. 332138032Speter 332238032Speter 332338032Speter+--------------------------------+ 332438032Speter| TWEAKING CONFIGURATION OPTIONS | 332538032Speter+--------------------------------+ 332638032Speter 332738032SpeterThere are a large number of configuration options that don't normally 332838032Speterneed to be changed. However, if you feel you need to tweak them, you 332938032Spetercan define the following M4 variables. This list is shown in four 333038032Spetercolumns: the name you define, the default value for that definition, 333138032Speterthe option or macro that is affected (either Ox for an option or Dx 333238032Speterfor a macro), and a brief description. Greater detail of the semantics 333338032Spetercan be found in the Installation and Operations Guide. 333438032Speter 333538032SpeterSome options are likely to be deprecated in future versions -- that is, 333638032Speterthe option is only included to provide back-compatibility. These are 333738032Spetermarked with "*". 333838032Speter 333938032SpeterRemember that these options are M4 variables, and hence may need to 334038032Speterbe quoted. In particular, arguments with commas will usually have to 334138032Speterbe ``double quoted, like this phrase'' to avoid having the comma 334238032Speterconfuse things. This is common for alias file definitions and for 334338032Speterthe read timeout. 334438032Speter 334538032SpeterM4 Variable Name Configuration Description & [Default] 334638032Speter================ ============= ======================= 334738032SpeterconfMAILER_NAME $n macro [MAILER-DAEMON] The sender name used 334838032Speter for internally generated outgoing 334938032Speter messages. 335038032SpeterconfDOMAIN_NAME $j macro If defined, sets $j. This should 335138032Speter only be done if your system cannot 335238032Speter determine your local domain name, 335338032Speter and then it should be set to 335438032Speter $w.Foo.COM, where Foo.COM is your 335538032Speter domain name. 335638032SpeterconfCF_VERSION $Z macro If defined, this is appended to the 335738032Speter configuration version name. 335890792SgshapiroconfLDAP_CLUSTER ${sendmailMTACluster} macro 335990792Sgshapiro If defined, this is the LDAP 336090792Sgshapiro cluster to use for LDAP searches 336190792Sgshapiro as described above in ``USING LDAP 336290792Sgshapiro FOR ALIASES, MAPS, AND CLASSES''. 336364562SgshapiroconfFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an 336438032Speter internally generated From: address. 336538032SpeterconfRECEIVED_HEADER Received: 336638032Speter [$?sfrom $s $.$?_($?s$|from $.$_) 336764562Sgshapiro $.$?{auth_type}(authenticated) 336838032Speter $.by $j ($v/$Z)$?r with $r$. id $i$?u 336938032Speter for $u; $|; 337038032Speter $.$b] 337138032Speter The format of the Received: header 337238032Speter in messages passed through this host. 337338032Speter It is unwise to try to change this. 337464562SgshapiroconfCW_FILE Fw class [/etc/mail/local-host-names] Name 337564562Sgshapiro of file used to get the local 337664562Sgshapiro additions to class {w} (local host 337764562Sgshapiro names). 337864562SgshapiroconfCT_FILE Ft class [/etc/mail/trusted-users] Name of 337964562Sgshapiro file used to get the local additions 338064562Sgshapiro to class {t} (trusted users). 338138032SpeterconfCR_FILE FR class [/etc/mail/relay-domains] Name of 338238032Speter file used to get the local additions 338364562Sgshapiro to class {R} (hosts allowed to relay). 338438032SpeterconfTRUSTED_USERS Ct class [no default] Names of users to add to 338538032Speter the list of trusted users. This list 338638032Speter always includes root, uucp, and daemon. 338743730Speter See also FEATURE(`use_ct_file'). 338864562SgshapiroconfTRUSTED_USER TrustedUser [no default] Trusted user for file 338964562Sgshapiro ownership and starting the daemon. 339064562Sgshapiro Not to be confused with 339164562Sgshapiro confTRUSTED_USERS (see above). 339238032SpeterconfSMTP_MAILER - [esmtp] The mailer name used when 339338032Speter SMTP connectivity is required. 339464562Sgshapiro One of "smtp", "smtp8", 339564562Sgshapiro "esmtp", or "dsmtp". 339638032SpeterconfUUCP_MAILER - [uucp-old] The mailer to be used by 339738032Speter default for bang-format recipient 339838032Speter addresses. See also discussion of 339964562Sgshapiro class {U}, class {Y}, and class {Z} 340064562Sgshapiro in the MAILER(`uucp') section. 340138032SpeterconfLOCAL_MAILER - [local] The mailer name used when 340238032Speter local connectivity is required. 340338032Speter Almost always "local". 340438032SpeterconfRELAY_MAILER - [relay] The default mailer name used 340538032Speter for relaying any mail (e.g., to a 340638032Speter BITNET_RELAY, a SMART_HOST, or 340738032Speter whatever). This can reasonably be 340838032Speter "uucp-new" if you are on a 340938032Speter UUCP-connected site. 341038032SpeterconfSEVEN_BIT_INPUT SevenBitInput [False] Force input to seven bits? 341138032SpeterconfEIGHT_BIT_HANDLING EightBitMode [pass8] 8-bit data handling 341238032SpeterconfALIAS_WAIT AliasWait [10m] Time to wait for alias file 341338032Speter rebuild until you get bored and 341438032Speter decide that the apparently pending 341538032Speter rebuild failed. 341638032SpeterconfMIN_FREE_BLOCKS MinFreeBlocks [100] Minimum number of free blocks on 341738032Speter queue filesystem to accept SMTP mail. 341838032Speter (Prior to 8.7 this was minfree/maxsize, 341938032Speter where minfree was the number of free 342038032Speter blocks and maxsize was the maximum 342138032Speter message size. Use confMAX_MESSAGE_SIZE 342238032Speter for the second value now.) 342338032SpeterconfMAX_MESSAGE_SIZE MaxMessageSize [infinite] The maximum size of messages 342438032Speter that will be accepted (in bytes). 342538032SpeterconfBLANK_SUB BlankSub [.] Blank (space) substitution 342638032Speter character. 342738032SpeterconfCON_EXPENSIVE HoldExpensive [False] Avoid connecting immediately 342864562Sgshapiro to mailers marked expensive. 342938032SpeterconfCHECKPOINT_INTERVAL CheckpointInterval 343038032Speter [10] Checkpoint queue files every N 343138032Speter recipients. 343238032SpeterconfDELIVERY_MODE DeliveryMode [background] Default delivery mode. 343338032SpeterconfERROR_MODE ErrorMode [print] Error message mode. 343438032SpeterconfERROR_MESSAGE ErrorHeader [undefined] Error message header/file. 343542575SpeterconfSAVE_FROM_LINES SaveFromLine Save extra leading From_ lines. 343638032SpeterconfTEMP_FILE_MODE TempFileMode [0600] Temporary file mode. 343738032SpeterconfMATCH_GECOS MatchGECOS [False] Match GECOS field. 343838032SpeterconfMAX_HOP MaxHopCount [25] Maximum hop count. 343964562SgshapiroconfIGNORE_DOTS* IgnoreDots [False; always False in -bs or -bd 344064562Sgshapiro mode] Ignore dot as terminator for 344164562Sgshapiro incoming messages? 344238032SpeterconfBIND_OPTS ResolverOptions [undefined] Default options for DNS 344338032Speter resolver. 344438032SpeterconfMIME_FORMAT_ERRORS* SendMimeErrors [True] Send error messages as MIME- 344538032Speter encapsulated messages per RFC 1344. 344638032SpeterconfFORWARD_PATH ForwardPath [$z/.forward.$w:$z/.forward] 344738032Speter The colon-separated list of places to 344838032Speter search for .forward files. N.B.: see 344938032Speter the Security Notes section. 345038032SpeterconfMCI_CACHE_SIZE ConnectionCacheSize 345138032Speter [2] Size of open connection cache. 345238032SpeterconfMCI_CACHE_TIMEOUT ConnectionCacheTimeout 345338032Speter [5m] Open connection cache timeout. 345438032SpeterconfHOST_STATUS_DIRECTORY HostStatusDirectory 345538032Speter [undefined] If set, host status is kept 345638032Speter on disk between sendmail runs in the 345738032Speter named directory tree. This need not be 345838032Speter a full pathname, in which case it is 345938032Speter interpreted relative to the queue 346038032Speter directory. 346138032SpeterconfSINGLE_THREAD_DELIVERY SingleThreadDelivery 346238032Speter [False] If this option and the 346338032Speter HostStatusDirectory option are both 346438032Speter set, single thread deliveries to other 346538032Speter hosts. That is, don't allow any two 346638032Speter sendmails on this host to connect 346738032Speter simultaneously to any other single 346838032Speter host. This can slow down delivery in 346938032Speter some cases, in particular since a 347038032Speter cached but otherwise idle connection 347138032Speter to a host will prevent other sendmails 347238032Speter from connecting to the other host. 347364562SgshapiroconfUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to 347438032Speter deliver error messages. This should 347538032Speter not be necessary because of general 347638032Speter acceptance of the envelope/header 347738032Speter distinction. 347838032SpeterconfLOG_LEVEL LogLevel [9] Log level. 347964562SgshapiroconfME_TOO MeToo [True] Include sender in group 348064562Sgshapiro expansions. This option is 348164562Sgshapiro deprecated and will be removed from 348264562Sgshapiro a future version. 348338032SpeterconfCHECK_ALIASES CheckAliases [False] Check RHS of aliases when 348438032Speter running newaliases. Since this does 348538032Speter DNS lookups on every address, it can 348638032Speter slow down the alias rebuild process 348738032Speter considerably on large alias files. 348838032SpeterconfOLD_STYLE_HEADERS* OldStyleHeaders [True] Assume that headers without 348938032Speter special chars are old style. 349038032SpeterconfPRIVACY_FLAGS PrivacyOptions [authwarnings] Privacy flags. 349138032SpeterconfCOPY_ERRORS_TO PostmasterCopy [undefined] Address for additional 349238032Speter copies of all error messages. 349338032SpeterconfQUEUE_FACTOR QueueFactor [600000] Slope of queue-only function. 349490792SgshapiroconfQUEUE_FILE_MODE QueueFileMode [undefined] Default permissions for 349590792Sgshapiro queue files (octal). If not set, 349690792Sgshapiro sendmail uses 0600 unless its real 349790792Sgshapiro and effective uid are different in 349890792Sgshapiro which case it uses 0644. 349938032SpeterconfDONT_PRUNE_ROUTES DontPruneRoutes [False] Don't prune down route-addr 350038032Speter syntax addresses to the minimum 350138032Speter possible. 350238032SpeterconfSAFE_QUEUE* SuperSafe [True] Commit all messages to disk 350338032Speter before forking. 350438032SpeterconfTO_INITIAL Timeout.initial [5m] The timeout waiting for a response 350538032Speter on the initial connect. 350638032SpeterconfTO_CONNECT Timeout.connect [0] The timeout waiting for an initial 350738032Speter connect() to complete. This can only 350838032Speter shorten connection timeouts; the kernel 350938032Speter silently enforces an absolute maximum 351038032Speter (which varies depending on the system). 351138032SpeterconfTO_ICONNECT Timeout.iconnect 351238032Speter [undefined] Like Timeout.connect, but 351338032Speter applies only to the very first attempt 351438032Speter to connect to a host in a message. 351538032Speter This allows a single very fast pass 351638032Speter followed by more careful delivery 351738032Speter attempts in the future. 351890792SgshapiroconfTO_ACONNECT Timeout.aconnect 351990792Sgshapiro [0] The overall timeout waiting for 352090792Sgshapiro all connection for a single delivery 352190792Sgshapiro attempt to succeed. If 0, no overall 352290792Sgshapiro limit is applied. 352338032SpeterconfTO_HELO Timeout.helo [5m] The timeout waiting for a response 352438032Speter to a HELO or EHLO command. 352538032SpeterconfTO_MAIL Timeout.mail [10m] The timeout waiting for a 352638032Speter response to the MAIL command. 352738032SpeterconfTO_RCPT Timeout.rcpt [1h] The timeout waiting for a response 352838032Speter to the RCPT command. 352938032SpeterconfTO_DATAINIT Timeout.datainit 353038032Speter [5m] The timeout waiting for a 354 353138032Speter response from the DATA command. 353238032SpeterconfTO_DATABLOCK Timeout.datablock 353338032Speter [1h] The timeout waiting for a block 353438032Speter during DATA phase. 353538032SpeterconfTO_DATAFINAL Timeout.datafinal 353638032Speter [1h] The timeout waiting for a response 353738032Speter to the final "." that terminates a 353838032Speter message. 353938032SpeterconfTO_RSET Timeout.rset [5m] The timeout waiting for a response 354038032Speter to the RSET command. 354138032SpeterconfTO_QUIT Timeout.quit [2m] The timeout waiting for a response 354238032Speter to the QUIT command. 354338032SpeterconfTO_MISC Timeout.misc [2m] The timeout waiting for a response 354438032Speter to other SMTP commands. 354564562SgshapiroconfTO_COMMAND Timeout.command [1h] In server SMTP, the timeout 354664562Sgshapiro waiting for a command to be issued. 354764562SgshapiroconfTO_IDENT Timeout.ident [5s] The timeout waiting for a 354864562Sgshapiro response to an IDENT query. 354938032SpeterconfTO_FILEOPEN Timeout.fileopen 355038032Speter [60s] The timeout waiting for a file 355138032Speter (e.g., :include: file) to be opened. 355290792SgshapiroconfTO_LHLO Timeout.lhlo [2m] The timeout waiting for a response 355390792Sgshapiro to an LMTP LHLO command. 355490792SgshapiroconfTO_AUTH Timeout.auth [10m] The timeout waiting for a 355590792Sgshapiro response in an AUTH dialogue. 355690792SgshapiroconfTO_STARTTLS Timeout.starttls 355790792Sgshapiro [1h] The timeout waiting for a 355890792Sgshapiro response to an SMTP STARTTLS command. 355964562SgshapiroconfTO_CONTROL Timeout.control 356064562Sgshapiro [2m] The timeout for a complete 356164562Sgshapiro control socket transaction to complete. 356238032SpeterconfTO_QUEUERETURN Timeout.queuereturn 356338032Speter [5d] The timeout before a message is 356438032Speter returned as undeliverable. 356538032SpeterconfTO_QUEUERETURN_NORMAL 356638032Speter Timeout.queuereturn.normal 356738032Speter [undefined] As above, for normal 356838032Speter priority messages. 356938032SpeterconfTO_QUEUERETURN_URGENT 357038032Speter Timeout.queuereturn.urgent 357138032Speter [undefined] As above, for urgent 357238032Speter priority messages. 357338032SpeterconfTO_QUEUERETURN_NONURGENT 357438032Speter Timeout.queuereturn.non-urgent 357538032Speter [undefined] As above, for non-urgent 357638032Speter (low) priority messages. 357738032SpeterconfTO_QUEUEWARN Timeout.queuewarn 357838032Speter [4h] The timeout before a warning 357938032Speter message is sent to the sender telling 358064562Sgshapiro them that the message has been 358164562Sgshapiro deferred. 358238032SpeterconfTO_QUEUEWARN_NORMAL Timeout.queuewarn.normal 358338032Speter [undefined] As above, for normal 358438032Speter priority messages. 358538032SpeterconfTO_QUEUEWARN_URGENT Timeout.queuewarn.urgent 358638032Speter [undefined] As above, for urgent 358738032Speter priority messages. 358838032SpeterconfTO_QUEUEWARN_NONURGENT 358938032Speter Timeout.queuewarn.non-urgent 359038032Speter [undefined] As above, for non-urgent 359138032Speter (low) priority messages. 359238032SpeterconfTO_HOSTSTATUS Timeout.hoststatus 359338032Speter [30m] How long information about host 359438032Speter statuses will be maintained before it 359538032Speter is considered stale and the host should 359638032Speter be retried. This applies both within 359738032Speter a single queue run and to persistent 359838032Speter information (see below). 359964562SgshapiroconfTO_RESOLVER_RETRANS Timeout.resolver.retrans 360064562Sgshapiro [varies] Sets the resolver's 360198121Sgshapiro retransmission time interval (in 360264562Sgshapiro seconds). Sets both 360364562Sgshapiro Timeout.resolver.retrans.first and 360464562Sgshapiro Timeout.resolver.retrans.normal. 360564562SgshapiroconfTO_RESOLVER_RETRANS_FIRST Timeout.resolver.retrans.first 360664562Sgshapiro [varies] Sets the resolver's 360798121Sgshapiro retransmission time interval (in 360864562Sgshapiro seconds) for the first attempt to 360964562Sgshapiro deliver a message. 361064562SgshapiroconfTO_RESOLVER_RETRANS_NORMAL Timeout.resolver.retrans.normal 361164562Sgshapiro [varies] Sets the resolver's 361298121Sgshapiro retransmission time interval (in 361364562Sgshapiro seconds) for all resolver lookups 361464562Sgshapiro except the first delivery attempt. 361564562SgshapiroconfTO_RESOLVER_RETRY Timeout.resolver.retry 361664562Sgshapiro [varies] Sets the number of times 361764562Sgshapiro to retransmit a resolver query. 361864562Sgshapiro Sets both 361964562Sgshapiro Timeout.resolver.retry.first and 362064562Sgshapiro Timeout.resolver.retry.normal. 362164562SgshapiroconfTO_RESOLVER_RETRY_FIRST Timeout.resolver.retry.first 362264562Sgshapiro [varies] Sets the number of times 362364562Sgshapiro to retransmit a resolver query for 362464562Sgshapiro the first attempt to deliver a 362564562Sgshapiro message. 362664562SgshapiroconfTO_RESOLVER_RETRY_NORMAL Timeout.resolver.retry.normal 362764562Sgshapiro [varies] Sets the number of times 362864562Sgshapiro to retransmit a resolver query for 362964562Sgshapiro all resolver lookups except the 363064562Sgshapiro first delivery attempt. 363138032SpeterconfTIME_ZONE TimeZoneSpec [USE_SYSTEM] Time zone info -- can be 363238032Speter USE_SYSTEM to use the system's idea, 363338032Speter USE_TZ to use the user's TZ envariable, 363438032Speter or something else to force that value. 363538032SpeterconfDEF_USER_ID DefaultUser [1:1] Default user id. 363638032SpeterconfUSERDB_SPEC UserDatabaseSpec 363764562Sgshapiro [undefined] User database 363864562Sgshapiro specification. 363938032SpeterconfFALLBACK_MX FallbackMXhost [undefined] Fallback MX host. 364064562SgshapiroconfTRY_NULL_MX_LIST TryNullMXList [False] If this host is the best MX 364164562Sgshapiro for a host and other arrangements 364264562Sgshapiro haven't been made, try connecting 364364562Sgshapiro to the host directly; normally this 364464562Sgshapiro would be a config error. 364564562SgshapiroconfQUEUE_LA QueueLA [varies] Load average at which 364664562Sgshapiro queue-only function kicks in. 364764562Sgshapiro Default values is (8 * numproc) 364864562Sgshapiro where numproc is the number of 364964562Sgshapiro processors online (if that can be 365064562Sgshapiro determined). 365164562SgshapiroconfREFUSE_LA RefuseLA [varies] Load average at which 365264562Sgshapiro incoming SMTP connections are 365364562Sgshapiro refused. Default values is (12 * 365464562Sgshapiro numproc) where numproc is the 365564562Sgshapiro number of processors online (if 365664562Sgshapiro that can be determined). 365790792SgshapiroconfDELAY_LA DelayLA [0] Load average at which sendmail 365890792Sgshapiro will sleep for one second on most 365990792Sgshapiro SMTP commands and before accepting 366090792Sgshapiro connections. 0 means no limit. 366164562SgshapiroconfMAX_ALIAS_RECURSION MaxAliasRecursion 366264562Sgshapiro [10] Maximum depth of alias recursion. 366338032SpeterconfMAX_DAEMON_CHILDREN MaxDaemonChildren 366438032Speter [undefined] The maximum number of 366538032Speter children the daemon will permit. After 366638032Speter this number, connections will be 366738032Speter rejected. If not set or <= 0, there is 366838032Speter no limit. 366964562SgshapiroconfMAX_HEADERS_LENGTH MaxHeadersLength 367071345Sgshapiro [32768] Maximum length of the sum 367164562Sgshapiro of all headers. 367264562SgshapiroconfMAX_MIME_HEADER_LENGTH MaxMimeHeaderLength 367364562Sgshapiro [undefined] Maximum length of 367464562Sgshapiro certain MIME header field values. 367538032SpeterconfCONNECTION_RATE_THROTTLE ConnectionRateThrottle 367638032Speter [undefined] The maximum number of 367790792Sgshapiro connections permitted per second per 367890792Sgshapiro daemon. After this many connections 367990792Sgshapiro are accepted, further connections 368090792Sgshapiro will be delayed. If not set or <= 0, 368190792Sgshapiro there is no limit. 368238032SpeterconfWORK_RECIPIENT_FACTOR 368338032Speter RecipientFactor [30000] Cost of each recipient. 368464562SgshapiroconfSEPARATE_PROC ForkEachJob [False] Run all deliveries in a 368564562Sgshapiro separate process. 368638032SpeterconfWORK_CLASS_FACTOR ClassFactor [1800] Priority multiplier for class. 368738032SpeterconfWORK_TIME_FACTOR RetryFactor [90000] Cost of each delivery attempt. 368838032SpeterconfQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: 368990792Sgshapiro Priority, Host, Filename, Random, 369090792Sgshapiro Modification, or Time. 369138032SpeterconfMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job 369238032Speter must sit in the queue between queue 369338032Speter runs. This allows you to set the 369438032Speter queue run interval low for better 369538032Speter responsiveness without trying all 369638032Speter jobs in each run. 369738032SpeterconfDEF_CHAR_SET DefaultCharSet [unknown-8bit] When converting 369838032Speter unlabeled 8 bit input to MIME, the 369938032Speter character set to use by default. 370038032SpeterconfSERVICE_SWITCH_FILE ServiceSwitchFile 370164562Sgshapiro [/etc/mail/service.switch] The file 370264562Sgshapiro to use for the service switch on 370364562Sgshapiro systems that do not have a 370464562Sgshapiro system-defined switch. 370538032SpeterconfHOSTS_FILE HostsFile [/etc/hosts] The file to use when doing 370638032Speter "file" type access of hosts names. 370738032SpeterconfDIAL_DELAY DialDelay [0s] If a connection fails, wait this 370838032Speter long and try again. Zero means "don't 370938032Speter retry". This is to allow "dial on 371038032Speter demand" connections to have enough time 371138032Speter to complete a connection. 371238032SpeterconfNO_RCPT_ACTION NoRecipientAction 371338032Speter [none] What to do if there are no legal 371438032Speter recipient fields (To:, Cc: or Bcc:) 371538032Speter in the message. Legal values can 371638032Speter be "none" to just leave the 371738032Speter nonconforming message as is, "add-to" 371838032Speter to add a To: header with all the 371938032Speter known recipients (which may expose 372038032Speter blind recipients), "add-apparently-to" 372138032Speter to do the same but use Apparently-To: 372290792Sgshapiro instead of To: (strongly discouraged 372390792Sgshapiro in accordance with IETF standards), 372490792Sgshapiro "add-bcc" to add an empty Bcc: 372590792Sgshapiro header, or "add-to-undisclosed" to 372690792Sgshapiro add the header 372738032Speter ``To: undisclosed-recipients:;''. 372838032SpeterconfSAFE_FILE_ENV SafeFileEnvironment 372938032Speter [undefined] If set, sendmail will do a 373038032Speter chroot() into this directory before 373138032Speter writing files. 373238032SpeterconfCOLON_OK_IN_ADDR ColonOkInAddr [True unless Configuration Level > 6] 373338032Speter If set, colons are treated as a regular 373438032Speter character in addresses. If not set, 373538032Speter they are treated as the introducer to 373638032Speter the RFC 822 "group" syntax. Colons are 373738032Speter handled properly in route-addrs. This 373838032Speter option defaults on for V5 and lower 373938032Speter configuration files. 374038032SpeterconfMAX_QUEUE_RUN_SIZE MaxQueueRunSize [0] If set, limit the maximum size of 374138032Speter any given queue run to this number of 374238032Speter entries. Essentially, this will stop 374364562Sgshapiro reading each queue directory after this 374438032Speter number of entries are reached; it does 374538032Speter _not_ pick the highest priority jobs, 374638032Speter so this should be as large as your 374738032Speter system can tolerate. If not set, there 374838032Speter is no limit. 374990792SgshapiroconfMAX_QUEUE_CHILDREN MaxQueueChildren 375090792Sgshapiro [undefined] Limits the maximum number 375190792Sgshapiro of concurrent queue runners active. 375290792Sgshapiro This is to keep system resources used 375390792Sgshapiro within a reasonable limit. Relates to 375490792Sgshapiro Queue Groups and ForkAllJobs. 375590792SgshapiroconfMAX_RUNNERS_PER_QUEUE MaxRunnersPerQueue 375690792Sgshapiro [1] Only active when MaxQueueChildren 375790792Sgshapiro defined. Controls the maximum number 375890792Sgshapiro of queue runners (aka queue children) 375990792Sgshapiro active at the same time in a work 376090792Sgshapiro group. See also MaxQueueChildren. 376138032SpeterconfDONT_EXPAND_CNAMES DontExpandCnames 376238032Speter [False] If set, $[ ... $] lookups that 376338032Speter do DNS based lookups do not expand 376438032Speter CNAME records. This currently violates 376538032Speter the published standards, but the IETF 376638032Speter seems to be moving toward legalizing 376738032Speter this. For example, if "FTP.Foo.ORG" 376838032Speter is a CNAME for "Cruft.Foo.ORG", then 376938032Speter with this option set a lookup of 377038032Speter "FTP" will return "FTP.Foo.ORG"; if 377138032Speter clear it returns "Cruft.FOO.ORG". N.B. 377238032Speter you may not see any effect until your 377338032Speter downstream neighbors stop doing CNAME 377438032Speter lookups as well. 377564562SgshapiroconfFROM_LINE UnixFromLine [From $g $d] The From_ line used 377638032Speter when sending to files or programs. 377738032SpeterconfSINGLE_LINE_FROM_HEADER SingleLineFromHeader 377838032Speter [False] From: lines that have 377938032Speter embedded newlines are unwrapped 378038032Speter onto one line. 378138032SpeterconfALLOW_BOGUS_HELO AllowBogusHELO [False] Allow HELO SMTP command that 378238032Speter does not include a host name. 378338032SpeterconfMUST_QUOTE_CHARS MustQuoteChars [.'] Characters to be quoted in a full 378438032Speter name phrase (@,;:\()[] are automatic). 378538032SpeterconfOPERATORS OperatorChars [.:%@!^/[]+] Address operator 378638032Speter characters. 378738032SpeterconfSMTP_LOGIN_MSG SmtpGreetingMessage 378838032Speter [$j Sendmail $v/$Z; $b] 378938032Speter The initial (spontaneous) SMTP 379038032Speter greeting message. The word "ESMTP" 379138032Speter will be inserted between the first and 379238032Speter second words to convince other 379338032Speter sendmails to try to speak ESMTP. 379438032SpeterconfDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3) 379538032Speter routine will never be invoked. You 379638032Speter might want to do this if you are 379738032Speter running NIS and you have a large group 379838032Speter map, since this call does a sequential 379938032Speter scan of the map; in a large site this 380038032Speter can cause your ypserv to run 380138032Speter essentially full time. If you set 380238032Speter this, agents run on behalf of users 380338032Speter will only have their primary 380438032Speter (/etc/passwd) group permissions. 380538032SpeterconfUNSAFE_GROUP_WRITES UnsafeGroupWrites 380638032Speter [False] If set, group-writable 380738032Speter :include: and .forward files are 380838032Speter considered "unsafe", that is, programs 380938032Speter and files cannot be directly referenced 381038032Speter from such files. World-writable files 381138032Speter are always considered unsafe. 381264562SgshapiroconfCONNECT_ONLY_TO ConnectOnlyTo [undefined] override connection 381364562Sgshapiro address (for testing). 381464562SgshapiroconfCONTROL_SOCKET_NAME ControlSocketName 381564562Sgshapiro [undefined] Control socket for daemon 381664562Sgshapiro management. 381738032SpeterconfDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress 381838032Speter [postmaster] If an error occurs when 381938032Speter sending an error message, send that 382038032Speter "double bounce" error message to this 382190792Sgshapiro address. If it expands to an empty 382290792Sgshapiro string, double bounces are dropped. 382364562SgshapiroconfDEAD_LETTER_DROP DeadLetterDrop [undefined] Filename to save bounce 382464562Sgshapiro messages which could not be returned 382564562Sgshapiro to the user or sent to postmaster. 382664562Sgshapiro If not set, the queue file will 382764562Sgshapiro be renamed. 382864562SgshapiroconfRRT_IMPLIES_DSN RrtImpliesDsn [False] Return-Receipt-To: header 382964562Sgshapiro implies DSN request. 383038032SpeterconfRUN_AS_USER RunAsUser [undefined] If set, become this user 383138032Speter when reading and delivering mail. 383238032Speter Causes all file reads (e.g., .forward 383338032Speter and :include: files) to be done as 383438032Speter this user. Also, all programs will 383538032Speter be run as this user, and all output 383638032Speter files will be written as this user. 383738032Speter Intended for use only on firewalls 383838032Speter where users do not have accounts. 383938032SpeterconfMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage 384038032Speter [infinite] If set, allow no more than 384138032Speter the specified number of recipients in 384238032Speter an SMTP envelope. Further recipients 384338032Speter receive a 452 error code (i.e., they 384438032Speter are deferred for the next delivery 384538032Speter attempt). 384690792SgshapiroconfBAD_RCPT_THROTTLE BadRcptThrottle [infinite] If set and more than the 384790792Sgshapiro specified number of recipients in an 384890792Sgshapiro envelope are rejected, sleep for one 384990792Sgshapiro second after each rejected RCPT 385090792Sgshapiro command. 385138032SpeterconfDONT_PROBE_INTERFACES DontProbeInterfaces 385238032Speter [False] If set, sendmail will _not_ 385338032Speter insert the names and addresses of any 385464562Sgshapiro local interfaces into class {w} 385538032Speter (list of known "equivalent" addresses). 385638032Speter If you set this, you must also include 385738032Speter some support for these addresses (e.g., 385838032Speter in a mailertable entry) -- otherwise, 385938032Speter mail to addresses in this list will 386038032Speter bounce with a configuration error. 386190792Sgshapiro If set to "loopback" (without 386290792Sgshapiro quotes), sendmail will skip 386390792Sgshapiro loopback interfaces (e.g., "lo0"). 386464562SgshapiroconfPID_FILE PidFile [system dependent] Location of pid 386564562Sgshapiro file. 386664562SgshapiroconfPROCESS_TITLE_PREFIX ProcessTitlePrefix 386764562Sgshapiro [undefined] Prefix string for the 386864562Sgshapiro process title shown on 'ps' listings. 386938032SpeterconfDONT_BLAME_SENDMAIL DontBlameSendmail 387038032Speter [safe] Override sendmail's file 387138032Speter safety checks. This will definitely 387238032Speter compromise system security and should 387338032Speter not be used unless absolutely 387438032Speter necessary. 387538032SpeterconfREJECT_MSG - [550 Access denied] The message 387638032Speter given if the access database contains 387738032Speter REJECT in the value portion. 387890792SgshapiroconfRELAY_MSG - [550 Relaying denied] The message 387990792Sgshapiro given if an unauthorized relaying 388090792Sgshapiro attempt is rejected. 388164562SgshapiroconfDF_BUFFER_SIZE DataFileBufferSize 388264562Sgshapiro [4096] The maximum size of a 388364562Sgshapiro memory-buffered data (df) file 388464562Sgshapiro before a disk-based file is used. 388564562SgshapiroconfXF_BUFFER_SIZE XScriptFileBufferSize 388664562Sgshapiro [4096] The maximum size of a 388764562Sgshapiro memory-buffered transcript (xf) 388864562Sgshapiro file before a disk-based file is 388964562Sgshapiro used. 389064562SgshapiroconfAUTH_MECHANISMS AuthMechanisms [GSSAPI KERBEROS_V4 DIGEST-MD5 389164562Sgshapiro CRAM-MD5] List of authentication 389264562Sgshapiro mechanisms for AUTH (separated by 389364562Sgshapiro spaces). The advertised list of 389464562Sgshapiro authentication mechanisms will be the 389564562Sgshapiro intersection of this list and the list 389664562Sgshapiro of available mechanisms as determined 389764562Sgshapiro by the CYRUS SASL library. 389873188SgshapiroconfDEF_AUTH_INFO DefaultAuthInfo [undefined] Name of file that contains 389964562Sgshapiro authentication information for 390090792Sgshapiro outgoing connections. This file must 390190792Sgshapiro contain the user id, the authorization 390290792Sgshapiro id, the password (plain text), the 390390792Sgshapiro realm to use, and the list of 390490792Sgshapiro mechanisms to try, each on a separate 390590792Sgshapiro line and must be readable by root (or 390690792Sgshapiro the trusted user) only. If no realm 390790792Sgshapiro is specified, $j is used. If no 390890792Sgshapiro mechanisms are given in the file, 390990792Sgshapiro AuthMechanisms is used. Notice: this 391090792Sgshapiro option is deprecated and will be 391190792Sgshapiro removed in future versions; it doesn't 391290792Sgshapiro work for the MSP since it can't read 391390792Sgshapiro the file. Use the authinfo ruleset 391490792Sgshapiro instead. See also the section SMTP 391590792Sgshapiro AUTHENTICATION. 391690792SgshapiroconfAUTH_OPTIONS AuthOptions [undefined] If this option is 'A' 391764562Sgshapiro then the AUTH= parameter for the 391864562Sgshapiro MAIL FROM command is only issued 391964562Sgshapiro when authentication succeeded. 392090792Sgshapiro Other values (which should be listed 392190792Sgshapiro one after the other without any 392290792Sgshapiro intervening characters except for 392390792Sgshapiro space or comma) are a, c, d, f, p, 392490792Sgshapiro and y. See doc/op/op.me for 392590792Sgshapiro details. 392690792SgshapiroconfAUTH_MAX_BITS AuthMaxBits [INT_MAX] Limit the maximum encryption 392790792Sgshapiro strength for the security layer in 392890792Sgshapiro SMTP AUTH (SASL). Default is 392990792Sgshapiro essentially unlimited. 393090792SgshapiroconfTLS_SRV_OPTIONS TLSSrvOptions If this option is 'V' no client 393190792Sgshapiro verification is performed, i.e., 393290792Sgshapiro the server doesn't ask for a 393390792Sgshapiro certificate. 393464562SgshapiroconfLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map 393564562Sgshapiro specification for LDAP maps. The 393664562Sgshapiro value should only contain LDAP 393764562Sgshapiro specific settings such as "-h host 393864562Sgshapiro -p port -d bindDN", etc. The 393964562Sgshapiro settings will be used for all LDAP 394064562Sgshapiro maps unless they are specified in 394164562Sgshapiro the individual map specification 394264562Sgshapiro ('K' command). 3943110560SgshapiroconfCACERT_PATH CACertPath [undefined] Path to directory 394464562Sgshapiro with certs of CAs. 3945110560SgshapiroconfCACERT CACertFile [undefined] File containing one CA 394664562Sgshapiro cert. 394764562SgshapiroconfSERVER_CERT ServerCertFile [undefined] File containing the 394864562Sgshapiro cert of the server, i.e., this cert 394964562Sgshapiro is used when sendmail acts as 395064562Sgshapiro server. 395164562SgshapiroconfSERVER_KEY ServerKeyFile [undefined] File containing the 395264562Sgshapiro private key belonging to the server 395364562Sgshapiro cert. 395464562SgshapiroconfCLIENT_CERT ClientCertFile [undefined] File containing the 395564562Sgshapiro cert of the client, i.e., this cert 395664562Sgshapiro is used when sendmail acts as 395764562Sgshapiro client. 395864562SgshapiroconfCLIENT_KEY ClientKeyFile [undefined] File containing the 395964562Sgshapiro private key belonging to the client 396064562Sgshapiro cert. 396164562SgshapiroconfDH_PARAMETERS DHParameters [undefined] File containing the 396264562Sgshapiro DH parameters. 396364562SgshapiroconfRAND_FILE RandFile [undefined] File containing random 396466494Sgshapiro data (use prefix file:) or the 396566494Sgshapiro name of the UNIX socket if EGD is 396666494Sgshapiro used (use prefix egd:). STARTTLS 396766494Sgshapiro requires this option if the compile 396866494Sgshapiro flag HASURANDOM is not set (see 396964562Sgshapiro sendmail/README). 397090792SgshapiroconfNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of 397190792Sgshapiro queue runners is set the given value 397290792Sgshapiro (nice(3)). 397390792SgshapiroconfDIRECT_SUBMISSION_MODIFIERS DirectSubmissionModifiers 397490792Sgshapiro [undefined] Defines {daemon_flags} 397590792Sgshapiro for direct submissions. 397690792SgshapiroconfUSE_MSP UseMSP [false] Use as mail submission 397790792Sgshapiro program, see sendmail/SECURITY. 397890792SgshapiroconfDELIVER_BY_MIN DeliverByMin [0] Minimum time for Deliver By 397990792Sgshapiro SMTP Service Extension (RFC 2852). 398090792SgshapiroconfSHARED_MEMORY_KEY SharedMemoryKey [0] Key for shared memory. 398190792SgshapiroconfFAST_SPLIT FastSplit [1] If set to a value greater than 398290792Sgshapiro zero, the initial MX lookups on 398390792Sgshapiro addresses is suppressed when they 398490792Sgshapiro are sorted which may result in 398590792Sgshapiro faster envelope splitting. If the 398690792Sgshapiro mail is submitted directly from the 398790792Sgshapiro command line, then the value also 398890792Sgshapiro limits the number of processes to 398990792Sgshapiro deliver the envelopes. 399090792SgshapiroconfMAILBOX_DATABASE MailboxDatabase [pw] Type of lookup to find 399190792Sgshapiro information about local mailboxes. 399290792SgshapiroconfDEQUOTE_OPTS - [empty] Additional options for the 399390792Sgshapiro dequote map. 399490792SgshapiroconfINPUT_MAIL_FILTERS InputMailFilters 399590792Sgshapiro A comma separated list of filters 399690792Sgshapiro which determines which filters and 399790792Sgshapiro the invocation sequence are 399890792Sgshapiro contacted for incoming SMTP 399990792Sgshapiro messages. If none are set, no 400090792Sgshapiro filters will be contacted. 400190792SgshapiroconfMILTER_LOG_LEVEL Milter.LogLevel [9] Log level for input mail filter 400290792Sgshapiro actions, defaults to LogLevel. 400390792SgshapiroconfMILTER_MACROS_CONNECT Milter.macros.connect 4004110560Sgshapiro [j, _, {daemon_name}, {if_name}, 4005110560Sgshapiro {if_addr}] Macros to transmit to 4006110560Sgshapiro milters when a session connection 4007110560Sgshapiro starts. 400890792SgshapiroconfMILTER_MACROS_HELO Milter.macros.helo 4009110560Sgshapiro [{tls_version}, {cipher}, 4010110560Sgshapiro {cipher_bits}, {cert_subject}, 4011110560Sgshapiro {cert_issuer}] Macros to transmit to 4012110560Sgshapiro milters after HELO/EHLO command. 401390792SgshapiroconfMILTER_MACROS_ENVFROM Milter.macros.envfrom 4014110560Sgshapiro [i, {auth_type}, {auth_authen}, 4015110560Sgshapiro {auth_ssf}, {auth_author}, 4016110560Sgshapiro {mail_mailer}, {mail_host}, 4017110560Sgshapiro {mail_addr}] Macros to transmit to 4018110560Sgshapiro milters after MAIL FROM command. 401990792SgshapiroconfMILTER_MACROS_ENVRCPT Milter.macros.envrcpt 4020110560Sgshapiro [{rcpt_mailer}, {rcpt_host}, 4021110560Sgshapiro {rcpt_addr}] Macros to transmit to 4022110560Sgshapiro milters after RCPT TO command. 402364562Sgshapiro 402490792Sgshapiro 402538032SpeterSee also the description of OSTYPE for some parameters that can be 402638032Spetertweaked (generally pathnames to mailers). 402738032Speter 402890792SgshapiroClientPortOptions and DaemonPortOptions are special cases since multiple 402990792Sgshapiroclients/daemons can be defined. This can be done via 403038032Speter 403190792Sgshapiro CLIENT_OPTIONS(`field1=value1,field2=value2,...') 403264562Sgshapiro DAEMON_OPTIONS(`field1=value1,field2=value2,...') 403364562Sgshapiro 403490792SgshapiroNote that multiple CLIENT_OPTIONS() commands (and therefore multiple 403590792SgshapiroClientPortOptions settings) are allowed in order to give settings for each 403690792Sgshapiroprotocol family (e.g., one for Family=inet and one for Family=inet6). A 403790792Sgshapirorestriction placed on one family only affects outgoing connections on that 403890792Sgshapiroparticular family. 403990792Sgshapiro 404064562SgshapiroIf DAEMON_OPTIONS is not used, then the default is 404164562Sgshapiro 404264562Sgshapiro DAEMON_OPTIONS(`Port=smtp, Name=MTA') 404364562Sgshapiro DAEMON_OPTIONS(`Port=587, Name=MSA, M=E') 404464562Sgshapiro 404564562SgshapiroIf you use one DAEMON_OPTIONS macro, it will alter the parameters 404664562Sgshapiroof the first of these. The second will still be defaulted; it 404764562Sgshapirorepresents a "Message Submission Agent" (MSA) as defined by RFC 404864562Sgshapiro2476 (see below). To turn off the default definition for the MSA, 404964562Sgshapirouse FEATURE(`no_default_msa') (see also FEATURES). If you use 405064562Sgshapiroadditional DAEMON_OPTIONS macros, they will add additional daemons. 405164562Sgshapiro 405264562SgshapiroExample 1: To change the port for the SMTP listener, while 405364562Sgshapirostill using the MSA default, use 405464562Sgshapiro DAEMON_OPTIONS(`Port=925, Name=MTA') 405564562Sgshapiro 405664562SgshapiroExample 2: To change the port for the MSA daemon, while still 405764562Sgshapirousing the default SMTP port, use 405864562Sgshapiro FEATURE(`no_default_msa') 405964562Sgshapiro DAEMON_OPTIONS(`Name=MTA') 406064562Sgshapiro DAEMON_OPTIONS(`Port=987, Name=MSA, M=E') 406164562Sgshapiro 406264562SgshapiroNote that if the first of those DAEMON_OPTIONS lines were omitted, then 406364562Sgshapirothere would be no listener on the standard SMTP port. 406464562Sgshapiro 406564562SgshapiroExample 3: To listen on both IPv4 and IPv6 interfaces, use 406664562Sgshapiro 406764562Sgshapiro DAEMON_OPTIONS(`Name=MTA-v4, Family=inet') 406864562Sgshapiro DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6') 406964562Sgshapiro 407064562SgshapiroA "Message Submission Agent" still uses all of the same rulesets for 407164562Sgshapiroprocessing the message (and therefore still allows message rejection via 407264562Sgshapirothe check_* rulesets). In accordance with the RFC, the MSA will ensure 4073110560Sgshapirothat all domains in envelope addresses are fully qualified if the message 4074110560Sgshapirois relayed to another MTA. It will also enforce the normal address syntax 4075110560Sgshapirorules and log error messages. Additionally, by using the M=a modifier you 4076110560Sgshapirocan require authentication before messages are accepted by the MSA. 4077110560SgshapiroNotice: Do NOT use the 'a' modifier on a public accessible MTA! Finally, 4078110560Sgshapirothe M=E modifier shown above disables ETRN as required by RFC 2476. 407964562Sgshapiro 408090792SgshapiroMail filters can be defined using the INPUT_MAIL_FILTER() and MAIL_FILTER() 408190792Sgshapirocommands: 408264562Sgshapiro 408390792Sgshapiro INPUT_MAIL_FILTER(`sample', `S=local:/var/run/f1.sock') 408490792Sgshapiro MAIL_FILTER(`myfilter', `S=inet:3333@localhost') 408538032Speter 408690792SgshapiroThe INPUT_MAIL_FILTER() command causes the filter(s) to be called in the 408790792Sgshapirosame order they were specified by also setting confINPUT_MAIL_FILTERS. A 408890792Sgshapirofilter can be defined without adding it to the input filter list by using 408990792SgshapiroMAIL_FILTER() instead of INPUT_MAIL_FILTER() in your .mc file. 409090792SgshapiroAlternatively, you can reset the list of filters and their order by setting 409190792SgshapiroconfINPUT_MAIL_FILTERS option after all INPUT_MAIL_FILTER() commands in 409290792Sgshapiroyour .mc file. 409390792Sgshapiro 409490792Sgshapiro 409590792Sgshapiro+----------------------------+ 409690792Sgshapiro| MESSAGE SUBMISSION PROGRAM | 409790792Sgshapiro+----------------------------+ 409890792Sgshapiro 409990792SgshapiroThe purpose of the message submission program (MSP) is explained 410090792Sgshapiroin sendmail/SECURITY. This section contains a list of caveats and 410190792Sgshapiroa few hints how for those who want to tweak the default configuration 410290792Sgshapirofor it (which is installed as submit.cf). 410390792Sgshapiro 410490792SgshapiroNotice: do not add options/features to submit.mc unless you are 410590792Sgshapiroabsolutely sure you need them. Options you may want to change 410690792Sgshapiroinclude: 410790792Sgshapiro 410894334Sgshapiro- confTRUSTED_USERS, FEATURE(`use_ct_file'), and confCT_FILE for 410998121Sgshapiro avoiding X-Authentication warnings. 411094334Sgshapiro- confTIME_ZONE to change it from the default `USE_TZ'. 411190792Sgshapiro- confDELIVERY_MODE is set to interactive in msp.m4 instead 411290792Sgshapiro of the default background mode. 411398121Sgshapiro- FEATURE(stickyhost) and LOCAL_RELAY to send unqualified addresses 411498121Sgshapiro to the LOCAL_RELAY instead of the default relay. 411598121Sgshapiro- confRAND_FILE if you use STARTTLS and sendmail is not compiled with 411698121Sgshapiro the flag HASURANDOM. 411790792Sgshapiro 411898121SgshapiroThe MSP performs hostname canonicalization by default. As also 411998121Sgshapiroexplained in sendmail/SECURITY, mail may end up for various DNS 412098121Sgshapirorelated reasons in the MSP queue. This problem can be minimized by 412198121Sgshapirousing 412298121Sgshapiro 412398121Sgshapiro FEATURE(`nocanonify', `canonify_hosts') 412498121Sgshapiro define(`confDIRECT_SUBMISSION_MODIFIERS', `C') 412598121Sgshapiro 412698121SgshapiroSee the discussion about nocanonify for possible side effects. 412798121Sgshapiro 412890792SgshapiroSome things are not intended to work with the MSP. These include 412990792Sgshapirofeatures that influence the delivery process (e.g., mailertable, 413090792Sgshapiroaliases), or those that are only important for a SMTP server (e.g., 413190792Sgshapirovirtusertable, DaemonPortOptions, multiple queues). Moreover, 413290792Sgshapirorelaxing certain restrictions (RestrictQueueRun, permissions on 413390792Sgshapiroqueue directory) or adding features (e.g., enabling prog/file mailer) 413490792Sgshapirocan cause security problems. 413590792Sgshapiro 413690792SgshapiroOther things don't work well with the MSP and require tweaking or 413790792Sgshapiroworkarounds. For example, to allow for client authentication it 413890792Sgshapirois not just sufficient to provide a client certificate and the 413990792Sgshapirocorresponding key, but it is also necessary to make the key group 414090792Sgshapiro(smmsp) readable and tell sendmail not to complain about that, i.e., 414190792Sgshapiro 414290792Sgshapiro define(`confDONT_BLAME_SENDMAIL', `GroupReadableKeyFile') 414390792Sgshapiro 414490792SgshapiroIf the MSP should actually use AUTH then the necessary data 414590792Sgshapiroshould be placed in a map as explained in SMTP AUTHENTICATION: 414690792Sgshapiro 414790792SgshapiroFEATURE(`authinfo', `DATABASE_MAP_TYPE /etc/mail/msp-authinfo') 414890792Sgshapiro 414990792Sgshapiro/etc/mail/msp-authinfo should contain an entry like: 415090792Sgshapiro 415190792Sgshapiro AuthInfo:127.0.0.1 "U:smmsp" "P:secret" "M:DIGEST-MD5" 415290792Sgshapiro 415390792SgshapiroThe file and the map created by makemap should be owned by smmsp, 415490792Sgshapiroits group should be smmsp, and it should have mode 640. The database 415590792Sgshapiroused by the MTA for AUTH must have a corresponding entry. 415690792SgshapiroAdditionally the MTA must trust this authentication data so the AUTH= 415790792Sgshapiropart will be relayed on to the next hop. This can be achieved by 415890792Sgshapiroadding the following to your sendmail.mc file: 415990792Sgshapiro 416090792Sgshapiro LOCAL_RULESETS 416190792Sgshapiro SLocal_trust_auth 416290792Sgshapiro R$* $: $&{auth_authen} 416390792Sgshapiro Rsmmsp $# OK 416490792Sgshapiro 416590792Sgshapirofeature/msp.m4 defines almost all settings for the MSP. Most of 416690792Sgshapirothose should not be changed at all. Some of the features and options 416790792Sgshapirocan be overridden if really necessary. It is a bit tricky to do 416890792Sgshapirothis, because it depends on the actual way the option is defined 416990792Sgshapiroin feature/msp.m4. If it is directly defined (i.e., define()) then 417090792Sgshapirothe modified value must be defined after 417190792Sgshapiro 417290792Sgshapiro FEATURE(`msp') 417390792Sgshapiro 417490792SgshapiroIf it is conditionally defined (i.e., ifdef()) then the desired 417590792Sgshapirovalue must be defined before the FEATURE line in the .mc file. 417690792SgshapiroTo see how the options are defined read feature/msp.m4. 417790792Sgshapiro 417890792Sgshapiro 417990792Sgshapiro+--------------------------+ 418090792Sgshapiro| FORMAT OF FILES AND MAPS | 418190792Sgshapiro+--------------------------+ 418290792Sgshapiro 418390792SgshapiroFiles that define classes, i.e., F{classname}, consist of lines 418490792Sgshapiroeach of which contains a single element of the class. For example, 418590792Sgshapiro/etc/mail/local-host-names may have the following content: 418690792Sgshapiro 418790792Sgshapiromy.domain 418890792Sgshapiroanother.domain 418990792Sgshapiro 419090792SgshapiroMaps must be created using makemap(8) , e.g., 419190792Sgshapiro 419290792Sgshapiro makemap hash MAP < MAP 419390792Sgshapiro 419490792SgshapiroIn general, a text file from which a map is created contains lines 419590792Sgshapiroof the form 419690792Sgshapiro 419790792Sgshapirokey value 419890792Sgshapiro 419990792Sgshapirowhere 'key' and 'value' are also called LHS and RHS, respectively. 420090792SgshapiroBy default, the delimiter between LHS and RHS is a non-empty sequence 420190792Sgshapiroof white space characters. 420290792Sgshapiro 420390792Sgshapiro 420490792Sgshapiro+------------------+ 420590792Sgshapiro| DIRECTORY LAYOUT | 420690792Sgshapiro+------------------+ 420790792Sgshapiro 420838032SpeterWithin this directory are several subdirectories, to wit: 420938032Speter 421038032Speterm4 General support routines. These are typically 421138032Speter very important and should not be changed without 421238032Speter very careful consideration. 421338032Speter 421438032Spetercf The configuration files themselves. They have 421538032Speter ".mc" suffixes, and must be run through m4 to 421638032Speter become complete. The resulting output should 421738032Speter have a ".cf" suffix. 421838032Speter 421938032Speterostype Definitions describing a particular operating 422038032Speter system type. These should always be referenced 422138032Speter using the OSTYPE macro in the .mc file. Examples 422238032Speter include "bsd4.3", "bsd4.4", "sunos3.5", and 422338032Speter "sunos4.1". 422438032Speter 422538032Speterdomain Definitions describing a particular domain, referenced 422638032Speter using the DOMAIN macro in the .mc file. These are 422738032Speter site dependent; for example, "CS.Berkeley.EDU.m4" 422838032Speter describes hosts in the CS.Berkeley.EDU subdomain. 422938032Speter 423066494Sgshapiromailer Descriptions of mailers. These are referenced using 423138032Speter the MAILER macro in the .mc file. 423238032Speter 423338032Spetersh Shell files used when building the .cf file from the 423438032Speter .mc file in the cf subdirectory. 423538032Speter 423638032Speterfeature These hold special orthogonal features that you might 423738032Speter want to include. They should be referenced using 423838032Speter the FEATURE macro. 423938032Speter 424038032Speterhack Local hacks. These can be referenced using the HACK 424138032Speter macro. They shouldn't be of more than voyeuristic 424238032Speter interest outside the .Berkeley.EDU domain, but who knows? 424338032Speter 424438032Spetersiteconfig Site configuration -- e.g., tables of locally connected 424538032Speter UUCP sites. 424638032Speter 424738032Speter 424838032Speter+------------------------+ 424938032Speter| ADMINISTRATIVE DETAILS | 425038032Speter+------------------------+ 425138032Speter 425238032SpeterThe following sections detail usage of certain internal parts of the 425338032Spetersendmail.cf file. Read them carefully if you are trying to modify 425438032Speterthe current model. If you find the above descriptions adequate, these 425538032Spetershould be {boring, confusing, tedious, ridiculous} (pick one or more). 425638032Speter 425738032SpeterRULESETS (* means built in to sendmail) 425838032Speter 425938032Speter 0 * Parsing 426038032Speter 1 * Sender rewriting 426138032Speter 2 * Recipient rewriting 426238032Speter 3 * Canonicalization 426338032Speter 4 * Post cleanup 426438032Speter 5 * Local address rewrite (after aliasing) 426538032Speter 1x mailer rules (sender qualification) 426638032Speter 2x mailer rules (recipient qualification) 426738032Speter 3x mailer rules (sender header qualification) 426838032Speter 4x mailer rules (recipient header qualification) 426938032Speter 5x mailer subroutines (general) 427038032Speter 6x mailer subroutines (general) 427138032Speter 7x mailer subroutines (general) 427238032Speter 8x reserved 427338032Speter 90 Mailertable host stripping 427438032Speter 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) 427538032Speter 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) 427638032Speter 98 Local part of ruleset 0 (ruleset 8 in old sendmail) 427738032Speter 427838032Speter 427938032SpeterMAILERS 428038032Speter 428138032Speter 0 local, prog local and program mailers 428238032Speter 1 [e]smtp, relay SMTP channel 428338032Speter 2 uucp-* UNIX-to-UNIX Copy Program 428438032Speter 3 netnews Network News delivery 428538032Speter 4 fax Sam Leffler's HylaFAX software 428638032Speter 5 mail11 DECnet mailer 428738032Speter 428838032Speter 428938032SpeterMACROS 429038032Speter 429138032Speter A 429238032Speter B Bitnet Relay 429338032Speter C DECnet Relay 429438032Speter D The local domain -- usually not needed 429538032Speter E reserved for X.400 Relay 429638032Speter F FAX Relay 429738032Speter G 429838032Speter H mail Hub (for mail clusters) 429938032Speter I 430038032Speter J 430138032Speter K 430238032Speter L Luser Relay 430364562Sgshapiro M Masquerade (who you claim to be) 430438032Speter N 430538032Speter O 430638032Speter P 430738032Speter Q 430838032Speter R Relay (for unqualified names) 430938032Speter S Smart Host 431038032Speter T 431164562Sgshapiro U my UUCP name (if you have a UUCP connection) 431264562Sgshapiro V UUCP Relay (class {V} hosts) 431364562Sgshapiro W UUCP Relay (class {W} hosts) 431464562Sgshapiro X UUCP Relay (class {X} hosts) 431538032Speter Y UUCP Relay (all other hosts) 431638032Speter Z Version number 431738032Speter 431838032Speter 431938032SpeterCLASSES 432038032Speter 432138032Speter A 432238032Speter B domains that are candidates for bestmx lookup 432338032Speter C 432438032Speter D 432538032Speter E addresses that should not seem to come from $M 432664562Sgshapiro F hosts this system forward for 432738032Speter G domains that should be looked up in genericstable 432838032Speter H 432938032Speter I 433038032Speter J 433138032Speter K 433238032Speter L addresses that should not be forwarded to $R 433338032Speter M domains that should be mapped to $M 433464562Sgshapiro N host/domains that should not be mapped to $M 433538032Speter O operators that indicate network operations (cannot be in local names) 433638032Speter P top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc. 433738032Speter Q 433864562Sgshapiro R domains this system is willing to relay (pass anti-spam filters) 433938032Speter S 434038032Speter T 434138032Speter U locally connected UUCP hosts 434238032Speter V UUCP hosts connected to relay $V 434338032Speter W UUCP hosts connected to relay $W 434438032Speter X UUCP hosts connected to relay $X 434538032Speter Y locally connected smart UUCP hosts 434638032Speter Z locally connected domain-ized UUCP hosts 434738032Speter . the class containing only a dot 434838032Speter [ the class containing only a left bracket 434938032Speter 435038032Speter 435138032SpeterM4 DIVERSIONS 435238032Speter 435338032Speter 1 Local host detection and resolution 435438032Speter 2 Local Ruleset 3 additions 435538032Speter 3 Local Ruleset 0 additions 435638032Speter 4 UUCP Ruleset 0 additions 435738032Speter 5 locally interpreted names (overrides $R) 435838032Speter 6 local configuration (at top of file) 435938032Speter 7 mailer definitions 436064562Sgshapiro 8 DNS based blacklists 436138032Speter 9 special local rulesets (1 and 2) 436264562Sgshapiro 4363110560Sgshapiro$Revision: 8.623.2.18 $, Last updated $Date: 2002/12/29 04:16:51 $ 4364