10Sstevel@tonic-gate 20Sstevel@tonic-gate SENDMAIL CONFIGURATION FILES 30Sstevel@tonic-gate 40Sstevel@tonic-gateThis document describes the sendmail configuration files. It 50Sstevel@tonic-gateexplains how to create a sendmail.cf file for use with sendmail. 60Sstevel@tonic-gateIt also describes how to set options for sendmail which are explained 70Sstevel@tonic-gatein the Sendmail Installation and Operation guide, which can be found 80Sstevel@tonic-gateon-line at http://www.sendmail.org/%7Eca/email/doc8.12/op.html . 90Sstevel@tonic-gateRecall this URL throughout this document when references to 100Sstevel@tonic-gatedoc/op/op.* are made. 110Sstevel@tonic-gate 120Sstevel@tonic-gateTable of Content: 130Sstevel@tonic-gate 140Sstevel@tonic-gateINTRODUCTION AND EXAMPLE 150Sstevel@tonic-gateA BRIEF INTRODUCTION TO M4 160Sstevel@tonic-gateFILE LOCATIONS 170Sstevel@tonic-gateOSTYPE 180Sstevel@tonic-gateDOMAINS 190Sstevel@tonic-gateMAILERS 200Sstevel@tonic-gateFEATURES 210Sstevel@tonic-gateHACKS 220Sstevel@tonic-gateSITE CONFIGURATION 230Sstevel@tonic-gateUSING UUCP MAILERS 240Sstevel@tonic-gateTWEAKING RULESETS 250Sstevel@tonic-gateMASQUERADING AND RELAYING 260Sstevel@tonic-gateUSING LDAP FOR ALIASES, MAPS, AND CLASSES 270Sstevel@tonic-gateLDAP ROUTING 280Sstevel@tonic-gateANTI-SPAM CONFIGURATION CONTROL 290Sstevel@tonic-gateCONNECTION CONTROL 300Sstevel@tonic-gateSTARTTLS 310Sstevel@tonic-gateADDING NEW MAILERS OR RULESETS 320Sstevel@tonic-gateADDING NEW MAIL FILTERS 330Sstevel@tonic-gateQUEUE GROUP DEFINITIONS 340Sstevel@tonic-gateNON-SMTP BASED CONFIGURATIONS 350Sstevel@tonic-gateWHO AM I? 360Sstevel@tonic-gateACCEPTING MAIL FOR MULTIPLE NAMES 370Sstevel@tonic-gateUSING MAILERTABLES 380Sstevel@tonic-gateUSING USERDB TO MAP FULL NAMES 390Sstevel@tonic-gateMISCELLANEOUS SPECIAL FEATURES 400Sstevel@tonic-gateSECURITY NOTES 410Sstevel@tonic-gateTWEAKING CONFIGURATION OPTIONS 420Sstevel@tonic-gateMESSAGE SUBMISSION PROGRAM 430Sstevel@tonic-gateFORMAT OF FILES AND MAPS 440Sstevel@tonic-gateDIRECTORY LAYOUT 450Sstevel@tonic-gateADMINISTRATIVE DETAILS 460Sstevel@tonic-gate 470Sstevel@tonic-gate 480Sstevel@tonic-gate+--------------------------+ 490Sstevel@tonic-gate| INTRODUCTION AND EXAMPLE | 500Sstevel@tonic-gate+--------------------------+ 510Sstevel@tonic-gate 520Sstevel@tonic-gateConfiguration files are contained in the subdirectory "cf", with a 530Sstevel@tonic-gatesuffix ".mc". They must be run through "m4" to produce a ".cf" file. 540Sstevel@tonic-gateYou must pre-load "cf.m4": 550Sstevel@tonic-gate 560Sstevel@tonic-gate m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf 570Sstevel@tonic-gate 580Sstevel@tonic-gateAlternatively, you can simply: 590Sstevel@tonic-gate 600Sstevel@tonic-gate cd ${CFDIR}/cf 610Sstevel@tonic-gate /usr/ccs/bin/make config.cf 620Sstevel@tonic-gate 630Sstevel@tonic-gatewhere ${CFDIR} is the root of the cf directory and config.mc is the 640Sstevel@tonic-gatename of your configuration file. If you are running a version of M4 650Sstevel@tonic-gatethat understands the __file__ builtin (versions of GNU m4 >= 0.75 do 660Sstevel@tonic-gatethis, but the versions distributed with 4.4BSD and derivatives do not) 670Sstevel@tonic-gateor the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory. 680Sstevel@tonic-gateFor "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST 690Sstevel@tonic-gateuse -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash! For example: 700Sstevel@tonic-gate 710Sstevel@tonic-gate m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf 720Sstevel@tonic-gate 730Sstevel@tonic-gateLet's examine a typical .mc file: 740Sstevel@tonic-gate 750Sstevel@tonic-gate divert(-1) 760Sstevel@tonic-gate # 77616Sjbeck # Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers. 780Sstevel@tonic-gate # All rights reserved. 790Sstevel@tonic-gate # Copyright (c) 1983 Eric P. Allman. All rights reserved. 800Sstevel@tonic-gate # Copyright (c) 1988, 1993 810Sstevel@tonic-gate # The Regents of the University of California. All rights reserved. 820Sstevel@tonic-gate # 830Sstevel@tonic-gate # By using this file, you agree to the terms and conditions set 840Sstevel@tonic-gate # forth in the LICENSE file which can be found at the top level of 850Sstevel@tonic-gate # the sendmail distribution. 860Sstevel@tonic-gate # 870Sstevel@tonic-gate 880Sstevel@tonic-gate # 890Sstevel@tonic-gate # This is a Berkeley-specific configuration file for HP-UX 9.x. 900Sstevel@tonic-gate # It applies only to the Computer Science Division at Berkeley, 910Sstevel@tonic-gate # and should not be used elsewhere. It is provided on the sendmail 920Sstevel@tonic-gate # distribution as a sample only. To create your own configuration 930Sstevel@tonic-gate # file, create an appropriate domain file in ../domain, change the 940Sstevel@tonic-gate # `DOMAIN' macro below to reference that file, and copy the result 950Sstevel@tonic-gate # to a name of your own choosing. 960Sstevel@tonic-gate # 970Sstevel@tonic-gate divert(0) 980Sstevel@tonic-gate 990Sstevel@tonic-gateThe divert(-1) will delete the crud in the resulting output file. 1000Sstevel@tonic-gateThe copyright notice can be replaced by whatever your lawyers require; 1010Sstevel@tonic-gateour lawyers require the one that is included in these files. A copyleft 1020Sstevel@tonic-gateis a copyright by another name. The divert(0) restores regular output. 1030Sstevel@tonic-gate 1040Sstevel@tonic-gate VERSIONID(`<SCCS or RCS version id>') 1050Sstevel@tonic-gate 1060Sstevel@tonic-gateVERSIONID is a macro that stuffs the version information into the 1070Sstevel@tonic-gateresulting file. You could use SCCS, RCS, CVS, something else, or 1080Sstevel@tonic-gateomit it completely. This is not the same as the version id included 1090Sstevel@tonic-gatein SMTP greeting messages -- this is defined in m4/version.m4. 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate OSTYPE(`hpux9')dnl 1120Sstevel@tonic-gate 1130Sstevel@tonic-gateYou must specify an OSTYPE to properly configure things such as the 1140Sstevel@tonic-gatepathname of the help and status files, the flags needed for the local 1150Sstevel@tonic-gatemailer, and other important things. If you omit it, you will get an 1160Sstevel@tonic-gateerror when you try to build the configuration. Look at the ostype 1170Sstevel@tonic-gatedirectory for the list of known operating system types. 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate DOMAIN(`CS.Berkeley.EDU')dnl 1200Sstevel@tonic-gate 1210Sstevel@tonic-gateThis example is specific to the Computer Science Division at Berkeley. 1220Sstevel@tonic-gateYou can use "DOMAIN(`generic')" to get a sufficiently bland definition 1230Sstevel@tonic-gatethat may well work for you, or you can create a customized domain 1240Sstevel@tonic-gatedefinition appropriate for your environment. 1250Sstevel@tonic-gate 1260Sstevel@tonic-gate MAILER(`local') 1270Sstevel@tonic-gate MAILER(`smtp') 1280Sstevel@tonic-gate 1290Sstevel@tonic-gateThese describe the mailers used at the default CS site. The local 1300Sstevel@tonic-gatemailer is always included automatically. Beware: MAILER declarations 1310Sstevel@tonic-gateshould only be followed by LOCAL_* sections. The general rules are 1320Sstevel@tonic-gatethat the order should be: 1330Sstevel@tonic-gate 1340Sstevel@tonic-gate VERSIONID 1350Sstevel@tonic-gate OSTYPE 1360Sstevel@tonic-gate DOMAIN 1370Sstevel@tonic-gate FEATURE 1380Sstevel@tonic-gate local macro definitions 1390Sstevel@tonic-gate MAILER 1400Sstevel@tonic-gate LOCAL_CONFIG 1410Sstevel@tonic-gate LOCAL_RULE_* 1420Sstevel@tonic-gate LOCAL_RULESETS 1430Sstevel@tonic-gate 1440Sstevel@tonic-gateThere are a few exceptions to this rule. Local macro definitions which 1450Sstevel@tonic-gateinfluence a FEATURE() should be done before that feature. For example, 1460Sstevel@tonic-gatea define(`PROCMAIL_MAILER_PATH', ...) should be done before 1470Sstevel@tonic-gateFEATURE(`local_procmail'). 1480Sstevel@tonic-gate 1490Sstevel@tonic-gate 1500Sstevel@tonic-gate+----------------------------+ 1510Sstevel@tonic-gate| A BRIEF INTRODUCTION TO M4 | 1520Sstevel@tonic-gate+----------------------------+ 1530Sstevel@tonic-gate 1540Sstevel@tonic-gateSendmail uses the M4 macro processor to ``compile'' the configuration 1550Sstevel@tonic-gatefiles. The most important thing to know is that M4 is stream-based, 1560Sstevel@tonic-gatethat is, it doesn't understand about lines. For this reason, in some 1570Sstevel@tonic-gateplaces you may see the word ``dnl'', which stands for ``delete 1580Sstevel@tonic-gatethrough newline''; essentially, it deletes all characters starting 1590Sstevel@tonic-gateat the ``dnl'' up to and including the next newline character. In 1600Sstevel@tonic-gatemost cases sendmail uses this only to avoid lots of unnecessary 1610Sstevel@tonic-gateblank lines in the output. 1620Sstevel@tonic-gate 1630Sstevel@tonic-gateOther important directives are define(A, B) which defines the macro 1640Sstevel@tonic-gate``A'' to have value ``B''. Macros are expanded as they are read, so 1650Sstevel@tonic-gateone normally quotes both values to prevent expansion. For example, 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate define(`SMART_HOST', `smart.foo.com') 1680Sstevel@tonic-gate 1690Sstevel@tonic-gateOne word of warning: M4 macros are expanded even in lines that appear 1700Sstevel@tonic-gateto be comments. For example, if you have 1710Sstevel@tonic-gate 1720Sstevel@tonic-gate # See FEATURE(`foo') above 1730Sstevel@tonic-gate 1740Sstevel@tonic-gateit will not do what you expect, because the FEATURE(`foo') will be 1750Sstevel@tonic-gateexpanded. This also applies to 1760Sstevel@tonic-gate 1770Sstevel@tonic-gate # And then define the $X macro to be the return address 1780Sstevel@tonic-gate 1790Sstevel@tonic-gatebecause ``define'' is an M4 keyword. If you want to use them, surround 1800Sstevel@tonic-gatethem with directed quotes, `like this'. 1810Sstevel@tonic-gate 1820Sstevel@tonic-gateSince m4 uses single quotes (opening "`" and closing "'") to quote 1830Sstevel@tonic-gatearguments, those quotes can't be used in arguments. For example, 1840Sstevel@tonic-gateit is not possible to define a rejection message containing a single 1850Sstevel@tonic-gatequote. Usually there are simple workarounds by changing those 1860Sstevel@tonic-gatemessages; in the worst case it might be ok to change the value 1870Sstevel@tonic-gatedirectly in the generated .cf file, which however is not advised. 1880Sstevel@tonic-gate 1890Sstevel@tonic-gate+----------------+ 1900Sstevel@tonic-gate| FILE LOCATIONS | 1910Sstevel@tonic-gate+----------------+ 1920Sstevel@tonic-gate 1930Sstevel@tonic-gatesendmail 8.9 has introduced a new configuration directory for sendmail 1940Sstevel@tonic-gaterelated files, /etc/mail. The new files available for sendmail 8.9 -- 1950Sstevel@tonic-gatethe class {R} /etc/mail/relay-domains and the access database 1960Sstevel@tonic-gate/etc/mail/access -- take advantage of this new directory. Beginning with 1970Sstevel@tonic-gate8.10, all files will use this directory by default (some options may be 1980Sstevel@tonic-gateset by OSTYPE() files). This new directory should help to restore 1990Sstevel@tonic-gateuniformity to sendmail's file locations. 2000Sstevel@tonic-gate 2010Sstevel@tonic-gateBelow is a table of some of the common changes: 2020Sstevel@tonic-gate 2030Sstevel@tonic-gateOld filename New filename 2040Sstevel@tonic-gate------------ ------------ 2050Sstevel@tonic-gate/etc/bitdomain /etc/mail/bitdomain 2060Sstevel@tonic-gate/etc/domaintable /etc/mail/domaintable 2070Sstevel@tonic-gate/etc/genericstable /etc/mail/genericstable 2080Sstevel@tonic-gate/etc/uudomain /etc/mail/uudomain 2090Sstevel@tonic-gate/etc/virtusertable /etc/mail/virtusertable 2100Sstevel@tonic-gate/etc/userdb /etc/mail/userdb 2110Sstevel@tonic-gate 2120Sstevel@tonic-gate/etc/aliases /etc/mail/aliases 2130Sstevel@tonic-gate/etc/sendmail/aliases /etc/mail/aliases 2140Sstevel@tonic-gate/etc/ucbmail/aliases /etc/mail/aliases 2150Sstevel@tonic-gate/usr/adm/sendmail/aliases /etc/mail/aliases 2160Sstevel@tonic-gate/usr/lib/aliases /etc/mail/aliases 2170Sstevel@tonic-gate/usr/lib/mail/aliases /etc/mail/aliases 2180Sstevel@tonic-gate/usr/ucblib/aliases /etc/mail/aliases 2190Sstevel@tonic-gate 2200Sstevel@tonic-gate/etc/sendmail.cw /etc/mail/local-host-names 2210Sstevel@tonic-gate/etc/mail/sendmail.cw /etc/mail/local-host-names 2220Sstevel@tonic-gate/etc/sendmail/sendmail.cw /etc/mail/local-host-names 2230Sstevel@tonic-gate 2240Sstevel@tonic-gate/etc/sendmail.ct /etc/mail/trusted-users 2250Sstevel@tonic-gate 2260Sstevel@tonic-gate/etc/sendmail.oE /etc/mail/error-header 2270Sstevel@tonic-gate 2280Sstevel@tonic-gate/etc/sendmail.hf /etc/mail/helpfile 2290Sstevel@tonic-gate/etc/mail/sendmail.hf /etc/mail/helpfile 2300Sstevel@tonic-gate/usr/ucblib/sendmail.hf /etc/mail/helpfile 2310Sstevel@tonic-gate/etc/ucbmail/sendmail.hf /etc/mail/helpfile 2320Sstevel@tonic-gate/usr/lib/sendmail.hf /etc/mail/helpfile 2330Sstevel@tonic-gate/usr/share/lib/sendmail.hf /etc/mail/helpfile 2340Sstevel@tonic-gate/usr/share/misc/sendmail.hf /etc/mail/helpfile 2350Sstevel@tonic-gate/share/misc/sendmail.hf /etc/mail/helpfile 2360Sstevel@tonic-gate 2370Sstevel@tonic-gate/etc/service.switch /etc/mail/service.switch 2380Sstevel@tonic-gate 2390Sstevel@tonic-gate/etc/sendmail.st /etc/mail/statistics 2400Sstevel@tonic-gate/etc/mail/sendmail.st /etc/mail/statistics 2410Sstevel@tonic-gate/etc/mailer/sendmail.st /etc/mail/statistics 2420Sstevel@tonic-gate/etc/sendmail/sendmail.st /etc/mail/statistics 2430Sstevel@tonic-gate/usr/lib/sendmail.st /etc/mail/statistics 2440Sstevel@tonic-gate/usr/ucblib/sendmail.st /etc/mail/statistics 2450Sstevel@tonic-gate 2460Sstevel@tonic-gateNote that all of these paths actually use a new m4 macro MAIL_SETTINGS_DIR 2470Sstevel@tonic-gateto create the pathnames. The default value of this variable is 2480Sstevel@tonic-gate`/etc/mail/'. If you set this macro to a different value, you MUST include 2490Sstevel@tonic-gatea trailing slash. 2500Sstevel@tonic-gate 2510Sstevel@tonic-gateNotice: all filenames used in a .mc (or .cf) file should be absolute 2520Sstevel@tonic-gate(starting at the root, i.e., with '/'). Relative filenames most 2530Sstevel@tonic-gatelikely cause surprises during operations (unless otherwise noted). 2540Sstevel@tonic-gate 2550Sstevel@tonic-gate 2560Sstevel@tonic-gate+--------+ 2570Sstevel@tonic-gate| OSTYPE | 2580Sstevel@tonic-gate+--------+ 2590Sstevel@tonic-gate 2600Sstevel@tonic-gateYou MUST define an operating system environment, or the configuration 2610Sstevel@tonic-gatefile build will puke. There are several environments available; look 2620Sstevel@tonic-gateat the "ostype" directory for the current list. This macro changes 2630Sstevel@tonic-gatethings like the location of the alias file and queue directory. Some 2640Sstevel@tonic-gateof these files are identical to one another. 2650Sstevel@tonic-gate 2660Sstevel@tonic-gateIt is IMPERATIVE that the OSTYPE occur before any MAILER definitions. 2670Sstevel@tonic-gateIn general, the OSTYPE macro should go immediately after any version 2680Sstevel@tonic-gateinformation, and MAILER definitions should always go last. 2690Sstevel@tonic-gate 2700Sstevel@tonic-gateOperating system definitions are usually easy to write. They may define 2710Sstevel@tonic-gatethe following variables (everything defaults, so an ostype file may be 2720Sstevel@tonic-gateempty). Unfortunately, the list of configuration-supported systems is 2730Sstevel@tonic-gatenot as broad as the list of source-supported systems, since many of 2740Sstevel@tonic-gatethe source contributors do not include corresponding ostype files. 2750Sstevel@tonic-gate 2760Sstevel@tonic-gateALIAS_FILE [/etc/mail/aliases] The location of the text version 2770Sstevel@tonic-gate of the alias file(s). It can be a comma-separated 2780Sstevel@tonic-gate list of names (but be sure you quote values with 2790Sstevel@tonic-gate commas in them -- for example, use 2800Sstevel@tonic-gate define(`ALIAS_FILE', `a,b') 2810Sstevel@tonic-gate to get "a" and "b" both listed as alias files; 2820Sstevel@tonic-gate otherwise the define() primitive only sees "a"). 2830Sstevel@tonic-gateHELP_FILE [/etc/mail/helpfile] The name of the file 2840Sstevel@tonic-gate containing information printed in response to 2850Sstevel@tonic-gate the SMTP HELP command. 2860Sstevel@tonic-gateQUEUE_DIR [/var/spool/mqueue] The directory containing 2870Sstevel@tonic-gate queue files. To use multiple queues, supply 2880Sstevel@tonic-gate a value ending with an asterisk. For 2890Sstevel@tonic-gate example, /var/spool/mqueue/qd* will use all of the 2900Sstevel@tonic-gate directories or symbolic links to directories 2910Sstevel@tonic-gate beginning with 'qd' in /var/spool/mqueue as queue 2920Sstevel@tonic-gate directories. The names 'qf', 'df', and 'xf' are 2930Sstevel@tonic-gate reserved as specific subdirectories for the 2940Sstevel@tonic-gate corresponding queue file types as explained in 2950Sstevel@tonic-gate doc/op/op.me. See also QUEUE GROUP DEFINITIONS. 2960Sstevel@tonic-gateMSP_QUEUE_DIR [/var/spool/clientmqueue] The directory containing 2970Sstevel@tonic-gate queue files for the MSP (Mail Submission Program). 2980Sstevel@tonic-gateSTATUS_FILE [/etc/mail/statistics] The file containing status 2990Sstevel@tonic-gate information. 3000Sstevel@tonic-gateLOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. 3010Sstevel@tonic-gateLOCAL_MAILER_FLAGS [Prmn9] The flags used by the local mailer. The 3020Sstevel@tonic-gate flags lsDFMAw5:/|@q are always included. 3030Sstevel@tonic-gateLOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local 3040Sstevel@tonic-gate mail. 3050Sstevel@tonic-gateLOCAL_MAILER_MAX [undefined] If defined, the maximum size of local 3060Sstevel@tonic-gate mail that you are willing to accept. 3070Sstevel@tonic-gateLOCAL_MAILER_MAXMSGS [undefined] If defined, the maximum number of 3080Sstevel@tonic-gate messages to deliver in a single connection. Only 3090Sstevel@tonic-gate useful for LMTP local mailers. 3100Sstevel@tonic-gateLOCAL_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 3110Sstevel@tonic-gate that ARRIVE from an address that resolves to the 3120Sstevel@tonic-gate local mailer and which are converted to MIME will be 3130Sstevel@tonic-gate labeled with this character set. 3140Sstevel@tonic-gateLOCAL_MAILER_EOL [undefined] If defined, the string to use as the 3150Sstevel@tonic-gate end of line for the local mailer. 3160Sstevel@tonic-gateLOCAL_MAILER_DSN_DIAGNOSTIC_CODE 3170Sstevel@tonic-gate [X-Unix] The DSN Diagnostic-Code value for the 3180Sstevel@tonic-gate local mailer. This should be changed with care. 3190Sstevel@tonic-gateLOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. 3200Sstevel@tonic-gateLOCAL_SHELL_FLAGS [eu9] The flags used by the shell mailer. The 3210Sstevel@tonic-gate flags lsDFM are always included. 3220Sstevel@tonic-gateLOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" 3230Sstevel@tonic-gate mail. 3240Sstevel@tonic-gateLOCAL_SHELL_DIR [$z:/] The directory search path in which the 3250Sstevel@tonic-gate shell should run. 3260Sstevel@tonic-gateLOCAL_MAILER_QGRP [undefined] The queue group for the local mailer. 3270Sstevel@tonic-gateSMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default 3280Sstevel@tonic-gate flags are `mDFMuX' for all SMTP-based mailers; the 3290Sstevel@tonic-gate "esmtp" mailer adds `a'; "smtp8" adds `8'; and 3300Sstevel@tonic-gate "dsmtp" adds `%'. 3310Sstevel@tonic-gateRELAY_MAILER_FLAGS [undefined] Flags added to the relay mailer. Default 3320Sstevel@tonic-gate flags are `mDFMuX' for all SMTP-based mailers; the 3330Sstevel@tonic-gate relay mailer adds `a8'. If this is not defined, 3340Sstevel@tonic-gate then SMTP_MAILER_FLAGS is used. 3350Sstevel@tonic-gateSMTP_MAILER_MAX [undefined] The maximum size of messages that will 3360Sstevel@tonic-gate be transported using the smtp, smtp8, esmtp, or dsmtp 3370Sstevel@tonic-gate mailers. 3380Sstevel@tonic-gateSMTP_MAILER_MAXMSGS [undefined] If defined, the maximum number of 3390Sstevel@tonic-gate messages to deliver in a single connection for the 3400Sstevel@tonic-gate smtp, smtp8, esmtp, or dsmtp mailers. 3410Sstevel@tonic-gateSMTP_MAILER_MAXRCPTS [undefined] If defined, the maximum number of 3420Sstevel@tonic-gate recipients to deliver in a single connection for the 3430Sstevel@tonic-gate smtp, smtp8, esmtp, or dsmtp mailers. 3440Sstevel@tonic-gateSMTP_MAILER_ARGS [TCP $h] The arguments passed to the smtp mailer. 3450Sstevel@tonic-gate About the only reason you would want to change this 3460Sstevel@tonic-gate would be to change the default port. 3470Sstevel@tonic-gateESMTP_MAILER_ARGS [TCP $h] The arguments passed to the esmtp mailer. 3480Sstevel@tonic-gateSMTP8_MAILER_ARGS [TCP $h] The arguments passed to the smtp8 mailer. 3490Sstevel@tonic-gateDSMTP_MAILER_ARGS [TCP $h] The arguments passed to the dsmtp mailer. 3500Sstevel@tonic-gateRELAY_MAILER_ARGS [TCP $h] The arguments passed to the relay mailer. 3510Sstevel@tonic-gateSMTP_MAILER_QGRP [undefined] The queue group for the smtp mailer. 3520Sstevel@tonic-gateESMTP_MAILER_QGRP [undefined] The queue group for the esmtp mailer. 3530Sstevel@tonic-gateSMTP8_MAILER_QGRP [undefined] The queue group for the smtp8 mailer. 3540Sstevel@tonic-gateDSMTP_MAILER_QGRP [undefined] The queue group for the dsmtp mailer. 3550Sstevel@tonic-gateRELAY_MAILER_QGRP [undefined] The queue group for the relay mailer. 3560Sstevel@tonic-gateRELAY_MAILER_MAXMSGS [undefined] If defined, the maximum number of 3570Sstevel@tonic-gate messages to deliver in a single connection for the 3580Sstevel@tonic-gate relay mailer. 3590Sstevel@tonic-gateSMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 3600Sstevel@tonic-gate that ARRIVE from an address that resolves to one of 3610Sstevel@tonic-gate the SMTP mailers and which are converted to MIME will 3620Sstevel@tonic-gate be labeled with this character set. 3633544SjbeckSMTP_MAILER_LL [990] The maximum line length for SMTP mailers 3643544Sjbeck (except the relay mailer). 3653544SjbeckRELAY_MAILER_LL [2040] The maximum line length for the relay mailer. 3660Sstevel@tonic-gateUUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail. 3670Sstevel@tonic-gateUUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default 3680Sstevel@tonic-gate flags are `DFMhuU' (and `m' for uucp-new mailer, 3690Sstevel@tonic-gate minus `U' for uucp-dom mailer). 3700Sstevel@tonic-gateUUCP_MAILER_ARGS [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments 3710Sstevel@tonic-gate passed to the UUCP mailer. 3720Sstevel@tonic-gateUUCP_MAILER_MAX [100000] The maximum size message accepted for 3730Sstevel@tonic-gate transmission by the UUCP mailers. 3740Sstevel@tonic-gateUUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data 3750Sstevel@tonic-gate that ARRIVE from an address that resolves to one of 3760Sstevel@tonic-gate the UUCP mailers and which are converted to MIME will 3770Sstevel@tonic-gate be labeled with this character set. 3780Sstevel@tonic-gateUUCP_MAILER_QGRP [undefined] The queue group for the UUCP mailers. 3790Sstevel@tonic-gatePROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail 3800Sstevel@tonic-gate program. This is also used by 3810Sstevel@tonic-gate FEATURE(`local_procmail'). 3820Sstevel@tonic-gatePROCMAIL_MAILER_FLAGS [SPhnu9] Flags added to Procmail mailer. Flags 3830Sstevel@tonic-gate DFM are always set. This is NOT used by 3840Sstevel@tonic-gate FEATURE(`local_procmail'); tweak LOCAL_MAILER_FLAGS 3850Sstevel@tonic-gate instead. 3860Sstevel@tonic-gatePROCMAIL_MAILER_ARGS [procmail -Y -m $h $f $u] The arguments passed to 3870Sstevel@tonic-gate the Procmail mailer. This is NOT used by 3880Sstevel@tonic-gate FEATURE(`local_procmail'); tweak LOCAL_MAILER_ARGS 3890Sstevel@tonic-gate instead. 3900Sstevel@tonic-gatePROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that 3910Sstevel@tonic-gate will be accepted by the procmail mailer. 3920Sstevel@tonic-gatePROCMAIL_MAILER_QGRP [undefined] The queue group for the procmail mailer. 3930Sstevel@tonic-gateconfEBINDIR [/usr/libexec] The directory for executables. 3940Sstevel@tonic-gate Currently used for FEATURE(`local_lmtp') and 3950Sstevel@tonic-gate FEATURE(`smrsh'). 3960Sstevel@tonic-gateLOCAL_PROG_QGRP [undefined] The queue group for the prog mailer. 3970Sstevel@tonic-gate 3980Sstevel@tonic-gateNote: to tweak Name_MAILER_FLAGS use the macro MODIFY_MAILER_FLAGS: 399616SjbeckMODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part 400616Sjbeckof the macro Name_MAILER_FLAGS (note: that means Name is entirely in 401616Sjbeckupper case) and change can be: flags that should be used directly 402616Sjbeck(thus overriding the default value), or if it starts with `+' (`-') 403616Sjbeckthen those flags are added to (removed from) the default value. 404616SjbeckExample: 4050Sstevel@tonic-gate 4060Sstevel@tonic-gate MODIFY_MAILER_FLAGS(`LOCAL', `+e') 4070Sstevel@tonic-gate 4080Sstevel@tonic-gatewill add the flag `e' to LOCAL_MAILER_FLAGS. Notice: there are 4090Sstevel@tonic-gateseveral smtp mailers all of which are manipulated individually. 4100Sstevel@tonic-gateSee the section MAILERS for the available mailer names. 4110Sstevel@tonic-gateWARNING: The FEATUREs local_lmtp and local_procmail set LOCAL_MAILER_FLAGS 4120Sstevel@tonic-gateunconditionally, i.e., without respecting any definitions in an 4130Sstevel@tonic-gateOSTYPE setting. 4140Sstevel@tonic-gate 4150Sstevel@tonic-gate 4160Sstevel@tonic-gate+---------+ 4170Sstevel@tonic-gate| DOMAINS | 4180Sstevel@tonic-gate+---------+ 4190Sstevel@tonic-gate 4200Sstevel@tonic-gateYou will probably want to collect domain-dependent defines into one 4210Sstevel@tonic-gatefile, referenced by the DOMAIN macro. For example, the Berkeley 4220Sstevel@tonic-gatedomain file includes definitions for several internal distinguished 4230Sstevel@tonic-gatehosts: 4240Sstevel@tonic-gate 4250Sstevel@tonic-gateUUCP_RELAY The host that will accept UUCP-addressed email. 4260Sstevel@tonic-gate If not defined, all UUCP sites must be directly 4270Sstevel@tonic-gate connected. 4280Sstevel@tonic-gateBITNET_RELAY The host that will accept BITNET-addressed email. 4290Sstevel@tonic-gate If not defined, the .BITNET pseudo-domain won't work. 4300Sstevel@tonic-gateDECNET_RELAY The host that will accept DECNET-addressed email. 4310Sstevel@tonic-gate If not defined, the .DECNET pseudo-domain and addresses 4320Sstevel@tonic-gate of the form node::user will not work. 4330Sstevel@tonic-gateFAX_RELAY The host that will accept mail to the .FAX pseudo-domain. 4340Sstevel@tonic-gate The "fax" mailer overrides this value. 4350Sstevel@tonic-gateLOCAL_RELAY The site that will handle unqualified names -- that 4360Sstevel@tonic-gate is, names without an @domain extension. 4370Sstevel@tonic-gate Normally MAIL_HUB is preferred for this function. 4380Sstevel@tonic-gate LOCAL_RELAY is mostly useful in conjunction with 4390Sstevel@tonic-gate FEATURE(`stickyhost') -- see the discussion of 4400Sstevel@tonic-gate stickyhost below. If not set, they are assumed to 4410Sstevel@tonic-gate belong on this machine. This allows you to have a 4420Sstevel@tonic-gate central site to store a company- or department-wide 4430Sstevel@tonic-gate alias database. This only works at small sites, 4440Sstevel@tonic-gate and only with some user agents. 4450Sstevel@tonic-gateLUSER_RELAY The site that will handle lusers -- that is, apparently 4460Sstevel@tonic-gate local names that aren't local accounts or aliases. To 4470Sstevel@tonic-gate specify a local user instead of a site, set this to 4480Sstevel@tonic-gate ``local:username''. 4490Sstevel@tonic-gate 4500Sstevel@tonic-gateAny of these can be either ``mailer:hostname'' (in which case the 4510Sstevel@tonic-gatemailer is the internal mailer name, such as ``uucp-new'' and the hostname 4520Sstevel@tonic-gateis the name of the host as appropriate for that mailer) or just a 4530Sstevel@tonic-gate``hostname'', in which case a default mailer type (usually ``relay'', 4540Sstevel@tonic-gatea variant on SMTP) is used. WARNING: if you have a wildcard MX 4550Sstevel@tonic-gaterecord matching your domain, you probably want to define these to 4560Sstevel@tonic-gatehave a trailing dot so that you won't get the mail diverted back 4570Sstevel@tonic-gateto yourself. 4580Sstevel@tonic-gate 4590Sstevel@tonic-gateThe domain file can also be used to define a domain name, if needed 4600Sstevel@tonic-gate(using "DD<domain>") and set certain site-wide features. If all hosts 4610Sstevel@tonic-gateat your site masquerade behind one email name, you could also use 4620Sstevel@tonic-gateMASQUERADE_AS here. 4630Sstevel@tonic-gate 4640Sstevel@tonic-gateYou do not have to define a domain -- in particular, if you are a 4650Sstevel@tonic-gatesingle machine sitting off somewhere, it is probably more work than 4660Sstevel@tonic-gateit's worth. This is just a mechanism for combining "domain dependent 4670Sstevel@tonic-gateknowledge" into one place. 4680Sstevel@tonic-gate 4690Sstevel@tonic-gate 4700Sstevel@tonic-gate+---------+ 4710Sstevel@tonic-gate| MAILERS | 4720Sstevel@tonic-gate+---------+ 4730Sstevel@tonic-gate 4740Sstevel@tonic-gateThere are fewer mailers supported in this version than the previous 4750Sstevel@tonic-gateversion, owing mostly to a simpler world. As a general rule, put the 4760Sstevel@tonic-gateMAILER definitions last in your .mc file. 4770Sstevel@tonic-gate 4780Sstevel@tonic-gatelocal The local and prog mailers. You will almost always 4790Sstevel@tonic-gate need these; the only exception is if you relay ALL 4800Sstevel@tonic-gate your mail to another site. This mailer is included 4810Sstevel@tonic-gate automatically. 4820Sstevel@tonic-gate 4830Sstevel@tonic-gatesmtp The Simple Mail Transport Protocol mailer. This does 4840Sstevel@tonic-gate not hide hosts behind a gateway or another other 4850Sstevel@tonic-gate such hack; it assumes a world where everyone is 4860Sstevel@tonic-gate running the name server. This file actually defines 4870Sstevel@tonic-gate five mailers: "smtp" for regular (old-style) SMTP to 4880Sstevel@tonic-gate other servers, "esmtp" for extended SMTP to other 4890Sstevel@tonic-gate servers, "smtp8" to do SMTP to other servers without 4900Sstevel@tonic-gate converting 8-bit data to MIME (essentially, this is 4910Sstevel@tonic-gate your statement that you know the other end is 8-bit 4920Sstevel@tonic-gate clean even if it doesn't say so), "dsmtp" to do on 4930Sstevel@tonic-gate demand delivery, and "relay" for transmission to the 4940Sstevel@tonic-gate RELAY_HOST, LUSER_RELAY, or MAIL_HUB. 4950Sstevel@tonic-gate 4960Sstevel@tonic-gateuucp The UNIX-to-UNIX Copy Program mailer. Actually, this 4970Sstevel@tonic-gate defines two mailers, "uucp-old" (a.k.a. "uucp") and 4980Sstevel@tonic-gate "uucp-new" (a.k.a. "suucp"). The latter is for when you 4990Sstevel@tonic-gate know that the UUCP mailer at the other end can handle 5000Sstevel@tonic-gate multiple recipients in one transfer. If the smtp mailer 5010Sstevel@tonic-gate is included in your configuration, two other mailers 5020Sstevel@tonic-gate ("uucp-dom" and "uucp-uudom") are also defined [warning: you 5030Sstevel@tonic-gate MUST specify MAILER(`smtp') before MAILER(`uucp')]. When you 5040Sstevel@tonic-gate include the uucp mailer, sendmail looks for all names in 5050Sstevel@tonic-gate class {U} and sends them to the uucp-old mailer; all 5060Sstevel@tonic-gate names in class {Y} are sent to uucp-new; and all 5070Sstevel@tonic-gate names in class {Z} are sent to uucp-uudom. Note that 5080Sstevel@tonic-gate this is a function of what version of rmail runs on 5090Sstevel@tonic-gate the receiving end, and hence may be out of your control. 5100Sstevel@tonic-gate See the section below describing UUCP mailers in more 5110Sstevel@tonic-gate detail. 5120Sstevel@tonic-gate 5130Sstevel@tonic-gateprocmail An interface to procmail (does not come with sendmail). 5140Sstevel@tonic-gate This is designed to be used in mailertables. For example, 5150Sstevel@tonic-gate a common question is "how do I forward all mail for a given 5160Sstevel@tonic-gate domain to a single person?". If you have this mailer 5170Sstevel@tonic-gate defined, you could set up a mailertable reading: 5180Sstevel@tonic-gate 5190Sstevel@tonic-gate host.com procmail:/etc/procmailrcs/host.com 5200Sstevel@tonic-gate 5210Sstevel@tonic-gate with the file /etc/procmailrcs/host.com reading: 5220Sstevel@tonic-gate 5230Sstevel@tonic-gate :0 # forward mail for host.com 5240Sstevel@tonic-gate ! -oi -f $1 person@other.host 5250Sstevel@tonic-gate 5260Sstevel@tonic-gate This would arrange for (anything)@host.com to be sent 5270Sstevel@tonic-gate to person@other.host. In a procmail script, $1 is the 5280Sstevel@tonic-gate name of the sender and $2 is the name of the recipient. 5290Sstevel@tonic-gate If you use this with FEATURE(`local_procmail'), the FEATURE 5300Sstevel@tonic-gate should be listed first. 5310Sstevel@tonic-gate 5320Sstevel@tonic-gate Of course there are other ways to solve this particular 5330Sstevel@tonic-gate problem, e.g., a catch-all entry in a virtusertable. 5340Sstevel@tonic-gate 5350Sstevel@tonic-gateThe local mailer accepts addresses of the form "user+detail", where 5360Sstevel@tonic-gatethe "+detail" is not used for mailbox matching but is available 5370Sstevel@tonic-gateto certain local mail programs (in particular, see 5380Sstevel@tonic-gateFEATURE(`local_procmail')). For example, "eric", "eric+sendmail", and 5390Sstevel@tonic-gate"eric+sww" all indicate the same user, but additional arguments <null>, 5400Sstevel@tonic-gate"sendmail", and "sww" may be provided for use in sorting mail. 5410Sstevel@tonic-gate 5420Sstevel@tonic-gate 5430Sstevel@tonic-gate+----------+ 5440Sstevel@tonic-gate| FEATURES | 5450Sstevel@tonic-gate+----------+ 5460Sstevel@tonic-gate 5470Sstevel@tonic-gateSpecial features can be requested using the "FEATURE" macro. For 5480Sstevel@tonic-gateexample, the .mc line: 5490Sstevel@tonic-gate 5500Sstevel@tonic-gate FEATURE(`use_cw_file') 5510Sstevel@tonic-gate 5520Sstevel@tonic-gatetells sendmail that you want to have it read an /etc/mail/local-host-names 5530Sstevel@tonic-gatefile to get values for class {w}. A FEATURE may contain up to 9 5540Sstevel@tonic-gateoptional parameters -- for example: 5550Sstevel@tonic-gate 5560Sstevel@tonic-gate FEATURE(`mailertable', `dbm /usr/lib/mailertable') 5570Sstevel@tonic-gate 5580Sstevel@tonic-gateThe default database map type for the table features can be set with 5590Sstevel@tonic-gate 5600Sstevel@tonic-gate define(`DATABASE_MAP_TYPE', `dbm') 5610Sstevel@tonic-gate 5620Sstevel@tonic-gatewhich would set it to use ndbm databases. The default is the Berkeley DB 5630Sstevel@tonic-gatehash database format. Note that you must still declare a database map type 5640Sstevel@tonic-gateif you specify an argument to a FEATURE. DATABASE_MAP_TYPE is only used 5650Sstevel@tonic-gateif no argument is given for the FEATURE. It must be specified before any 5660Sstevel@tonic-gatefeature that uses a map. 5670Sstevel@tonic-gate 5680Sstevel@tonic-gateAlso, features which can take a map definition as an argument can also take 5690Sstevel@tonic-gatethe special keyword `LDAP'. If that keyword is used, the map will use the 5700Sstevel@tonic-gateLDAP definition described in the ``USING LDAP FOR ALIASES, MAPS, AND 5710Sstevel@tonic-gateCLASSES'' section below. 5720Sstevel@tonic-gate 5730Sstevel@tonic-gateAvailable features are: 5740Sstevel@tonic-gate 5750Sstevel@tonic-gateuse_cw_file Read the file /etc/mail/local-host-names file to get 5760Sstevel@tonic-gate alternate names for this host. This might be used if you 5770Sstevel@tonic-gate were on a host that MXed for a dynamic set of other hosts. 5780Sstevel@tonic-gate If the set is static, just including the line "Cw<name1> 5790Sstevel@tonic-gate <name2> ..." (where the names are fully qualified domain 5800Sstevel@tonic-gate names) is probably superior. The actual filename can be 5810Sstevel@tonic-gate overridden by redefining confCW_FILE. 5820Sstevel@tonic-gate 5830Sstevel@tonic-gateuse_ct_file Read the file /etc/mail/trusted-users file to get the 5840Sstevel@tonic-gate names of users that will be ``trusted'', that is, able to 5850Sstevel@tonic-gate set their envelope from address using -f without generating 5860Sstevel@tonic-gate a warning message. The actual filename can be overridden 5870Sstevel@tonic-gate by redefining confCT_FILE. 5880Sstevel@tonic-gate 5890Sstevel@tonic-gateredirect Reject all mail addressed to "address.REDIRECT" with 5900Sstevel@tonic-gate a ``551 User has moved; please try <address>'' message. 5910Sstevel@tonic-gate If this is set, you can alias people who have left 5920Sstevel@tonic-gate to their new address with ".REDIRECT" appended. 5930Sstevel@tonic-gate 5940Sstevel@tonic-gatenouucp Don't route UUCP addresses. This feature takes one 5950Sstevel@tonic-gate parameter: 5960Sstevel@tonic-gate `reject': reject addresses which have "!" in the local 5970Sstevel@tonic-gate part unless it originates from a system 5980Sstevel@tonic-gate that is allowed to relay. 5990Sstevel@tonic-gate `nospecial': don't do anything special with "!". 6000Sstevel@tonic-gate Warnings: 1. See the notice in the anti-spam section. 6010Sstevel@tonic-gate 2. don't remove "!" from OperatorChars if `reject' is 6020Sstevel@tonic-gate given as parameter. 6030Sstevel@tonic-gate 6040Sstevel@tonic-gatenocanonify Don't pass addresses to $[ ... $] for canonification 6050Sstevel@tonic-gate by default, i.e., host/domain names are considered canonical, 6060Sstevel@tonic-gate except for unqualified names, which must not be used in this 6070Sstevel@tonic-gate mode (violation of the standard). It can be changed by 6080Sstevel@tonic-gate setting the DaemonPortOptions modifiers (M=). That is, 6090Sstevel@tonic-gate FEATURE(`nocanonify') will be overridden by setting the 6100Sstevel@tonic-gate 'c' flag. Conversely, if FEATURE(`nocanonify') is not used, 6110Sstevel@tonic-gate it can be emulated by setting the 'C' flag 6120Sstevel@tonic-gate (DaemonPortOptions=Modifiers=C). This would generally only 6130Sstevel@tonic-gate be used by sites that only act as mail gateways or which have 6140Sstevel@tonic-gate user agents that do full canonification themselves. You may 6150Sstevel@tonic-gate also want to use 6160Sstevel@tonic-gate "define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')" to turn off 6170Sstevel@tonic-gate the usual resolver options that do a similar thing. 6180Sstevel@tonic-gate 6190Sstevel@tonic-gate An exception list for FEATURE(`nocanonify') can be 6200Sstevel@tonic-gate specified with CANONIFY_DOMAIN or CANONIFY_DOMAIN_FILE, 6210Sstevel@tonic-gate i.e., a list of domains which are nevertheless passed to 6220Sstevel@tonic-gate $[ ... $] for canonification. This is useful to turn on 6230Sstevel@tonic-gate canonification for local domains, e.g., use 6240Sstevel@tonic-gate CANONIFY_DOMAIN(`my.domain my') to canonify addresses 6250Sstevel@tonic-gate which end in "my.domain" or "my". 6260Sstevel@tonic-gate Another way to require canonification in the local 6270Sstevel@tonic-gate domain is CANONIFY_DOMAIN(`$=m'). 6280Sstevel@tonic-gate 6290Sstevel@tonic-gate A trailing dot is added to addresses with more than 6300Sstevel@tonic-gate one component in it such that other features which 6310Sstevel@tonic-gate expect a trailing dot (e.g., virtusertable) will 6320Sstevel@tonic-gate still work. 6330Sstevel@tonic-gate 6340Sstevel@tonic-gate If `canonify_hosts' is specified as parameter, i.e., 6350Sstevel@tonic-gate FEATURE(`nocanonify', `canonify_hosts'), then 6360Sstevel@tonic-gate addresses which have only a hostname, e.g., 6370Sstevel@tonic-gate <user@host>, will be canonified (and hopefully fully 6380Sstevel@tonic-gate qualified), too. 6390Sstevel@tonic-gate 6400Sstevel@tonic-gatestickyhost This feature is sometimes used with LOCAL_RELAY, 6410Sstevel@tonic-gate although it can be used for a different effect with 6420Sstevel@tonic-gate MAIL_HUB. 6430Sstevel@tonic-gate 6440Sstevel@tonic-gate When used without MAIL_HUB, email sent to 6450Sstevel@tonic-gate "user@local.host" are marked as "sticky" -- that 6460Sstevel@tonic-gate is, the local addresses aren't matched against UDB, 6470Sstevel@tonic-gate don't go through ruleset 5, and are not forwarded to 6480Sstevel@tonic-gate the LOCAL_RELAY (if defined). 6490Sstevel@tonic-gate 6500Sstevel@tonic-gate With MAIL_HUB, mail addressed to "user@local.host" 6510Sstevel@tonic-gate is forwarded to the mail hub, with the envelope 6520Sstevel@tonic-gate address still remaining "user@local.host". 6530Sstevel@tonic-gate Without stickyhost, the envelope would be changed 6540Sstevel@tonic-gate to "user@mail_hub", in order to protect against 6550Sstevel@tonic-gate mailing loops. 6560Sstevel@tonic-gate 6570Sstevel@tonic-gatemailertable Include a "mailer table" which can be used to override 6580Sstevel@tonic-gate routing for particular domains (which are not in class {w}, 6590Sstevel@tonic-gate i.e. local host names). The argument of the FEATURE may be 6600Sstevel@tonic-gate the key definition. If none is specified, the definition 6610Sstevel@tonic-gate used is: 6620Sstevel@tonic-gate 6630Sstevel@tonic-gate hash /etc/mail/mailertable 6640Sstevel@tonic-gate 6650Sstevel@tonic-gate Keys in this database are fully qualified domain names 6660Sstevel@tonic-gate or partial domains preceded by a dot -- for example, 6670Sstevel@tonic-gate "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". As a 6680Sstevel@tonic-gate special case of the latter, "." matches any domain not 6690Sstevel@tonic-gate covered by other keys. Values must be of the form: 6700Sstevel@tonic-gate mailer:domain 6710Sstevel@tonic-gate where "mailer" is the internal mailer name, and "domain" 6720Sstevel@tonic-gate is where to send the message. These maps are not 6730Sstevel@tonic-gate reflected into the message header. As a special case, 6740Sstevel@tonic-gate the forms: 6750Sstevel@tonic-gate local:user 6760Sstevel@tonic-gate will forward to the indicated user using the local mailer, 6770Sstevel@tonic-gate local: 6780Sstevel@tonic-gate will forward to the original user in the e-mail address 6790Sstevel@tonic-gate using the local mailer, and 6800Sstevel@tonic-gate error:code message 6810Sstevel@tonic-gate error:D.S.N:code message 6820Sstevel@tonic-gate will give an error message with the indicated SMTP reply 6830Sstevel@tonic-gate code and message, where D.S.N is an RFC 1893 compliant 6840Sstevel@tonic-gate error code. 6850Sstevel@tonic-gate 6860Sstevel@tonic-gatedomaintable Include a "domain table" which can be used to provide 6870Sstevel@tonic-gate domain name mapping. Use of this should really be 6880Sstevel@tonic-gate limited to your own domains. It may be useful if you 6890Sstevel@tonic-gate change names (e.g., your company changes names from 6900Sstevel@tonic-gate oldname.com to newname.com). The argument of the 6910Sstevel@tonic-gate FEATURE may be the key definition. If none is specified, 6920Sstevel@tonic-gate the definition used is: 6930Sstevel@tonic-gate 6940Sstevel@tonic-gate hash /etc/mail/domaintable 6950Sstevel@tonic-gate 6960Sstevel@tonic-gate The key in this table is the domain name; the value is 6970Sstevel@tonic-gate the new (fully qualified) domain. Anything in the 6980Sstevel@tonic-gate domaintable is reflected into headers; that is, this 6990Sstevel@tonic-gate is done in ruleset 3. 7000Sstevel@tonic-gate 7010Sstevel@tonic-gatebitdomain Look up bitnet hosts in a table to try to turn them into 7020Sstevel@tonic-gate internet addresses. The table can be built using the 7030Sstevel@tonic-gate bitdomain program contributed by John Gardiner Myers. 7040Sstevel@tonic-gate The argument of the FEATURE may be the key definition; if 7050Sstevel@tonic-gate none is specified, the definition used is: 7060Sstevel@tonic-gate 7070Sstevel@tonic-gate hash /etc/mail/bitdomain 7080Sstevel@tonic-gate 7090Sstevel@tonic-gate Keys are the bitnet hostname; values are the corresponding 7100Sstevel@tonic-gate internet hostname. 7110Sstevel@tonic-gate 7120Sstevel@tonic-gateuucpdomain Similar feature for UUCP hosts. The default map definition 7130Sstevel@tonic-gate is: 7140Sstevel@tonic-gate 7150Sstevel@tonic-gate hash /etc/mail/uudomain 7160Sstevel@tonic-gate 7170Sstevel@tonic-gate At the moment there is no automagic tool to build this 7180Sstevel@tonic-gate database. 7190Sstevel@tonic-gate 7200Sstevel@tonic-gatealways_add_domain 7210Sstevel@tonic-gate Include the local host domain even on locally delivered 7220Sstevel@tonic-gate mail. Normally it is not added on unqualified names. 7230Sstevel@tonic-gate However, if you use a shared message store but do not use 7240Sstevel@tonic-gate the same user name space everywhere, you may need the host 7250Sstevel@tonic-gate name on local names. An optional argument specifies 7260Sstevel@tonic-gate another domain to be added than the local. 7270Sstevel@tonic-gate 7280Sstevel@tonic-gateallmasquerade If masquerading is enabled (using MASQUERADE_AS), this 7290Sstevel@tonic-gate feature will cause recipient addresses to also masquerade 7300Sstevel@tonic-gate as being from the masquerade host. Normally they get 7310Sstevel@tonic-gate the local hostname. Although this may be right for 7320Sstevel@tonic-gate ordinary users, it can break local aliases. For example, 7330Sstevel@tonic-gate if you send to "localalias", the originating sendmail will 7340Sstevel@tonic-gate find that alias and send to all members, but send the 7350Sstevel@tonic-gate message with "To: localalias@masqueradehost". Since that 7360Sstevel@tonic-gate alias likely does not exist, replies will fail. Use this 7370Sstevel@tonic-gate feature ONLY if you can guarantee that the ENTIRE 7380Sstevel@tonic-gate namespace on your masquerade host supersets all the 7390Sstevel@tonic-gate local entries. 7400Sstevel@tonic-gate 7410Sstevel@tonic-gatelimited_masquerade 7420Sstevel@tonic-gate Normally, any hosts listed in class {w} are masqueraded. If 7430Sstevel@tonic-gate this feature is given, only the hosts listed in class {M} (see 7440Sstevel@tonic-gate below: MASQUERADE_DOMAIN) are masqueraded. This is useful 7450Sstevel@tonic-gate if you have several domains with disjoint namespaces hosted 7460Sstevel@tonic-gate on the same machine. 7470Sstevel@tonic-gate 7480Sstevel@tonic-gatemasquerade_entire_domain 7490Sstevel@tonic-gate If masquerading is enabled (using MASQUERADE_AS) and 7500Sstevel@tonic-gate MASQUERADE_DOMAIN (see below) is set, this feature will 7510Sstevel@tonic-gate cause addresses to be rewritten such that the masquerading 7520Sstevel@tonic-gate domains are actually entire domains to be hidden. All 7530Sstevel@tonic-gate hosts within the masquerading domains will be rewritten 7540Sstevel@tonic-gate to the masquerade name (used in MASQUERADE_AS). For example, 7550Sstevel@tonic-gate if you have: 7560Sstevel@tonic-gate 7570Sstevel@tonic-gate MASQUERADE_AS(`masq.com') 7580Sstevel@tonic-gate MASQUERADE_DOMAIN(`foo.org') 7590Sstevel@tonic-gate MASQUERADE_DOMAIN(`bar.com') 7600Sstevel@tonic-gate 7610Sstevel@tonic-gate then *foo.org and *bar.com are converted to masq.com. Without 7620Sstevel@tonic-gate this feature, only foo.org and bar.com are masqueraded. 7630Sstevel@tonic-gate 7640Sstevel@tonic-gate NOTE: only domains within your jurisdiction and 7650Sstevel@tonic-gate current hierarchy should be masqueraded using this. 7660Sstevel@tonic-gate 7670Sstevel@tonic-gatelocal_no_masquerade 7680Sstevel@tonic-gate This feature prevents the local mailer from masquerading even 7690Sstevel@tonic-gate if MASQUERADE_AS is used. MASQUERADE_AS will only have effect 7700Sstevel@tonic-gate on addresses of mail going outside the local domain. 7710Sstevel@tonic-gate 7720Sstevel@tonic-gatemasquerade_envelope 7730Sstevel@tonic-gate If masquerading is enabled (using MASQUERADE_AS) or the 7740Sstevel@tonic-gate genericstable is in use, this feature will cause envelope 7750Sstevel@tonic-gate addresses to also masquerade as being from the masquerade 7760Sstevel@tonic-gate host. Normally only the header addresses are masqueraded. 7770Sstevel@tonic-gate 7780Sstevel@tonic-gategenericstable This feature will cause unqualified addresses (i.e., without 7790Sstevel@tonic-gate a domain) and addresses with a domain listed in class {G} 7800Sstevel@tonic-gate to be looked up in a map and turned into another ("generic") 7810Sstevel@tonic-gate form, which can change both the domain name and the user name. 7820Sstevel@tonic-gate Notice: if you use an MSP (as it is default starting with 7830Sstevel@tonic-gate 8.12), the MTA will only receive qualified addresses from the 7840Sstevel@tonic-gate MSP (as required by the RFCs). Hence you need to add your 7850Sstevel@tonic-gate domain to class {G}. This feature is similar to the userdb 7860Sstevel@tonic-gate functionality. The same types of addresses as for 7870Sstevel@tonic-gate masquerading are looked up, i.e., only header sender 7880Sstevel@tonic-gate addresses unless the allmasquerade and/or masquerade_envelope 7890Sstevel@tonic-gate features are given. Qualified addresses must have the domain 7900Sstevel@tonic-gate part in class {G}; entries can be added to this class by the 7910Sstevel@tonic-gate macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE (analogously 7920Sstevel@tonic-gate to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). 7930Sstevel@tonic-gate 7940Sstevel@tonic-gate The argument of FEATURE(`genericstable') may be the map 7950Sstevel@tonic-gate definition; the default map definition is: 7960Sstevel@tonic-gate 7970Sstevel@tonic-gate hash /etc/mail/genericstable 7980Sstevel@tonic-gate 7990Sstevel@tonic-gate The key for this table is either the full address, the domain 8000Sstevel@tonic-gate (with a leading @; the localpart is passed as first argument) 8010Sstevel@tonic-gate or the unqualified username (tried in the order mentioned); 8020Sstevel@tonic-gate the value is the new user address. If the new user address 8030Sstevel@tonic-gate does not include a domain, it will be qualified in the standard 8040Sstevel@tonic-gate manner, i.e., using $j or the masquerade name. Note that the 8050Sstevel@tonic-gate address being looked up must be fully qualified. For local 8060Sstevel@tonic-gate mail, it is necessary to use FEATURE(`always_add_domain') 8070Sstevel@tonic-gate for the addresses to be qualified. 8080Sstevel@tonic-gate The "+detail" of an address is passed as %1, so entries like 8090Sstevel@tonic-gate 8100Sstevel@tonic-gate old+*@foo.org new+%1@example.com 8110Sstevel@tonic-gate gen+*@foo.org %1@example.com 8120Sstevel@tonic-gate 8130Sstevel@tonic-gate and other forms are possible. 8140Sstevel@tonic-gate 8150Sstevel@tonic-gategenerics_entire_domain 8160Sstevel@tonic-gate If the genericstable is enabled and GENERICS_DOMAIN or 8170Sstevel@tonic-gate GENERICS_DOMAIN_FILE is used, this feature will cause 8180Sstevel@tonic-gate addresses to be searched in the map if their domain 8190Sstevel@tonic-gate parts are subdomains of elements in class {G}. 8200Sstevel@tonic-gate 8210Sstevel@tonic-gatevirtusertable A domain-specific form of aliasing, allowing multiple 8220Sstevel@tonic-gate virtual domains to be hosted on one machine. For example, 823616Sjbeck if the virtuser table contains: 8240Sstevel@tonic-gate 8250Sstevel@tonic-gate info@foo.com foo-info 8260Sstevel@tonic-gate info@bar.com bar-info 8270Sstevel@tonic-gate joe@bar.com error:nouser 550 No such user here 8280Sstevel@tonic-gate jax@bar.com error:5.7.0:550 Address invalid 8290Sstevel@tonic-gate @baz.org jane@example.net 8300Sstevel@tonic-gate 8310Sstevel@tonic-gate then mail addressed to info@foo.com will be sent to the 8320Sstevel@tonic-gate address foo-info, mail addressed to info@bar.com will be 8330Sstevel@tonic-gate delivered to bar-info, and mail addressed to anyone at baz.org 8340Sstevel@tonic-gate will be sent to jane@example.net, mail to joe@bar.com will 8350Sstevel@tonic-gate be rejected with the specified error message, and mail to 8360Sstevel@tonic-gate jax@bar.com will also have a RFC 1893 compliant error code 8370Sstevel@tonic-gate 5.7.0. 8380Sstevel@tonic-gate 8390Sstevel@tonic-gate The username from the original address is passed 8400Sstevel@tonic-gate as %1 allowing: 8410Sstevel@tonic-gate 8420Sstevel@tonic-gate @foo.org %1@example.com 8430Sstevel@tonic-gate 8440Sstevel@tonic-gate meaning someone@foo.org will be sent to someone@example.com. 8450Sstevel@tonic-gate Additionally, if the local part consists of "user+detail" 8460Sstevel@tonic-gate then "detail" is passed as %2 and "+detail" is passed as %3 8470Sstevel@tonic-gate when a match against user+* is attempted, so entries like 8480Sstevel@tonic-gate 8490Sstevel@tonic-gate old+*@foo.org new+%2@example.com 8500Sstevel@tonic-gate gen+*@foo.org %2@example.com 8510Sstevel@tonic-gate +*@foo.org %1%3@example.com 8520Sstevel@tonic-gate X++@foo.org Z%3@example.com 8530Sstevel@tonic-gate @bar.org %1%3 8540Sstevel@tonic-gate 8550Sstevel@tonic-gate and other forms are possible. Note: to preserve "+detail" 8560Sstevel@tonic-gate for a default case (@domain) %1%3 must be used as RHS. 8570Sstevel@tonic-gate There are two wildcards after "+": "+" matches only a non-empty 8580Sstevel@tonic-gate detail, "*" matches also empty details, e.g., user+@foo.org 8590Sstevel@tonic-gate matches +*@foo.org but not ++@foo.org. This can be used 8600Sstevel@tonic-gate to ensure that the parameters %2 and %3 are not empty. 8610Sstevel@tonic-gate 8620Sstevel@tonic-gate All the host names on the left hand side (foo.com, bar.com, 8630Sstevel@tonic-gate and baz.org) must be in class {w} or class {VirtHost}. The 8640Sstevel@tonic-gate latter can be defined by the macros VIRTUSER_DOMAIN or 8650Sstevel@tonic-gate VIRTUSER_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 8660Sstevel@tonic-gate MASQUERADE_DOMAIN_FILE, see below). If VIRTUSER_DOMAIN or 8670Sstevel@tonic-gate VIRTUSER_DOMAIN_FILE is used, then the entries of class 8680Sstevel@tonic-gate {VirtHost} are added to class {R}, i.e., relaying is allowed 8696562Sjbeck to (and from) those domains, which by default includes also 8706562Sjbeck all subdomains (see relay_hosts_only). The default map 8716562Sjbeck definition is: 8720Sstevel@tonic-gate 8730Sstevel@tonic-gate hash /etc/mail/virtusertable 8740Sstevel@tonic-gate 8750Sstevel@tonic-gate A new definition can be specified as the second argument of 8760Sstevel@tonic-gate the FEATURE macro, such as 8770Sstevel@tonic-gate 8780Sstevel@tonic-gate FEATURE(`virtusertable', `dbm /etc/mail/virtusers') 8790Sstevel@tonic-gate 8800Sstevel@tonic-gatevirtuser_entire_domain 8810Sstevel@tonic-gate If the virtusertable is enabled and VIRTUSER_DOMAIN or 8820Sstevel@tonic-gate VIRTUSER_DOMAIN_FILE is used, this feature will cause 8830Sstevel@tonic-gate addresses to be searched in the map if their domain 8840Sstevel@tonic-gate parts are subdomains of elements in class {VirtHost}. 8850Sstevel@tonic-gate 8860Sstevel@tonic-gateldap_routing Implement LDAP-based e-mail recipient routing according to 8870Sstevel@tonic-gate the Internet Draft draft-lachman-laser-ldap-mail-routing-01. 8880Sstevel@tonic-gate This provides a method to re-route addresses with a 8890Sstevel@tonic-gate domain portion in class {LDAPRoute} to either a 8900Sstevel@tonic-gate different mail host or a different address. Hosts can 8910Sstevel@tonic-gate be added to this class using LDAPROUTE_DOMAIN and 8920Sstevel@tonic-gate LDAPROUTE_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 8930Sstevel@tonic-gate MASQUERADE_DOMAIN_FILE, see below). 8940Sstevel@tonic-gate 8950Sstevel@tonic-gate See the LDAP ROUTING section below for more information. 8960Sstevel@tonic-gate 8970Sstevel@tonic-gatenullclient This is a special case -- it creates a configuration file 8980Sstevel@tonic-gate containing nothing but support for forwarding all mail to a 8990Sstevel@tonic-gate central hub via a local SMTP-based network. The argument 9000Sstevel@tonic-gate is the name of that hub. 9010Sstevel@tonic-gate 9020Sstevel@tonic-gate The only other feature that should be used in conjunction 9030Sstevel@tonic-gate with this one is FEATURE(`nocanonify'). No mailers 9040Sstevel@tonic-gate should be defined. No aliasing or forwarding is done. 9050Sstevel@tonic-gate 9060Sstevel@tonic-gatelocal_lmtp Use an LMTP capable local mailer. The argument to this 9070Sstevel@tonic-gate feature is the pathname of an LMTP capable mailer. By 9080Sstevel@tonic-gate default, mail.local is used. This is expected to be the 9090Sstevel@tonic-gate mail.local which came with the 8.9 distribution which is 9100Sstevel@tonic-gate LMTP capable. The path to mail.local is set by the 9110Sstevel@tonic-gate confEBINDIR m4 variable -- making the default 9120Sstevel@tonic-gate LOCAL_MAILER_PATH /usr/libexec/mail.local. 9130Sstevel@tonic-gate If a different LMTP capable mailer is used, its pathname 9140Sstevel@tonic-gate can be specified as second parameter and the arguments 9150Sstevel@tonic-gate passed to it (A=) as third parameter, e.g., 9160Sstevel@tonic-gate 9170Sstevel@tonic-gate FEATURE(`local_lmtp', `/usr/local/bin/lmtp', `lmtp') 9180Sstevel@tonic-gate 9190Sstevel@tonic-gate WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, 9200Sstevel@tonic-gate i.e., without respecting any definitions in an OSTYPE setting. 9210Sstevel@tonic-gate 9220Sstevel@tonic-gatelocal_procmail Use procmail or another delivery agent as the local mailer. 9230Sstevel@tonic-gate The argument to this feature is the pathname of the 9240Sstevel@tonic-gate delivery agent, which defaults to PROCMAIL_MAILER_PATH. 9250Sstevel@tonic-gate Note that this does NOT use PROCMAIL_MAILER_FLAGS or 9260Sstevel@tonic-gate PROCMAIL_MAILER_ARGS for the local mailer; tweak 9270Sstevel@tonic-gate LOCAL_MAILER_FLAGS and LOCAL_MAILER_ARGS instead, or 9280Sstevel@tonic-gate specify the appropriate parameters. When procmail is used, 9290Sstevel@tonic-gate the local mailer can make use of the 9300Sstevel@tonic-gate "user+indicator@local.host" syntax; normally the +indicator 9310Sstevel@tonic-gate is just tossed, but by default it is passed as the -a 9320Sstevel@tonic-gate argument to procmail. 9330Sstevel@tonic-gate 9340Sstevel@tonic-gate This feature can take up to three arguments: 9350Sstevel@tonic-gate 9360Sstevel@tonic-gate 1. Path to the mailer program 9370Sstevel@tonic-gate [default: /usr/local/bin/procmail] 9380Sstevel@tonic-gate 2. Argument vector including name of the program 9390Sstevel@tonic-gate [default: procmail -Y -a $h -d $u] 9400Sstevel@tonic-gate 3. Flags for the mailer [default: SPfhn9] 9410Sstevel@tonic-gate 9420Sstevel@tonic-gate Empty arguments cause the defaults to be taken. 9430Sstevel@tonic-gate Note that if you are on a system with a broken 9440Sstevel@tonic-gate setreuid() call, you may need to add -f $f to the procmail 9450Sstevel@tonic-gate argument vector to pass the proper sender to procmail. 9460Sstevel@tonic-gate 9470Sstevel@tonic-gate For example, this allows it to use the maildrop 9480Sstevel@tonic-gate (http://www.flounder.net/~mrsam/maildrop/) mailer instead 9490Sstevel@tonic-gate by specifying: 9500Sstevel@tonic-gate 9510Sstevel@tonic-gate FEATURE(`local_procmail', `/usr/local/bin/maildrop', 9520Sstevel@tonic-gate `maildrop -d $u') 9530Sstevel@tonic-gate 9540Sstevel@tonic-gate or scanmails using: 9550Sstevel@tonic-gate 9560Sstevel@tonic-gate FEATURE(`local_procmail', `/usr/local/bin/scanmails') 9570Sstevel@tonic-gate 9580Sstevel@tonic-gate WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, 9590Sstevel@tonic-gate i.e., without respecting any definitions in an OSTYPE setting. 9600Sstevel@tonic-gate 9610Sstevel@tonic-gatebestmx_is_local Accept mail as though locally addressed for any host that 9620Sstevel@tonic-gate lists us as the best possible MX record. This generates 9630Sstevel@tonic-gate additional DNS traffic, but should be OK for low to 9640Sstevel@tonic-gate medium traffic hosts. The argument may be a set of 9650Sstevel@tonic-gate domains, which will limit the feature to only apply to 9660Sstevel@tonic-gate these domains -- this will reduce unnecessary DNS 9670Sstevel@tonic-gate traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH 9680Sstevel@tonic-gate WILDCARD MX RECORDS!!! If you have a wildcard MX record 9690Sstevel@tonic-gate that matches your domain, you cannot use this feature. 9700Sstevel@tonic-gate 9710Sstevel@tonic-gatesmrsh Use the SendMail Restricted SHell (smrsh) provided 9720Sstevel@tonic-gate with the distribution instead of /bin/sh for mailing 9730Sstevel@tonic-gate to programs. This improves the ability of the local 9740Sstevel@tonic-gate system administrator to control what gets run via 9750Sstevel@tonic-gate e-mail. If an argument is provided it is used as the 9760Sstevel@tonic-gate pathname to smrsh; otherwise, the path defined by 9770Sstevel@tonic-gate confEBINDIR is used for the smrsh binary -- by default, 9780Sstevel@tonic-gate /usr/libexec/smrsh is assumed. 9790Sstevel@tonic-gate 9800Sstevel@tonic-gatepromiscuous_relay 9810Sstevel@tonic-gate By default, the sendmail configuration files do not permit 9820Sstevel@tonic-gate mail relaying (that is, accepting mail from outside your 9830Sstevel@tonic-gate local host (class {w}) and sending it to another host than 9840Sstevel@tonic-gate your local host). This option sets your site to allow 9850Sstevel@tonic-gate mail relaying from any site to any site. In almost all 9860Sstevel@tonic-gate cases, it is better to control relaying more carefully 9870Sstevel@tonic-gate with the access map, class {R}, or authentication. Domains 9880Sstevel@tonic-gate can be added to class {R} by the macros RELAY_DOMAIN or 9890Sstevel@tonic-gate RELAY_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and 9900Sstevel@tonic-gate MASQUERADE_DOMAIN_FILE, see below). 9910Sstevel@tonic-gate 9920Sstevel@tonic-gaterelay_entire_domain 9930Sstevel@tonic-gate This option allows any host in your domain as defined by 9940Sstevel@tonic-gate class {m} to use your server for relaying. Notice: make 9950Sstevel@tonic-gate sure that your domain is not just a top level domain, 9960Sstevel@tonic-gate e.g., com. This can happen if you give your host a name 9970Sstevel@tonic-gate like example.com instead of host.example.com. 9980Sstevel@tonic-gate 9990Sstevel@tonic-gaterelay_hosts_only 10000Sstevel@tonic-gate By default, names that are listed as RELAY in the access 10010Sstevel@tonic-gate db and class {R} are treated as domain names, not host names. 10020Sstevel@tonic-gate For example, if you specify ``foo.com'', then mail to or 10030Sstevel@tonic-gate from foo.com, abc.foo.com, or a.very.deep.domain.foo.com 10040Sstevel@tonic-gate will all be accepted for relaying. This feature changes 10050Sstevel@tonic-gate the behaviour to lookup individual host names only. 10060Sstevel@tonic-gate 10070Sstevel@tonic-gaterelay_based_on_MX 10080Sstevel@tonic-gate Turns on the ability to allow relaying based on the MX 10090Sstevel@tonic-gate records of the host portion of an incoming recipient; that 10100Sstevel@tonic-gate is, if an MX record for host foo.com points to your site, 10110Sstevel@tonic-gate you will accept and relay mail addressed to foo.com. See 10120Sstevel@tonic-gate description below for more information before using this 10130Sstevel@tonic-gate feature. Also, see the KNOWNBUGS entry regarding bestmx 10140Sstevel@tonic-gate map lookups. 10150Sstevel@tonic-gate 10160Sstevel@tonic-gate FEATURE(`relay_based_on_MX') does not necessarily allow 10170Sstevel@tonic-gate routing of these messages which you expect to be allowed, 10180Sstevel@tonic-gate if route address syntax (or %-hack syntax) is used. If 10190Sstevel@tonic-gate this is a problem, add entries to the access-table or use 10200Sstevel@tonic-gate FEATURE(`loose_relay_check'). 10210Sstevel@tonic-gate 10220Sstevel@tonic-gaterelay_mail_from 10230Sstevel@tonic-gate Allows relaying if the mail sender is listed as RELAY in 10240Sstevel@tonic-gate the access map. If an optional argument `domain' (this 10250Sstevel@tonic-gate is the literal word `domain', not a placeholder) is given, 10260Sstevel@tonic-gate relaying can be allowed just based on the domain portion 10270Sstevel@tonic-gate of the sender address. This feature should only be used if 10280Sstevel@tonic-gate absolutely necessary as the sender address can be easily 10290Sstevel@tonic-gate forged. Use of this feature requires the "From:" tag to 10300Sstevel@tonic-gate be used for the key in the access map; see the discussion 10310Sstevel@tonic-gate of tags and FEATURE(`relay_mail_from') in the section on 10320Sstevel@tonic-gate anti-spam configuration control. 10330Sstevel@tonic-gate 10340Sstevel@tonic-gaterelay_local_from 10350Sstevel@tonic-gate Allows relaying if the domain portion of the mail sender 10360Sstevel@tonic-gate is a local host. This should only be used if absolutely 10370Sstevel@tonic-gate necessary as it opens a window for spammers. Specifically, 10380Sstevel@tonic-gate they can send mail to your mail server that claims to be 10390Sstevel@tonic-gate from your domain (either directly or via a routed address), 10400Sstevel@tonic-gate and you will go ahead and relay it out to arbitrary hosts 10410Sstevel@tonic-gate on the Internet. 10420Sstevel@tonic-gate 10430Sstevel@tonic-gateaccept_unqualified_senders 10440Sstevel@tonic-gate Normally, MAIL FROM: commands in the SMTP session will be 10450Sstevel@tonic-gate refused if the connection is a network connection and the 10460Sstevel@tonic-gate sender address does not include a domain name. If your 1047616Sjbeck setup sends local mail unqualified (i.e., MAIL FROM:<joe>), 10480Sstevel@tonic-gate you will need to use this feature to accept unqualified 10490Sstevel@tonic-gate sender addresses. Setting the DaemonPortOptions modifier 10500Sstevel@tonic-gate 'u' overrides the default behavior, i.e., unqualified 10510Sstevel@tonic-gate addresses are accepted even without this FEATURE. 10520Sstevel@tonic-gate If this FEATURE is not used, the DaemonPortOptions modifier 10530Sstevel@tonic-gate 'f' can be used to enforce fully qualified addresses. 10540Sstevel@tonic-gate 10550Sstevel@tonic-gateaccept_unresolvable_domains 10560Sstevel@tonic-gate Normally, MAIL FROM: commands in the SMTP session will be 10570Sstevel@tonic-gate refused if the host part of the argument to MAIL FROM: 10580Sstevel@tonic-gate cannot be located in the host name service (e.g., an A or 10590Sstevel@tonic-gate MX record in DNS). If you are inside a firewall that has 10600Sstevel@tonic-gate only a limited view of the Internet host name space, this 10610Sstevel@tonic-gate could cause problems. In this case you probably want to 10620Sstevel@tonic-gate use this feature to accept all domains on input, even if 10630Sstevel@tonic-gate they are unresolvable. 10640Sstevel@tonic-gate 10650Sstevel@tonic-gateaccess_db Turns on the access database feature. The access db gives 10660Sstevel@tonic-gate you the ability to allow or refuse to accept mail from 10670Sstevel@tonic-gate specified domains for administrative reasons. Moreover, 10680Sstevel@tonic-gate it can control the behavior of sendmail in various situations. 10690Sstevel@tonic-gate By default, the access database specification is: 10700Sstevel@tonic-gate 10710Sstevel@tonic-gate hash -T<TMPF> /etc/mail/access 10720Sstevel@tonic-gate 10730Sstevel@tonic-gate See the anti-spam configuration control section for further 10740Sstevel@tonic-gate important information about this feature. Notice: 10750Sstevel@tonic-gate "-T<TMPF>" is meant literal, do not replace it by anything. 10760Sstevel@tonic-gate 10770Sstevel@tonic-gateblacklist_recipients 10780Sstevel@tonic-gate Turns on the ability to block incoming mail for certain 10790Sstevel@tonic-gate recipient usernames, hostnames, or addresses. For 10800Sstevel@tonic-gate example, you can block incoming mail to user nobody, 10810Sstevel@tonic-gate host foo.mydomain.com, or guest@bar.mydomain.com. 10820Sstevel@tonic-gate These specifications are put in the access db as 10830Sstevel@tonic-gate described in the anti-spam configuration control section 10840Sstevel@tonic-gate later in this document. 10850Sstevel@tonic-gate 10860Sstevel@tonic-gatedelay_checks The rulesets check_mail and check_relay will not be called 10870Sstevel@tonic-gate when a client connects or issues a MAIL command, respectively. 10880Sstevel@tonic-gate Instead, those rulesets will be called by the check_rcpt 10890Sstevel@tonic-gate ruleset; they will be skipped under certain circumstances. 10900Sstevel@tonic-gate See "Delay all checks" in the anti-spam configuration control 10910Sstevel@tonic-gate section. Note: this feature is incompatible to the versions 10920Sstevel@tonic-gate in 8.10 and 8.11. 10930Sstevel@tonic-gate 10940Sstevel@tonic-gateuse_client_ptr If this feature is enabled then check_relay will override 10950Sstevel@tonic-gate its first argument with $&{client_ptr}. This is useful for 10960Sstevel@tonic-gate rejections based on the unverified hostname of client, 10970Sstevel@tonic-gate which turns on the same behavior as in earlier sendmail 10980Sstevel@tonic-gate versions when delay_checks was not in use. See doc/op/op.* 10990Sstevel@tonic-gate about check_relay, {client_name}, and {client_ptr}. 11000Sstevel@tonic-gate 11013544Sjbeckdnsbl Turns on rejection, discarding, or quarantining of hosts 11023544Sjbeck found in a DNS based list. The first argument is used as 11033544Sjbeck the domain in which blocked hosts are listed. A second 11043544Sjbeck argument can be used to change the default error message, 11053966Sjbeck or select one of the operations `discard' and `quarantine'. 11063544Sjbeck Without that second argument, the error message will be 11073544Sjbeck 11080Sstevel@tonic-gate Rejected: IP-ADDRESS listed at SERVER 11093544Sjbeck 11100Sstevel@tonic-gate where IP-ADDRESS and SERVER are replaced by the appropriate 11110Sstevel@tonic-gate information. By default, temporary lookup failures are 11120Sstevel@tonic-gate ignored. This behavior can be changed by specifying a 11130Sstevel@tonic-gate third argument, which must be either `t' or a full error 11140Sstevel@tonic-gate message. See the anti-spam configuration control section for 11150Sstevel@tonic-gate an example. The dnsbl feature can be included several times 11160Sstevel@tonic-gate to query different DNS based rejection lists. See also 11170Sstevel@tonic-gate enhdnsbl for an enhanced version. 11180Sstevel@tonic-gate 11190Sstevel@tonic-gate Set the DNSBL_MAP mc option to change the default map 11200Sstevel@tonic-gate definition from `host'. Set the DNSBL_MAP_OPT mc option 11210Sstevel@tonic-gate to add additional options to the map specification used. 11220Sstevel@tonic-gate 11230Sstevel@tonic-gate Some DNS based rejection lists cause failures if asked 11240Sstevel@tonic-gate for AAAA records. If your sendmail version is compiled 11250Sstevel@tonic-gate with IPv6 support (NETINET6) and you experience this 11260Sstevel@tonic-gate problem, add 11270Sstevel@tonic-gate 11280Sstevel@tonic-gate define(`DNSBL_MAP', `dns -R A') 11290Sstevel@tonic-gate 11300Sstevel@tonic-gate before the first use of this feature. Alternatively you 11310Sstevel@tonic-gate can use enhdnsbl instead (see below). Moreover, this 11320Sstevel@tonic-gate statement can be used to reduce the number of DNS retries, 11330Sstevel@tonic-gate e.g., 11340Sstevel@tonic-gate 11350Sstevel@tonic-gate define(`DNSBL_MAP', `dns -R A -r2') 11360Sstevel@tonic-gate 11370Sstevel@tonic-gate See below (EDNSBL_TO) for an explanation. 11380Sstevel@tonic-gate 11390Sstevel@tonic-gateenhdnsbl Enhanced version of dnsbl (see above). Further arguments 11400Sstevel@tonic-gate (up to 5) can be used to specify specific return values 11410Sstevel@tonic-gate from lookups. Temporary lookup failures are ignored unless 11420Sstevel@tonic-gate a third argument is given, which must be either `t' or a full 11430Sstevel@tonic-gate error message. By default, any successful lookup will 11440Sstevel@tonic-gate generate an error. Otherwise the result of the lookup is 11450Sstevel@tonic-gate compared with the supplied argument(s), and only if a match 11460Sstevel@tonic-gate occurs an error is generated. For example, 11470Sstevel@tonic-gate 11480Sstevel@tonic-gate FEATURE(`enhdnsbl', `dnsbl.example.com', `', `t', `127.0.0.2.') 11490Sstevel@tonic-gate 11500Sstevel@tonic-gate will reject the e-mail if the lookup returns the value 11510Sstevel@tonic-gate ``127.0.0.2.'', or generate a 451 response if the lookup 11520Sstevel@tonic-gate temporarily failed. The arguments can contain metasymbols 11530Sstevel@tonic-gate as they are allowed in the LHS of rules. As the example 11540Sstevel@tonic-gate shows, the default values are also used if an empty argument, 11550Sstevel@tonic-gate i.e., `', is specified. This feature requires that sendmail 11560Sstevel@tonic-gate has been compiled with the flag DNSMAP (see sendmail/README). 11570Sstevel@tonic-gate 11580Sstevel@tonic-gate Set the EDNSBL_TO mc option to change the DNS retry count 11590Sstevel@tonic-gate from the default value of 5, this can be very useful when 11600Sstevel@tonic-gate a DNS server is not responding, which in turn may cause 11610Sstevel@tonic-gate clients to time out (an entry stating 11620Sstevel@tonic-gate 11630Sstevel@tonic-gate did not issue MAIL/EXPN/VRFY/ETRN 11640Sstevel@tonic-gate 11650Sstevel@tonic-gate will be logged). 11660Sstevel@tonic-gate 11670Sstevel@tonic-gateratecontrol Enable simple ruleset to do connection rate control 11680Sstevel@tonic-gate checking. This requires entries in access_db of the form 11690Sstevel@tonic-gate 11700Sstevel@tonic-gate ClientRate:IP.ADD.RE.SS LIMIT 11710Sstevel@tonic-gate 11720Sstevel@tonic-gate The RHS specifies the maximum number of connections 11730Sstevel@tonic-gate (an integer number) over the time interval defined 11740Sstevel@tonic-gate by ConnectionRateWindowSize, where 0 means unlimited. 11750Sstevel@tonic-gate 11760Sstevel@tonic-gate Take the following example: 11770Sstevel@tonic-gate 11780Sstevel@tonic-gate ClientRate:10.1.2.3 4 11790Sstevel@tonic-gate ClientRate:127.0.0.1 0 11800Sstevel@tonic-gate ClientRate: 10 11810Sstevel@tonic-gate 11820Sstevel@tonic-gate 10.1.2.3 can only make up to 4 connections, the 11830Sstevel@tonic-gate general limit it 10, and 127.0.0.1 can make an unlimited 11840Sstevel@tonic-gate number of connections per ConnectionRateWindowSize. 11850Sstevel@tonic-gate 11860Sstevel@tonic-gate See also CONNECTION CONTROL. 11870Sstevel@tonic-gate 11880Sstevel@tonic-gateconncontrol Enable a simple check of the number of incoming SMTP 11890Sstevel@tonic-gate connections. This requires entries in access_db of the 11900Sstevel@tonic-gate form 11910Sstevel@tonic-gate 11920Sstevel@tonic-gate ClientConn:IP.ADD.RE.SS LIMIT 11930Sstevel@tonic-gate 11940Sstevel@tonic-gate The RHS specifies the maximum number of open connections 11950Sstevel@tonic-gate (an integer number). 11960Sstevel@tonic-gate 11970Sstevel@tonic-gate Take the following example: 11980Sstevel@tonic-gate 11990Sstevel@tonic-gate ClientConn:10.1.2.3 4 12000Sstevel@tonic-gate ClientConn:127.0.0.1 0 12010Sstevel@tonic-gate ClientConn: 10 12020Sstevel@tonic-gate 12030Sstevel@tonic-gate 10.1.2.3 can only have up to 4 open connections, the 12040Sstevel@tonic-gate general limit it 10, and 127.0.0.1 does not have any 12050Sstevel@tonic-gate explicit limit. 12060Sstevel@tonic-gate 12070Sstevel@tonic-gate See also CONNECTION CONTROL. 12080Sstevel@tonic-gate 12090Sstevel@tonic-gatemtamark Experimental support for "Marking Mail Transfer Agents in 12100Sstevel@tonic-gate Reverse DNS with TXT RRs" (MTAMark), see 12110Sstevel@tonic-gate draft-stumpf-dns-mtamark-01. Optional arguments are: 12120Sstevel@tonic-gate 12130Sstevel@tonic-gate 1. Error message, default: 12140Sstevel@tonic-gate 12150Sstevel@tonic-gate 550 Rejected: $&{client_addr} not listed as MTA 12160Sstevel@tonic-gate 12170Sstevel@tonic-gate 2. Temporary lookup failures are ignored unless a second 12180Sstevel@tonic-gate argument is given, which must be either `t' or a full 12190Sstevel@tonic-gate error message. 12200Sstevel@tonic-gate 12210Sstevel@tonic-gate 3. Lookup prefix, default: _perm._smtp._srv. This should 12220Sstevel@tonic-gate not be changed unless the draft changes it. 12230Sstevel@tonic-gate 12240Sstevel@tonic-gate Example: 12250Sstevel@tonic-gate 12260Sstevel@tonic-gate FEATURE(`mtamark', `', `t') 12270Sstevel@tonic-gate 12280Sstevel@tonic-gatelookupdotdomain Look up also .domain in the access map. This allows to 12290Sstevel@tonic-gate match only subdomains. It does not work well with 12300Sstevel@tonic-gate FEATURE(`relay_hosts_only'), because most lookups for 12310Sstevel@tonic-gate subdomains are suppressed by the latter feature. 12320Sstevel@tonic-gate 12330Sstevel@tonic-gateloose_relay_check 12340Sstevel@tonic-gate Normally, if % addressing is used for a recipient, e.g. 12350Sstevel@tonic-gate user%site@othersite, and othersite is in class {R}, the 12360Sstevel@tonic-gate check_rcpt ruleset will strip @othersite and recheck 12370Sstevel@tonic-gate user@site for relaying. This feature changes that 12380Sstevel@tonic-gate behavior. It should not be needed for most installations. 12390Sstevel@tonic-gate 12400Sstevel@tonic-gatepreserve_luser_host 12410Sstevel@tonic-gate Preserve the name of the recipient host if LUSER_RELAY is 12420Sstevel@tonic-gate used. Without this option, the domain part of the 12430Sstevel@tonic-gate recipient address will be replaced by the host specified as 12440Sstevel@tonic-gate LUSER_RELAY. This feature only works if the hostname is 12450Sstevel@tonic-gate passed to the mailer (see mailer triple in op.me). Note 12460Sstevel@tonic-gate that in the default configuration the local mailer does not 12470Sstevel@tonic-gate receive the hostname, i.e., the mailer triple has an empty 12480Sstevel@tonic-gate hostname. 12490Sstevel@tonic-gate 12500Sstevel@tonic-gatepreserve_local_plus_detail 12510Sstevel@tonic-gate Preserve the +detail portion of the address when passing 12520Sstevel@tonic-gate address to local delivery agent. Disables alias and 12530Sstevel@tonic-gate .forward +detail stripping (e.g., given user+detail, only 12540Sstevel@tonic-gate that address will be looked up in the alias file; user+* and 12550Sstevel@tonic-gate user will not be looked up). Only use if the local 12560Sstevel@tonic-gate delivery agent in use supports +detail addressing. 12570Sstevel@tonic-gate 12580Sstevel@tonic-gatecompat_check Enable ruleset check_compat to look up pairs of addresses 12590Sstevel@tonic-gate with the Compat: tag -- Compat:sender<@>recipient -- in the 12600Sstevel@tonic-gate access map. Valid values for the RHS include 12610Sstevel@tonic-gate DISCARD silently discard recipient 12620Sstevel@tonic-gate TEMP: return a temporary error 12630Sstevel@tonic-gate ERROR: return a permanent error 12640Sstevel@tonic-gate In the last two cases, a 4xy/5xy SMTP reply code should 12650Sstevel@tonic-gate follow the colon. 12660Sstevel@tonic-gate 12670Sstevel@tonic-gateno_default_msa Don't generate the default MSA daemon, i.e., 12680Sstevel@tonic-gate DAEMON_OPTIONS(`Port=587,Name=MSA,M=E') 12690Sstevel@tonic-gate To define a MSA daemon with other parameters, use this 12700Sstevel@tonic-gate FEATURE and introduce new settings via DAEMON_OPTIONS(). 12710Sstevel@tonic-gate 12720Sstevel@tonic-gatemsp Defines config file for Message Submission Program. 12730Sstevel@tonic-gate See cf/submit.mc for how 12740Sstevel@tonic-gate to use it. An optional argument can be used to override 12750Sstevel@tonic-gate the default of `[localhost]' to use as host to send all 12760Sstevel@tonic-gate e-mails to. Note that MX records will be used if the 12770Sstevel@tonic-gate specified hostname is not in square brackets (e.g., 12780Sstevel@tonic-gate [hostname]). If `MSA' is specified as second argument then 12790Sstevel@tonic-gate port 587 is used to contact the server. Example: 12800Sstevel@tonic-gate 12810Sstevel@tonic-gate FEATURE(`msp', `', `MSA') 12820Sstevel@tonic-gate 12830Sstevel@tonic-gate Some more hints about possible changes can be found below 12840Sstevel@tonic-gate in the section MESSAGE SUBMISSION PROGRAM. 12850Sstevel@tonic-gate 12860Sstevel@tonic-gate Note: Due to many problems, submit.mc uses 12870Sstevel@tonic-gate 12880Sstevel@tonic-gate FEATURE(`msp', `[127.0.0.1]') 12890Sstevel@tonic-gate 12900Sstevel@tonic-gate by default. If you have a machine with IPv6 only, 12910Sstevel@tonic-gate change it to 12920Sstevel@tonic-gate 12930Sstevel@tonic-gate FEATURE(`msp', `[IPv6:::1]') 12940Sstevel@tonic-gate 12950Sstevel@tonic-gate If you want to continue using '[localhost]', (the behavior 12960Sstevel@tonic-gate up to 8.12.6), use 12970Sstevel@tonic-gate 12980Sstevel@tonic-gate FEATURE(`msp') 12990Sstevel@tonic-gate 13000Sstevel@tonic-gatequeuegroup A simple example how to select a queue group based 13010Sstevel@tonic-gate on the full e-mail address or the domain of the 13020Sstevel@tonic-gate recipient. Selection is done via entries in the 13030Sstevel@tonic-gate access map using the tag QGRP:, for example: 13040Sstevel@tonic-gate 13050Sstevel@tonic-gate QGRP:example.com main 13060Sstevel@tonic-gate QGRP:friend@some.org others 13070Sstevel@tonic-gate QGRP:my.domain local 13080Sstevel@tonic-gate 13090Sstevel@tonic-gate where "main", "others", and "local" are names of 13100Sstevel@tonic-gate queue groups. If an argument is specified, it is used 13110Sstevel@tonic-gate as default queue group. 13120Sstevel@tonic-gate 13130Sstevel@tonic-gate Note: please read the warning in doc/op/op.me about 13140Sstevel@tonic-gate queue groups and possible queue manipulations. 13150Sstevel@tonic-gate 13160Sstevel@tonic-gategreet_pause Adds the greet_pause ruleset which enables open proxy 13170Sstevel@tonic-gate and SMTP slamming protection. The feature can take an 13180Sstevel@tonic-gate argument specifying the milliseconds to wait: 13190Sstevel@tonic-gate 13200Sstevel@tonic-gate FEATURE(`greet_pause', `5000') dnl 5 seconds 13210Sstevel@tonic-gate 13220Sstevel@tonic-gate If FEATURE(`access_db') is enabled, an access database 13230Sstevel@tonic-gate lookup with the GreetPause tag is done using client 13240Sstevel@tonic-gate hostname, domain, IP address, or subnet to determine the 13250Sstevel@tonic-gate pause time: 13260Sstevel@tonic-gate 13270Sstevel@tonic-gate GreetPause:my.domain 0 13280Sstevel@tonic-gate GreetPause:example.com 5000 13290Sstevel@tonic-gate GreetPause:10.1.2 2000 13300Sstevel@tonic-gate GreetPause:127.0.0.1 0 13310Sstevel@tonic-gate 13320Sstevel@tonic-gate When using FEATURE(`access_db'), the optional 13330Sstevel@tonic-gate FEATURE(`greet_pause') argument becomes the default if 13340Sstevel@tonic-gate nothing is found in the access database. A ruleset called 13350Sstevel@tonic-gate Local_greet_pause can be used for local modifications, e.g., 13360Sstevel@tonic-gate 13370Sstevel@tonic-gate LOCAL_RULESETS 13380Sstevel@tonic-gate SLocal_greet_pause 13390Sstevel@tonic-gate R$* $: $&{daemon_flags} 13400Sstevel@tonic-gate R$* a $* $# 0 13410Sstevel@tonic-gate 13423544Sjbeckblock_bad_helo Reject messages from SMTP clients which provide a HELO/EHLO 13433544Sjbeck argument which is either unqualified, or is one of our own 13443544Sjbeck names (i.e., the server name instead of the client name). 13453966Sjbeck This check is performed at RCPT stage and disabled for the 13463966Sjbeck following cases: 13473966Sjbeck - authenticated sessions, 13483966Sjbeck - connections from IP addresses in class $={R}. 13493966Sjbeck Currently access_db lookups can not be used to 13503966Sjbeck (selectively) disable this test, moreover, 13513966Sjbeck FEATURE(`delay_checks') 13523966Sjbeck is required. 13533544Sjbeck 13543544Sjbeckrequire_rdns Reject mail from connecting SMTP clients without proper 13553544Sjbeck rDNS (reverse DNS), functional gethostbyaddr() resolution. 13563966Sjbeck Note: this feature will cause false positives, i.e., there 13573966Sjbeck are legitimate MTAs that do not have proper DNS entries. 13583966Sjbeck Rejecting mails from those MTAs is a local policy decision. 13593544Sjbeck 13603544Sjbeck The basic policy is to reject message with a 5xx error if 13613544Sjbeck the IP address fails to resolve. However, if this is a 13623544Sjbeck temporary failure, a 4xx temporary failure is returned. 13633544Sjbeck If the look-up succeeds, but returns an apparently forged 13643544Sjbeck value, this is treated as a temporary failure with a 4xx 13653544Sjbeck error code. 13663544Sjbeck 13673544Sjbeck EXCEPTIONS: 13683544Sjbeck 13693544Sjbeck Exceptions based on access entries are discussed below. 13703544Sjbeck Any IP address matched using $=R (the "relay-domains" file) 13713544Sjbeck is excepted from the rules. Since we have explicitly 13723544Sjbeck allowed relaying for this host, based on IP address, we 13733544Sjbeck ignore the rDNS failure. 13743544Sjbeck 13753544Sjbeck The philosophical assumption here is that most users do 13763544Sjbeck not control their rDNS. They should be able to send mail 13773544Sjbeck through their ISP, whether or not they have valid rDNS. 13783544Sjbeck The class $=R, roughly speaking, contains those IP addresses 13793544Sjbeck and address ranges for which we are the ISP, or are acting 13803544Sjbeck as if the ISP. 13813544Sjbeck 13823544Sjbeck If `delay_checks' is in effect (recommended), then any 13833544Sjbeck sender who has authenticated is also excepted from the 13843544Sjbeck restrictions. This happens because the rules produced by 13853544Sjbeck this FEATURE() will not be applied to authenticated senders 13863544Sjbeck (assuming `delay_checks'). 13873544Sjbeck 13883544Sjbeck ACCESS MAP ENTRIES: 13893544Sjbeck 13903544Sjbeck Entries such as 13913544Sjbeck Connect:1.2.3.4 OK 13923544Sjbeck Connect:1.2 RELAY 13933544Sjbeck will whitelist IP address 1.2.3.4, so that the rDNS 13943544Sjbeck blocking does apply to that IP address 13953544Sjbeck 13963544Sjbeck Entries such as 13973544Sjbeck Connect:1.2.3.4 REJECT 13983544Sjbeck will have the effect of forcing a temporary failure for 13993544Sjbeck that address to be treated as a permanent failure. 14003544Sjbeck 14013544Sjbeckbadmx Reject envelope sender addresses (MAIL) whose domain part 14023544Sjbeck resolves to a "bad" MX record. By default these are 14033544Sjbeck MX records which resolve to A records that match the 14043544Sjbeck regular expression: 14053544Sjbeck 14063544Sjbeck ^(127\.|10\.|0\.0\.0\.0) 14073544Sjbeck 14083544Sjbeck This default regular expression can be overridden by 14093544Sjbeck specifying an argument, e.g., 14103544Sjbeck 14113544Sjbeck FEATURE(`badmx', `^127\.0\.0\.1') 14123544Sjbeck 14133544Sjbeck Note: this feature requires that the sendmail binary 14143544Sjbeck has been compiled with the options MAP_REGEX and 14153544Sjbeck DNSMAP. 14163544Sjbeck 14170Sstevel@tonic-gate+--------------------+ 14180Sstevel@tonic-gate| USING UUCP MAILERS | 14190Sstevel@tonic-gate+--------------------+ 14200Sstevel@tonic-gate 14210Sstevel@tonic-gateIt's hard to get UUCP mailers right because of the extremely ad hoc 14220Sstevel@tonic-gatenature of UUCP addressing. These config files are really designed 14230Sstevel@tonic-gatefor domain-based addressing, even for UUCP sites. 14240Sstevel@tonic-gate 14250Sstevel@tonic-gateThere are four UUCP mailers available. The choice of which one to 14260Sstevel@tonic-gateuse is partly a matter of local preferences and what is running at 14270Sstevel@tonic-gatethe other end of your UUCP connection. Unlike good protocols that 14280Sstevel@tonic-gatedefine what will go over the wire, UUCP uses the policy that you 14290Sstevel@tonic-gateshould do what is right for the other end; if they change, you have 14300Sstevel@tonic-gateto change. This makes it hard to do the right thing, and discourages 14310Sstevel@tonic-gatepeople from updating their software. In general, if you can avoid 14320Sstevel@tonic-gateUUCP, please do. 14330Sstevel@tonic-gate 14340Sstevel@tonic-gateThe major choice is whether to go for a domainized scheme or a 14350Sstevel@tonic-gatenon-domainized scheme. This depends entirely on what the other 14360Sstevel@tonic-gateend will recognize. If at all possible, you should encourage the 14370Sstevel@tonic-gateother end to go to a domain-based system -- non-domainized addresses 14380Sstevel@tonic-gatedon't work entirely properly. 14390Sstevel@tonic-gate 14400Sstevel@tonic-gateThe four mailers are: 14410Sstevel@tonic-gate 14420Sstevel@tonic-gate uucp-old (obsolete name: "uucp") 14430Sstevel@tonic-gate This is the oldest, the worst (but the closest to UUCP) way of 14440Sstevel@tonic-gate sending messages across UUCP connections. It does bangify 14450Sstevel@tonic-gate everything and prepends $U (your UUCP name) to the sender's 14460Sstevel@tonic-gate address (which can already be a bang path itself). It can 14470Sstevel@tonic-gate only send to one address at a time, so it spends a lot of 14480Sstevel@tonic-gate time copying duplicates of messages. Avoid this if at all 14490Sstevel@tonic-gate possible. 14500Sstevel@tonic-gate 14510Sstevel@tonic-gate uucp-new (obsolete name: "suucp") 14520Sstevel@tonic-gate The same as above, except that it assumes that in one rmail 14530Sstevel@tonic-gate command you can specify several recipients. It still has a 14540Sstevel@tonic-gate lot of other problems. 14550Sstevel@tonic-gate 14560Sstevel@tonic-gate uucp-dom 14570Sstevel@tonic-gate This UUCP mailer keeps everything as domain addresses. 14580Sstevel@tonic-gate Basically, it uses the SMTP mailer rewriting rules. This mailer 14590Sstevel@tonic-gate is only included if MAILER(`smtp') is specified before 14600Sstevel@tonic-gate MAILER(`uucp'). 14610Sstevel@tonic-gate 14620Sstevel@tonic-gate Unfortunately, a lot of UUCP mailer transport agents require 14630Sstevel@tonic-gate bangified addresses in the envelope, although you can use 14640Sstevel@tonic-gate domain-based addresses in the message header. (The envelope 14650Sstevel@tonic-gate shows up as the From_ line on UNIX mail.) So.... 14660Sstevel@tonic-gate 14670Sstevel@tonic-gate uucp-uudom 14680Sstevel@tonic-gate This is a cross between uucp-new (for the envelope addresses) 14690Sstevel@tonic-gate and uucp-dom (for the header addresses). It bangifies the 14700Sstevel@tonic-gate envelope sender (From_ line in messages) without adding the 14710Sstevel@tonic-gate local hostname, unless there is no host name on the address 14720Sstevel@tonic-gate at all (e.g., "wolf") or the host component is a UUCP host name 14730Sstevel@tonic-gate instead of a domain name ("somehost!wolf" instead of 14740Sstevel@tonic-gate "some.dom.ain!wolf"). This is also included only if MAILER(`smtp') 14750Sstevel@tonic-gate is also specified earlier. 14760Sstevel@tonic-gate 14770Sstevel@tonic-gateExamples: 14780Sstevel@tonic-gate 14790Sstevel@tonic-gateOn host grasp.insa-lyon.fr (UUCP host name "grasp"), the following 14800Sstevel@tonic-gatesummarizes the sender rewriting for various mailers. 14810Sstevel@tonic-gate 14820Sstevel@tonic-gateMailer sender rewriting in the envelope 14830Sstevel@tonic-gate------ ------ ------------------------- 14840Sstevel@tonic-gateuucp-{old,new} wolf grasp!wolf 14850Sstevel@tonic-gateuucp-dom wolf wolf@grasp.insa-lyon.fr 14860Sstevel@tonic-gateuucp-uudom wolf grasp.insa-lyon.fr!wolf 14870Sstevel@tonic-gate 14880Sstevel@tonic-gateuucp-{old,new} wolf@fr.net grasp!fr.net!wolf 14890Sstevel@tonic-gateuucp-dom wolf@fr.net wolf@fr.net 14900Sstevel@tonic-gateuucp-uudom wolf@fr.net fr.net!wolf 14910Sstevel@tonic-gate 14920Sstevel@tonic-gateuucp-{old,new} somehost!wolf grasp!somehost!wolf 14930Sstevel@tonic-gateuucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr 14940Sstevel@tonic-gateuucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf 14950Sstevel@tonic-gate 14960Sstevel@tonic-gateIf you are using one of the domainized UUCP mailers, you really want 14970Sstevel@tonic-gateto convert all UUCP addresses to domain format -- otherwise, it will 14980Sstevel@tonic-gatedo it for you (and probably not the way you expected). For example, 14990Sstevel@tonic-gateif you have the address foo!bar!baz (and you are not sending to foo), 15000Sstevel@tonic-gatethe heuristics will add the @uucp.relay.name or @local.host.name to 15010Sstevel@tonic-gatethis address. However, if you map foo to foo.host.name first, it 15020Sstevel@tonic-gatewill not add the local hostname. You can do this using the uucpdomain 15030Sstevel@tonic-gatefeature. 15040Sstevel@tonic-gate 15050Sstevel@tonic-gate 15060Sstevel@tonic-gate+-------------------+ 15070Sstevel@tonic-gate| TWEAKING RULESETS | 15080Sstevel@tonic-gate+-------------------+ 15090Sstevel@tonic-gate 15100Sstevel@tonic-gateFor more complex configurations, you can define special rules. 15110Sstevel@tonic-gateThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing 15120Sstevel@tonic-gatethe names. Any modifications made here are reflected in the header. 15130Sstevel@tonic-gate 15140Sstevel@tonic-gateA common use is to convert old UUCP addresses to SMTP addresses using 15150Sstevel@tonic-gatethe UUCPSMTP macro. For example: 15160Sstevel@tonic-gate 15170Sstevel@tonic-gate LOCAL_RULE_3 15180Sstevel@tonic-gate UUCPSMTP(`decvax', `decvax.dec.com') 15190Sstevel@tonic-gate UUCPSMTP(`research', `research.att.com') 15200Sstevel@tonic-gate 15210Sstevel@tonic-gatewill cause addresses of the form "decvax!user" and "research!user" 15220Sstevel@tonic-gateto be converted to "user@decvax.dec.com" and "user@research.att.com" 15230Sstevel@tonic-gaterespectively. 15240Sstevel@tonic-gate 15250Sstevel@tonic-gateThis could also be used to look up hosts in a database map: 15260Sstevel@tonic-gate 15270Sstevel@tonic-gate LOCAL_RULE_3 15280Sstevel@tonic-gate R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 15290Sstevel@tonic-gate 15300Sstevel@tonic-gateThis map would be defined in the LOCAL_CONFIG portion, as shown below. 15310Sstevel@tonic-gate 15320Sstevel@tonic-gateSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules. 15330Sstevel@tonic-gateFor example, new rules are needed to parse hostnames that you accept 15340Sstevel@tonic-gatevia MX records. For example, you might have: 15350Sstevel@tonic-gate 15360Sstevel@tonic-gate LOCAL_RULE_0 15370Sstevel@tonic-gate R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> 15380Sstevel@tonic-gate 15390Sstevel@tonic-gateYou would use this if you had installed an MX record for cnmat.Berkeley.EDU 15400Sstevel@tonic-gatepointing at this host; this rule catches the message and forwards it on 15410Sstevel@tonic-gateusing UUCP. 15420Sstevel@tonic-gate 15430Sstevel@tonic-gateYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. 15440Sstevel@tonic-gateThese rulesets are normally empty. 15450Sstevel@tonic-gate 15460Sstevel@tonic-gateA similar macro is LOCAL_CONFIG. This introduces lines added after the 15470Sstevel@tonic-gateboilerplate option setting but before rulesets. Do not declare rulesets in 15480Sstevel@tonic-gatethe LOCAL_CONFIG section. It can be used to declare local database maps or 15490Sstevel@tonic-gatewhatever. For example: 15500Sstevel@tonic-gate 15510Sstevel@tonic-gate LOCAL_CONFIG 15520Sstevel@tonic-gate Khostmap hash /etc/mail/hostmap 15530Sstevel@tonic-gate Kyplocal nis -m hosts.byname 15540Sstevel@tonic-gate 15550Sstevel@tonic-gate 15560Sstevel@tonic-gate+---------------------------+ 15570Sstevel@tonic-gate| MASQUERADING AND RELAYING | 15580Sstevel@tonic-gate+---------------------------+ 15590Sstevel@tonic-gate 15600Sstevel@tonic-gateYou can have your host masquerade as another using 15610Sstevel@tonic-gate 15620Sstevel@tonic-gate MASQUERADE_AS(`host.domain') 15630Sstevel@tonic-gate 15640Sstevel@tonic-gateThis causes mail being sent to be labeled as coming from the 15650Sstevel@tonic-gateindicated host.domain, rather than $j. One normally masquerades as 15660Sstevel@tonic-gateone of one's own subdomains (for example, it's unlikely that 15670Sstevel@tonic-gateBerkeley would choose to masquerade as an MIT site). This 15680Sstevel@tonic-gatebehaviour is modified by a plethora of FEATUREs; in particular, see 15690Sstevel@tonic-gatemasquerade_envelope, allmasquerade, limited_masquerade, and 15700Sstevel@tonic-gatemasquerade_entire_domain. 15710Sstevel@tonic-gate 15720Sstevel@tonic-gateThe masquerade name is not normally canonified, so it is important 15730Sstevel@tonic-gatethat it be your One True Name, that is, fully qualified and not a 15740Sstevel@tonic-gateCNAME. However, if you use a CNAME, the receiving side may canonify 15750Sstevel@tonic-gateit for you, so don't think you can cheat CNAME mapping this way. 15760Sstevel@tonic-gate 15770Sstevel@tonic-gateNormally the only addresses that are masqueraded are those that come 15780Sstevel@tonic-gatefrom this host (that is, are either unqualified or in class {w}, the list 15790Sstevel@tonic-gateof local domain names). You can augment this list, which is realized 15800Sstevel@tonic-gateby class {M} using 15810Sstevel@tonic-gate 15820Sstevel@tonic-gate MASQUERADE_DOMAIN(`otherhost.domain') 15830Sstevel@tonic-gate 15840Sstevel@tonic-gateThe effect of this is that although mail to user@otherhost.domain 15850Sstevel@tonic-gatewill not be delivered locally, any mail including any user@otherhost.domain 15860Sstevel@tonic-gatewill, when relayed, be rewritten to have the MASQUERADE_AS address. 15870Sstevel@tonic-gateThis can be a space-separated list of names. 15880Sstevel@tonic-gate 15890Sstevel@tonic-gateIf these names are in a file, you can use 15900Sstevel@tonic-gate 15910Sstevel@tonic-gate MASQUERADE_DOMAIN_FILE(`filename') 15920Sstevel@tonic-gate 15930Sstevel@tonic-gateto read the list of names from the indicated file (i.e., to add 15940Sstevel@tonic-gateelements to class {M}). 15950Sstevel@tonic-gate 15960Sstevel@tonic-gateTo exempt hosts or subdomains from being masqueraded, you can use 15970Sstevel@tonic-gate 15980Sstevel@tonic-gate MASQUERADE_EXCEPTION(`host.domain') 15990Sstevel@tonic-gate 16000Sstevel@tonic-gateThis can come handy if you want to masquerade a whole domain 16010Sstevel@tonic-gateexcept for one (or a few) host(s). If these names are in a file, 16020Sstevel@tonic-gateyou can use 16030Sstevel@tonic-gate 16040Sstevel@tonic-gate MASQUERADE_EXCEPTION_FILE(`filename') 16050Sstevel@tonic-gate 16060Sstevel@tonic-gateNormally only header addresses are masqueraded. If you want to 16070Sstevel@tonic-gatemasquerade the envelope as well, use 16080Sstevel@tonic-gate 16090Sstevel@tonic-gate FEATURE(`masquerade_envelope') 16100Sstevel@tonic-gate 16110Sstevel@tonic-gateThere are always users that need to be "exposed" -- that is, their 16120Sstevel@tonic-gateinternal site name should be displayed instead of the masquerade name. 16130Sstevel@tonic-gateRoot is an example (which has been "exposed" by default prior to 8.10). 16140Sstevel@tonic-gateYou can add users to this list using 16150Sstevel@tonic-gate 16160Sstevel@tonic-gate EXPOSED_USER(`usernames') 16170Sstevel@tonic-gate 16180Sstevel@tonic-gateThis adds users to class {E}; you could also use 16190Sstevel@tonic-gate 16200Sstevel@tonic-gate EXPOSED_USER_FILE(`filename') 16210Sstevel@tonic-gate 16220Sstevel@tonic-gateYou can also arrange to relay all unqualified names (that is, names 16230Sstevel@tonic-gatewithout @host) to a relay host. For example, if you have a central 16240Sstevel@tonic-gateemail server, you might relay to that host so that users don't have 16250Sstevel@tonic-gateto have .forward files or aliases. You can do this using 16260Sstevel@tonic-gate 16270Sstevel@tonic-gate define(`LOCAL_RELAY', `mailer:hostname') 16280Sstevel@tonic-gate 16290Sstevel@tonic-gateThe ``mailer:'' can be omitted, in which case the mailer defaults to 16300Sstevel@tonic-gate"relay". There are some user names that you don't want relayed, perhaps 16310Sstevel@tonic-gatebecause of local aliases. A common example is root, which may be 16320Sstevel@tonic-gatelocally aliased. You can add entries to this list using 16330Sstevel@tonic-gate 16340Sstevel@tonic-gate LOCAL_USER(`usernames') 16350Sstevel@tonic-gate 16360Sstevel@tonic-gateThis adds users to class {L}; you could also use 16370Sstevel@tonic-gate 16380Sstevel@tonic-gate LOCAL_USER_FILE(`filename') 16390Sstevel@tonic-gate 16400Sstevel@tonic-gateIf you want all incoming mail sent to a centralized hub, as for a 16410Sstevel@tonic-gateshared /var/spool/mail scheme, use 16420Sstevel@tonic-gate 16430Sstevel@tonic-gate define(`MAIL_HUB', `mailer:hostname') 16440Sstevel@tonic-gate 16450Sstevel@tonic-gateAgain, ``mailer:'' defaults to "relay". If you define both LOCAL_RELAY 16460Sstevel@tonic-gateand MAIL_HUB _AND_ you have FEATURE(`stickyhost'), unqualified names will 16470Sstevel@tonic-gatebe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB. 16480Sstevel@tonic-gateNote: there is a (long standing) bug which keeps this combination from 16490Sstevel@tonic-gateworking for addresses of the form user+detail. 16500Sstevel@tonic-gateNames in class {L} will be delivered locally, so you MUST have aliases or 16510Sstevel@tonic-gate.forward files for them. 16520Sstevel@tonic-gate 16530Sstevel@tonic-gateFor example, if you are on machine mastodon.CS.Berkeley.EDU and you have 16540Sstevel@tonic-gateFEATURE(`stickyhost'), the following combinations of settings will have the 16550Sstevel@tonic-gateindicated effects: 16560Sstevel@tonic-gate 16570Sstevel@tonic-gateemail sent to.... eric eric@mastodon.CS.Berkeley.EDU 16580Sstevel@tonic-gate 16590Sstevel@tonic-gateLOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) 16600Sstevel@tonic-gatemail.CS.Berkeley.EDU (no local aliasing) (aliasing done) 16610Sstevel@tonic-gate 16620Sstevel@tonic-gateMAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 16630Sstevel@tonic-gatemammoth.CS.Berkeley.EDU (aliasing done) (aliasing done) 16640Sstevel@tonic-gate 16650Sstevel@tonic-gateBoth LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 16660Sstevel@tonic-gateMAIL_HUB set as above (no local aliasing) (aliasing done) 16670Sstevel@tonic-gate 16680Sstevel@tonic-gateIf you do not have FEATURE(`stickyhost') set, then LOCAL_RELAY and 16690Sstevel@tonic-gateMAIL_HUB act identically, with MAIL_HUB taking precedence. 16700Sstevel@tonic-gate 16710Sstevel@tonic-gateIf you want all outgoing mail to go to a central relay site, define 16720Sstevel@tonic-gateSMART_HOST as well. Briefly: 16730Sstevel@tonic-gate 16740Sstevel@tonic-gate LOCAL_RELAY applies to unqualified names (e.g., "eric"). 16750Sstevel@tonic-gate MAIL_HUB applies to names qualified with the name of the 16760Sstevel@tonic-gate local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). 16770Sstevel@tonic-gate SMART_HOST applies to names qualified with other hosts or 16780Sstevel@tonic-gate bracketed addresses (e.g., "eric@mastodon.CS.Berkeley.EDU" 16790Sstevel@tonic-gate or "eric@[127.0.0.1]"). 16800Sstevel@tonic-gate 16810Sstevel@tonic-gateHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, 16820Sstevel@tonic-gateDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you 16830Sstevel@tonic-gatereally want absolutely everything to go to a single central site you will 16840Sstevel@tonic-gateneed to unset all the other relays -- or better yet, find or build a 16850Sstevel@tonic-gateminimal config file that does this. 16860Sstevel@tonic-gate 16870Sstevel@tonic-gateFor duplicate suppression to work properly, the host name is best 16880Sstevel@tonic-gatespecified with a terminal dot: 16890Sstevel@tonic-gate 16900Sstevel@tonic-gate define(`MAIL_HUB', `host.domain.') 16910Sstevel@tonic-gate note the trailing dot ---^ 16920Sstevel@tonic-gate 16930Sstevel@tonic-gate 16940Sstevel@tonic-gate+-------------------------------------------+ 16950Sstevel@tonic-gate| USING LDAP FOR ALIASES, MAPS, AND CLASSES | 16960Sstevel@tonic-gate+-------------------------------------------+ 16970Sstevel@tonic-gate 16980Sstevel@tonic-gateLDAP can be used for aliases, maps, and classes by either specifying your 16990Sstevel@tonic-gateown LDAP map specification or using the built-in default LDAP map 17000Sstevel@tonic-gatespecification. The built-in default specifications all provide lookups 17010Sstevel@tonic-gatewhich match against either the machine's fully qualified hostname (${j}) or 17020Sstevel@tonic-gatea "cluster". The cluster allows you to share LDAP entries among a large 17030Sstevel@tonic-gatenumber of machines without having to enter each of the machine names into 17040Sstevel@tonic-gateeach LDAP entry. To set the LDAP cluster name to use for a particular 17050Sstevel@tonic-gatemachine or set of machines, set the confLDAP_CLUSTER m4 variable to a 17060Sstevel@tonic-gateunique name. For example: 17070Sstevel@tonic-gate 17080Sstevel@tonic-gate define(`confLDAP_CLUSTER', `Servers') 17090Sstevel@tonic-gate 17100Sstevel@tonic-gateHere, the word `Servers' will be the cluster name. As an example, assume 17110Sstevel@tonic-gatethat smtp.sendmail.org, etrn.sendmail.org, and mx.sendmail.org all belong 17120Sstevel@tonic-gateto the Servers cluster. 17130Sstevel@tonic-gate 17140Sstevel@tonic-gateSome of the LDAP LDIF examples below show use of the Servers cluster. 17150Sstevel@tonic-gateEvery entry must have either a sendmailMTAHost or sendmailMTACluster 17160Sstevel@tonic-gateattribute or it will be ignored. Be careful as mixing clusters and 17170Sstevel@tonic-gateindividual host records can have surprising results (see the CAUTION 17180Sstevel@tonic-gatesections below). 17190Sstevel@tonic-gate 17200Sstevel@tonic-gateSee the file cf/sendmail.schema for the actual LDAP schemas. Note that 17210Sstevel@tonic-gatethis schema (and therefore the lookups and examples below) is experimental 17220Sstevel@tonic-gateat this point as it has had little public review. Therefore, it may change 1723616Sjbeckin future versions. Feedback via sendmail-YYYY@support.sendmail.org is 1724616Sjbeckencouraged (replace YYYY with the current year, e.g., 2005). 17250Sstevel@tonic-gate 17260Sstevel@tonic-gate------- 17270Sstevel@tonic-gateAliases 17280Sstevel@tonic-gate------- 17290Sstevel@tonic-gate 17300Sstevel@tonic-gateThe ALIAS_FILE (O AliasFile) option can be set to use LDAP for alias 17310Sstevel@tonic-gatelookups. To use the default schema, simply use: 17320Sstevel@tonic-gate 17330Sstevel@tonic-gate define(`ALIAS_FILE', `ldap:') 17340Sstevel@tonic-gate 17350Sstevel@tonic-gateBy doing so, you will use the default schema which expands to a map 17360Sstevel@tonic-gatedeclared as follows: 17370Sstevel@tonic-gate 17380Sstevel@tonic-gate ldap -k (&(objectClass=sendmailMTAAliasObject) 17390Sstevel@tonic-gate (sendmailMTAAliasGrouping=aliases) 17400Sstevel@tonic-gate (|(sendmailMTACluster=${sendmailMTACluster}) 17410Sstevel@tonic-gate (sendmailMTAHost=$j)) 17420Sstevel@tonic-gate (sendmailMTAKey=%0)) 17430Sstevel@tonic-gate -v sendmailMTAAliasValue,sendmailMTAAliasSearch:FILTER:sendmailMTAAliasObject,sendmailMTAAliasURL:URL:sendmailMTAAliasObject 17440Sstevel@tonic-gate 17450Sstevel@tonic-gate 17460Sstevel@tonic-gateNOTE: The macros shown above ${sendmailMTACluster} and $j are not actually 17470Sstevel@tonic-gateused when the binary expands the `ldap:' token as the AliasFile option is 17480Sstevel@tonic-gatenot actually macro-expanded when read from the sendmail.cf file. 17490Sstevel@tonic-gate 17500Sstevel@tonic-gateExample LDAP LDIF entries might be: 17510Sstevel@tonic-gate 17520Sstevel@tonic-gate dn: sendmailMTAKey=sendmail-list, dc=sendmail, dc=org 17530Sstevel@tonic-gate objectClass: sendmailMTA 17540Sstevel@tonic-gate objectClass: sendmailMTAAlias 17550Sstevel@tonic-gate objectClass: sendmailMTAAliasObject 17560Sstevel@tonic-gate sendmailMTAAliasGrouping: aliases 17570Sstevel@tonic-gate sendmailMTAHost: etrn.sendmail.org 17580Sstevel@tonic-gate sendmailMTAKey: sendmail-list 17590Sstevel@tonic-gate sendmailMTAAliasValue: ca@example.org 17600Sstevel@tonic-gate sendmailMTAAliasValue: eric 17610Sstevel@tonic-gate sendmailMTAAliasValue: gshapiro@example.com 17620Sstevel@tonic-gate 17630Sstevel@tonic-gate dn: sendmailMTAKey=owner-sendmail-list, dc=sendmail, dc=org 17640Sstevel@tonic-gate objectClass: sendmailMTA 17650Sstevel@tonic-gate objectClass: sendmailMTAAlias 17660Sstevel@tonic-gate objectClass: sendmailMTAAliasObject 17670Sstevel@tonic-gate sendmailMTAAliasGrouping: aliases 17680Sstevel@tonic-gate sendmailMTAHost: etrn.sendmail.org 17690Sstevel@tonic-gate sendmailMTAKey: owner-sendmail-list 17700Sstevel@tonic-gate sendmailMTAAliasValue: eric 17710Sstevel@tonic-gate 17720Sstevel@tonic-gate dn: sendmailMTAKey=postmaster, dc=sendmail, dc=org 17730Sstevel@tonic-gate objectClass: sendmailMTA 17740Sstevel@tonic-gate objectClass: sendmailMTAAlias 17750Sstevel@tonic-gate objectClass: sendmailMTAAliasObject 17760Sstevel@tonic-gate sendmailMTAAliasGrouping: aliases 17770Sstevel@tonic-gate sendmailMTACluster: Servers 17780Sstevel@tonic-gate sendmailMTAKey: postmaster 17790Sstevel@tonic-gate sendmailMTAAliasValue: eric 17800Sstevel@tonic-gate 17810Sstevel@tonic-gateHere, the aliases sendmail-list and owner-sendmail-list will be available 17820Sstevel@tonic-gateonly on etrn.sendmail.org but the postmaster alias will be available on 17830Sstevel@tonic-gateevery machine in the Servers cluster (including etrn.sendmail.org). 17840Sstevel@tonic-gate 17850Sstevel@tonic-gateCAUTION: aliases are additive so that entries like these: 17860Sstevel@tonic-gate 17870Sstevel@tonic-gate dn: sendmailMTAKey=bob, dc=sendmail, dc=org 17880Sstevel@tonic-gate objectClass: sendmailMTA 17890Sstevel@tonic-gate objectClass: sendmailMTAAlias 17900Sstevel@tonic-gate objectClass: sendmailMTAAliasObject 17910Sstevel@tonic-gate sendmailMTAAliasGrouping: aliases 17920Sstevel@tonic-gate sendmailMTACluster: Servers 17930Sstevel@tonic-gate sendmailMTAKey: bob 17940Sstevel@tonic-gate sendmailMTAAliasValue: eric 17950Sstevel@tonic-gate 17960Sstevel@tonic-gate dn: sendmailMTAKey=bobetrn, dc=sendmail, dc=org 17970Sstevel@tonic-gate objectClass: sendmailMTA 17980Sstevel@tonic-gate objectClass: sendmailMTAAlias 17990Sstevel@tonic-gate objectClass: sendmailMTAAliasObject 18000Sstevel@tonic-gate sendmailMTAAliasGrouping: aliases 18010Sstevel@tonic-gate sendmailMTAHost: etrn.sendmail.org 18020Sstevel@tonic-gate sendmailMTAKey: bob 18030Sstevel@tonic-gate sendmailMTAAliasValue: gshapiro 18040Sstevel@tonic-gate 18050Sstevel@tonic-gatewould mean that on all of the hosts in the cluster, mail to bob would go to 18060Sstevel@tonic-gateeric EXCEPT on etrn.sendmail.org in which case it would go to BOTH eric and 18070Sstevel@tonic-gategshapiro. 18080Sstevel@tonic-gate 18090Sstevel@tonic-gateIf you prefer not to use the default LDAP schema for your aliases, you can 18100Sstevel@tonic-gatespecify the map parameters when setting ALIAS_FILE. For example: 18110Sstevel@tonic-gate 18120Sstevel@tonic-gate define(`ALIAS_FILE', `ldap:-k (&(objectClass=mailGroup)(mail=%0)) -v mgrpRFC822MailMember') 18130Sstevel@tonic-gate 18140Sstevel@tonic-gate---- 18150Sstevel@tonic-gateMaps 18160Sstevel@tonic-gate---- 18170Sstevel@tonic-gate 18180Sstevel@tonic-gateFEATURE()'s which take an optional map definition argument (e.g., access, 18190Sstevel@tonic-gatemailertable, virtusertable, etc.) can instead take the special keyword 18200Sstevel@tonic-gate`LDAP', e.g.: 18210Sstevel@tonic-gate 18220Sstevel@tonic-gate FEATURE(`access_db', `LDAP') 18230Sstevel@tonic-gate FEATURE(`virtusertable', `LDAP') 18240Sstevel@tonic-gate 18250Sstevel@tonic-gateWhen this keyword is given, that map will use LDAP lookups consisting of 18260Sstevel@tonic-gatethe objectClass sendmailMTAClassObject, the attribute sendmailMTAMapName 18270Sstevel@tonic-gatewith the map name, a search attribute of sendmailMTAKey, and the value 18280Sstevel@tonic-gateattribute sendmailMTAMapValue. 18290Sstevel@tonic-gate 18300Sstevel@tonic-gateThe values for sendmailMTAMapName are: 18310Sstevel@tonic-gate 18320Sstevel@tonic-gate FEATURE() sendmailMTAMapName 18330Sstevel@tonic-gate --------- ------------------ 18340Sstevel@tonic-gate access_db access 18350Sstevel@tonic-gate authinfo authinfo 18360Sstevel@tonic-gate bitdomain bitdomain 18370Sstevel@tonic-gate domaintable domain 18380Sstevel@tonic-gate genericstable generics 18390Sstevel@tonic-gate mailertable mailer 18400Sstevel@tonic-gate uucpdomain uucpdomain 18410Sstevel@tonic-gate virtusertable virtuser 18420Sstevel@tonic-gate 18430Sstevel@tonic-gateFor example, FEATURE(`mailertable', `LDAP') would use the map definition: 18440Sstevel@tonic-gate 18450Sstevel@tonic-gate Kmailertable ldap -k (&(objectClass=sendmailMTAMapObject) 18460Sstevel@tonic-gate (sendmailMTAMapName=mailer) 18470Sstevel@tonic-gate (|(sendmailMTACluster=${sendmailMTACluster}) 18480Sstevel@tonic-gate (sendmailMTAHost=$j)) 18490Sstevel@tonic-gate (sendmailMTAKey=%0)) 18500Sstevel@tonic-gate -1 -v sendmailMTAMapValue,sendmailMTAMapSearch:FILTER:sendmailMTAMapObject,sendmailMTAMapURL:URL:sendmailMTAMapObject 18510Sstevel@tonic-gate 18520Sstevel@tonic-gateAn example LDAP LDIF entry using this map might be: 18530Sstevel@tonic-gate 18540Sstevel@tonic-gate dn: sendmailMTAMapName=mailer, dc=sendmail, dc=org 18550Sstevel@tonic-gate objectClass: sendmailMTA 18560Sstevel@tonic-gate objectClass: sendmailMTAMap 18570Sstevel@tonic-gate sendmailMTACluster: Servers 18580Sstevel@tonic-gate sendmailMTAMapName: mailer 18590Sstevel@tonic-gate 18600Sstevel@tonic-gate dn: sendmailMTAKey=example.com, sendmailMTAMapName=mailer, dc=sendmail, dc=org 18610Sstevel@tonic-gate objectClass: sendmailMTA 18620Sstevel@tonic-gate objectClass: sendmailMTAMap 18630Sstevel@tonic-gate objectClass: sendmailMTAMapObject 18640Sstevel@tonic-gate sendmailMTAMapName: mailer 18650Sstevel@tonic-gate sendmailMTACluster: Servers 18660Sstevel@tonic-gate sendmailMTAKey: example.com 18670Sstevel@tonic-gate sendmailMTAMapValue: relay:[smtp.example.com] 18680Sstevel@tonic-gate 18690Sstevel@tonic-gateCAUTION: If your LDAP database contains the record above and *ALSO* a host 18700Sstevel@tonic-gatespecific record such as: 18710Sstevel@tonic-gate 18720Sstevel@tonic-gate dn: sendmailMTAKey=example.com@etrn, sendmailMTAMapName=mailer, dc=sendmail, dc=org 18730Sstevel@tonic-gate objectClass: sendmailMTA 18740Sstevel@tonic-gate objectClass: sendmailMTAMap 18750Sstevel@tonic-gate objectClass: sendmailMTAMapObject 18760Sstevel@tonic-gate sendmailMTAMapName: mailer 18770Sstevel@tonic-gate sendmailMTAHost: etrn.sendmail.org 18780Sstevel@tonic-gate sendmailMTAKey: example.com 18790Sstevel@tonic-gate sendmailMTAMapValue: relay:[mx.example.com] 18800Sstevel@tonic-gate 18810Sstevel@tonic-gatethen these entries will give unexpected results. When the lookup is done 18820Sstevel@tonic-gateon etrn.sendmail.org, the effect is that there is *NO* match at all as maps 18830Sstevel@tonic-gaterequire a single match. Since the host etrn.sendmail.org is also in the 18840Sstevel@tonic-gateServers cluster, LDAP would return two answers for the example.com map key 18850Sstevel@tonic-gatein which case sendmail would treat this as no match at all. 18860Sstevel@tonic-gate 18870Sstevel@tonic-gateIf you prefer not to use the default LDAP schema for your maps, you can 18880Sstevel@tonic-gatespecify the map parameters when using the FEATURE(). For example: 18890Sstevel@tonic-gate 18900Sstevel@tonic-gate FEATURE(`access_db', `ldap:-1 -k (&(objectClass=mapDatabase)(key=%0)) -v value') 18910Sstevel@tonic-gate 18920Sstevel@tonic-gate------- 18930Sstevel@tonic-gateClasses 18940Sstevel@tonic-gate------- 18950Sstevel@tonic-gate 18960Sstevel@tonic-gateNormally, classes can be filled via files or programs. As of 8.12, they 18970Sstevel@tonic-gatecan also be filled via map lookups using a new syntax: 18980Sstevel@tonic-gate 18990Sstevel@tonic-gate F{ClassName}mapkey@mapclass:mapspec 19000Sstevel@tonic-gate 19010Sstevel@tonic-gatemapkey is optional and if not provided the map key will be empty. This can 19020Sstevel@tonic-gatebe used with LDAP to read classes from LDAP. Note that the lookup is only 19030Sstevel@tonic-gatedone when sendmail is initially started. Use the special value `@LDAP' to 19040Sstevel@tonic-gateuse the default LDAP schema. For example: 19050Sstevel@tonic-gate 19060Sstevel@tonic-gate RELAY_DOMAIN_FILE(`@LDAP') 19070Sstevel@tonic-gate 19080Sstevel@tonic-gatewould put all of the attribute sendmailMTAClassValue values of LDAP records 19090Sstevel@tonic-gatewith objectClass sendmailMTAClass and an attribute sendmailMTAClassName of 19100Sstevel@tonic-gate'R' into class $={R}. In other words, it is equivalent to the LDAP map 19110Sstevel@tonic-gatespecification: 19120Sstevel@tonic-gate 19130Sstevel@tonic-gate F{R}@ldap:-k (&(objectClass=sendmailMTAClass) 19140Sstevel@tonic-gate (sendmailMTAClassName=R) 19150Sstevel@tonic-gate (|(sendmailMTACluster=${sendmailMTACluster}) 19160Sstevel@tonic-gate (sendmailMTAHost=$j))) 19170Sstevel@tonic-gate -v sendmailMTAClassValue,sendmailMTAClassSearch:FILTER:sendmailMTAClass,sendmailMTAClassURL:URL:sendmailMTAClass 19180Sstevel@tonic-gate 19190Sstevel@tonic-gateNOTE: The macros shown above ${sendmailMTACluster} and $j are not actually 19200Sstevel@tonic-gateused when the binary expands the `@LDAP' token as class declarations are 19210Sstevel@tonic-gatenot actually macro-expanded when read from the sendmail.cf file. 19220Sstevel@tonic-gate 19230Sstevel@tonic-gateThis can be used with class related commands such as RELAY_DOMAIN_FILE(), 19240Sstevel@tonic-gateMASQUERADE_DOMAIN_FILE(), etc: 19250Sstevel@tonic-gate 19260Sstevel@tonic-gate Command sendmailMTAClassName 19270Sstevel@tonic-gate ------- -------------------- 19280Sstevel@tonic-gate CANONIFY_DOMAIN_FILE() Canonify 19290Sstevel@tonic-gate EXPOSED_USER_FILE() E 19300Sstevel@tonic-gate GENERICS_DOMAIN_FILE() G 19310Sstevel@tonic-gate LDAPROUTE_DOMAIN_FILE() LDAPRoute 19320Sstevel@tonic-gate LDAPROUTE_EQUIVALENT_FILE() LDAPRouteEquiv 19330Sstevel@tonic-gate LOCAL_USER_FILE() L 19340Sstevel@tonic-gate MASQUERADE_DOMAIN_FILE() M 19350Sstevel@tonic-gate MASQUERADE_EXCEPTION_FILE() N 19360Sstevel@tonic-gate RELAY_DOMAIN_FILE() R 19370Sstevel@tonic-gate VIRTUSER_DOMAIN_FILE() VirtHost 19380Sstevel@tonic-gate 19390Sstevel@tonic-gateYou can also add your own as any 'F'ile class of the form: 19400Sstevel@tonic-gate 19410Sstevel@tonic-gate F{ClassName}@LDAP 19420Sstevel@tonic-gate ^^^^^^^^^ 19430Sstevel@tonic-gatewill use "ClassName" for the sendmailMTAClassName. 19440Sstevel@tonic-gate 19450Sstevel@tonic-gateAn example LDAP LDIF entry would look like: 19460Sstevel@tonic-gate 19470Sstevel@tonic-gate dn: sendmailMTAClassName=R, dc=sendmail, dc=org 19480Sstevel@tonic-gate objectClass: sendmailMTA 19490Sstevel@tonic-gate objectClass: sendmailMTAClass 19500Sstevel@tonic-gate sendmailMTACluster: Servers 19510Sstevel@tonic-gate sendmailMTAClassName: R 19520Sstevel@tonic-gate sendmailMTAClassValue: sendmail.org 19530Sstevel@tonic-gate sendmailMTAClassValue: example.com 19540Sstevel@tonic-gate sendmailMTAClassValue: 10.56.23 19550Sstevel@tonic-gate 19560Sstevel@tonic-gateCAUTION: If your LDAP database contains the record above and *ALSO* a host 19570Sstevel@tonic-gatespecific record such as: 19580Sstevel@tonic-gate 19590Sstevel@tonic-gate dn: sendmailMTAClassName=R@etrn.sendmail.org, dc=sendmail, dc=org 19600Sstevel@tonic-gate objectClass: sendmailMTA 19610Sstevel@tonic-gate objectClass: sendmailMTAClass 19620Sstevel@tonic-gate sendmailMTAHost: etrn.sendmail.org 19630Sstevel@tonic-gate sendmailMTAClassName: R 19640Sstevel@tonic-gate sendmailMTAClassValue: example.com 19650Sstevel@tonic-gate 19660Sstevel@tonic-gatethe result will be similar to the aliases caution above. When the lookup 19670Sstevel@tonic-gateis done on etrn.sendmail.org, $={R} would contain all of the entries (from 19680Sstevel@tonic-gateboth the cluster match and the host match). In other words, the effective 19690Sstevel@tonic-gateis additive. 19700Sstevel@tonic-gate 19710Sstevel@tonic-gateIf you prefer not to use the default LDAP schema for your classes, you can 19720Sstevel@tonic-gatespecify the map parameters when using the class command. For example: 19730Sstevel@tonic-gate 19740Sstevel@tonic-gate VIRTUSER_DOMAIN_FILE(`@ldap:-k (&(objectClass=virtHosts)(host=*)) -v host') 19750Sstevel@tonic-gate 19760Sstevel@tonic-gateRemember, macros can not be used in a class declaration as the binary does 19770Sstevel@tonic-gatenot expand them. 19780Sstevel@tonic-gate 19790Sstevel@tonic-gate 19800Sstevel@tonic-gate+--------------+ 19810Sstevel@tonic-gate| LDAP ROUTING | 19820Sstevel@tonic-gate+--------------+ 19830Sstevel@tonic-gate 19840Sstevel@tonic-gateFEATURE(`ldap_routing') can be used to implement the IETF Internet Draft 19850Sstevel@tonic-gateLDAP Schema for Intranet Mail Routing 19860Sstevel@tonic-gate(draft-lachman-laser-ldap-mail-routing-01). This feature enables 19870Sstevel@tonic-gateLDAP-based rerouting of a particular address to either a different host 19880Sstevel@tonic-gateor a different address. The LDAP lookup is first attempted on the full 19890Sstevel@tonic-gateaddress (e.g., user@example.com) and then on the domain portion 19900Sstevel@tonic-gate(e.g., @example.com). Be sure to setup your domain for LDAP routing using 19910Sstevel@tonic-gateLDAPROUTE_DOMAIN(), e.g.: 19920Sstevel@tonic-gate 19930Sstevel@tonic-gate LDAPROUTE_DOMAIN(`example.com') 19940Sstevel@tonic-gate 19950Sstevel@tonic-gateAdditionally, you can specify equivalent domains for LDAP routing using 19960Sstevel@tonic-gateLDAPROUTE_EQUIVALENT() and LDAPROUTE_EQUIVALENT_FILE(). 'Equivalent' 19970Sstevel@tonic-gatehostnames are mapped to $M (the masqueraded hostname for the server) before 19980Sstevel@tonic-gatethe LDAP query. For example, if the mail is addressed to 19990Sstevel@tonic-gateuser@host1.example.com, normally the LDAP lookup would only be done for 20000Sstevel@tonic-gate'user@host1.example.com' and '@host1.example.com'. However, if 20010Sstevel@tonic-gateLDAPROUTE_EQUIVALENT(`host1.example.com') is used, the lookups would also be 20020Sstevel@tonic-gatedone on 'user@example.com' and '@example.com' after attempting the 20030Sstevel@tonic-gatehost1.example.com lookups. 20040Sstevel@tonic-gate 20050Sstevel@tonic-gateBy default, the feature will use the schemas as specified in the draft 20060Sstevel@tonic-gateand will not reject addresses not found by the LDAP lookup. However, 20070Sstevel@tonic-gatethis behavior can be changed by giving additional arguments to the FEATURE() 20080Sstevel@tonic-gatecommand: 20090Sstevel@tonic-gate 20100Sstevel@tonic-gate FEATURE(`ldap_routing', <mailHost>, <mailRoutingAddress>, <bounce>, 20110Sstevel@tonic-gate <detail>, <nodomain>, <tempfail>) 20120Sstevel@tonic-gate 20130Sstevel@tonic-gatewhere <mailHost> is a map definition describing how to lookup an alternative 20140Sstevel@tonic-gatemail host for a particular address; <mailRoutingAddress> is a map definition 20150Sstevel@tonic-gatedescribing how to lookup an alternative address for a particular address; 20160Sstevel@tonic-gatethe <bounce> argument, if present and not the word "passthru", dictates 20170Sstevel@tonic-gatethat mail should be bounced if neither a mailHost nor mailRoutingAddress 20180Sstevel@tonic-gateis found, if set to "sendertoo", the sender will be rejected if not 20190Sstevel@tonic-gatefound in LDAP; and <detail> indicates what actions to take if the address 20200Sstevel@tonic-gatecontains +detail information -- `strip' tries the lookup with the +detail 20210Sstevel@tonic-gateand if no matches are found, strips the +detail and tries the lookup again; 20220Sstevel@tonic-gate`preserve', does the same as `strip' but if a mailRoutingAddress match is 20230Sstevel@tonic-gatefound, the +detail information is copied to the new address; the <nodomain> 20240Sstevel@tonic-gateargument, if present, will prevent the @domain lookup if the full 20250Sstevel@tonic-gateaddress is not found in LDAP; the <tempfail> argument, if set to 20260Sstevel@tonic-gate"tempfail", instructs the rules to give an SMTP 4XX temporary 20270Sstevel@tonic-gateerror if the LDAP server gives the MTA a temporary failure, or if set to 20280Sstevel@tonic-gate"queue" (the default), the MTA will locally queue the mail. 20290Sstevel@tonic-gate 20300Sstevel@tonic-gateThe default <mailHost> map definition is: 20310Sstevel@tonic-gate 20320Sstevel@tonic-gate ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient) 20330Sstevel@tonic-gate (mailLocalAddress=%0)) 20340Sstevel@tonic-gate 20350Sstevel@tonic-gateThe default <mailRoutingAddress> map definition is: 20360Sstevel@tonic-gate 20370Sstevel@tonic-gate ldap -1 -T<TMPF> -v mailRoutingAddress 20380Sstevel@tonic-gate -k (&(objectClass=inetLocalMailRecipient) 20390Sstevel@tonic-gate (mailLocalAddress=%0)) 20400Sstevel@tonic-gate 20410Sstevel@tonic-gateNote that neither includes the LDAP server hostname (-h server) or base DN 20420Sstevel@tonic-gate(-b o=org,c=COUNTRY), both necessary for LDAP queries. It is presumed that 20430Sstevel@tonic-gateyour .mc file contains a setting for the confLDAP_DEFAULT_SPEC option with 20440Sstevel@tonic-gatethese settings. If this is not the case, the map definitions should be 20450Sstevel@tonic-gatechanged as described above. The "-T<TMPF>" is required in any user 20460Sstevel@tonic-gatespecified map definition to catch temporary errors. 20470Sstevel@tonic-gate 20480Sstevel@tonic-gateThe following possibilities exist as a result of an LDAP lookup on an 20490Sstevel@tonic-gateaddress: 20500Sstevel@tonic-gate 20510Sstevel@tonic-gate mailHost is mailRoutingAddress is Results in 20520Sstevel@tonic-gate ----------- --------------------- ---------- 20530Sstevel@tonic-gate set to a set mail delivered to 20540Sstevel@tonic-gate "local" host mailRoutingAddress 20550Sstevel@tonic-gate 20560Sstevel@tonic-gate set to a not set delivered to 20570Sstevel@tonic-gate "local" host original address 20580Sstevel@tonic-gate 20590Sstevel@tonic-gate set to a set mailRoutingAddress 20600Sstevel@tonic-gate remote host relayed to mailHost 20610Sstevel@tonic-gate 20620Sstevel@tonic-gate set to a not set original address 20630Sstevel@tonic-gate remote host relayed to mailHost 20640Sstevel@tonic-gate 20650Sstevel@tonic-gate not set set mail delivered to 20660Sstevel@tonic-gate mailRoutingAddress 20670Sstevel@tonic-gate 20680Sstevel@tonic-gate not set not set delivered to 20690Sstevel@tonic-gate original address *OR* 20700Sstevel@tonic-gate bounced as unknown user 20710Sstevel@tonic-gate 20720Sstevel@tonic-gateThe term "local" host above means the host specified is in class {w}. If 20730Sstevel@tonic-gatethe result would mean sending the mail to a different host, that host is 20740Sstevel@tonic-gatelooked up in the mailertable before delivery. 20750Sstevel@tonic-gate 20760Sstevel@tonic-gateNote that the last case depends on whether the third argument is given 20770Sstevel@tonic-gateto the FEATURE() command. The default is to deliver the message to the 20780Sstevel@tonic-gateoriginal address. 20790Sstevel@tonic-gate 20800Sstevel@tonic-gateThe LDAP entries should be set up with an objectClass of 20810Sstevel@tonic-gateinetLocalMailRecipient and the address be listed in a mailLocalAddress 20820Sstevel@tonic-gateattribute. If present, there must be only one mailHost attribute and it 20830Sstevel@tonic-gatemust contain a fully qualified host name as its value. Similarly, if 20840Sstevel@tonic-gatepresent, there must be only one mailRoutingAddress attribute and it must 20850Sstevel@tonic-gatecontain an RFC 822 compliant address. Some example LDAP records (in LDIF 20860Sstevel@tonic-gateformat): 20870Sstevel@tonic-gate 20880Sstevel@tonic-gate dn: uid=tom, o=example.com, c=US 20890Sstevel@tonic-gate objectClass: inetLocalMailRecipient 20900Sstevel@tonic-gate mailLocalAddress: tom@example.com 20910Sstevel@tonic-gate mailRoutingAddress: thomas@mailhost.example.com 20920Sstevel@tonic-gate 20930Sstevel@tonic-gateThis would deliver mail for tom@example.com to thomas@mailhost.example.com. 20940Sstevel@tonic-gate 20950Sstevel@tonic-gate dn: uid=dick, o=example.com, c=US 20960Sstevel@tonic-gate objectClass: inetLocalMailRecipient 20970Sstevel@tonic-gate mailLocalAddress: dick@example.com 20980Sstevel@tonic-gate mailHost: eng.example.com 20990Sstevel@tonic-gate 21000Sstevel@tonic-gateThis would relay mail for dick@example.com to the same address but redirect 21010Sstevel@tonic-gatethe mail to MX records listed for the host eng.example.com (unless the 21020Sstevel@tonic-gatemailertable overrides). 21030Sstevel@tonic-gate 21040Sstevel@tonic-gate dn: uid=harry, o=example.com, c=US 21050Sstevel@tonic-gate objectClass: inetLocalMailRecipient 21060Sstevel@tonic-gate mailLocalAddress: harry@example.com 21070Sstevel@tonic-gate mailHost: mktmail.example.com 21080Sstevel@tonic-gate mailRoutingAddress: harry@mkt.example.com 21090Sstevel@tonic-gate 21100Sstevel@tonic-gateThis would relay mail for harry@example.com to the MX records listed for 21110Sstevel@tonic-gatethe host mktmail.example.com using the new address harry@mkt.example.com 21120Sstevel@tonic-gatewhen talking to that host. 21130Sstevel@tonic-gate 21140Sstevel@tonic-gate dn: uid=virtual.example.com, o=example.com, c=US 21150Sstevel@tonic-gate objectClass: inetLocalMailRecipient 21160Sstevel@tonic-gate mailLocalAddress: @virtual.example.com 21170Sstevel@tonic-gate mailHost: server.example.com 21180Sstevel@tonic-gate mailRoutingAddress: virtual@example.com 21190Sstevel@tonic-gate 21200Sstevel@tonic-gateThis would send all mail destined for any username @virtual.example.com to 21210Sstevel@tonic-gatethe machine server.example.com's MX servers and deliver to the address 21220Sstevel@tonic-gatevirtual@example.com on that relay machine. 21230Sstevel@tonic-gate 21240Sstevel@tonic-gate 21250Sstevel@tonic-gate+---------------------------------+ 21260Sstevel@tonic-gate| ANTI-SPAM CONFIGURATION CONTROL | 21270Sstevel@tonic-gate+---------------------------------+ 21280Sstevel@tonic-gate 21290Sstevel@tonic-gateThe primary anti-spam features available in sendmail are: 21300Sstevel@tonic-gate 21310Sstevel@tonic-gate* Relaying is denied by default. 21320Sstevel@tonic-gate* Better checking on sender information. 21330Sstevel@tonic-gate* Access database. 21340Sstevel@tonic-gate* Header checks. 21350Sstevel@tonic-gate 21360Sstevel@tonic-gateRelaying (transmission of messages from a site outside your host (class 21370Sstevel@tonic-gate{w}) to another site except yours) is denied by default. Note that this 21380Sstevel@tonic-gatechanged in sendmail 8.9; previous versions allowed relaying by default. 21390Sstevel@tonic-gateIf you really want to revert to the old behaviour, you will need to use 21400Sstevel@tonic-gateFEATURE(`promiscuous_relay'). You can allow certain domains to relay 21410Sstevel@tonic-gatethrough your server by adding their domain name or IP address to class 21420Sstevel@tonic-gate{R} using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the access database 21430Sstevel@tonic-gate(described below). Note that IPv6 addresses must be prefaced with "IPv6:". 21440Sstevel@tonic-gateThe file consists (like any other file based class) of entries listed on 21450Sstevel@tonic-gateseparate lines, e.g., 21460Sstevel@tonic-gate 21470Sstevel@tonic-gate sendmail.org 21480Sstevel@tonic-gate 128.32 21490Sstevel@tonic-gate IPv6:2002:c0a8:02c7 21500Sstevel@tonic-gate IPv6:2002:c0a8:51d2::23f4 21510Sstevel@tonic-gate host.mydomain.com 21520Sstevel@tonic-gate [UNIX:localhost] 21530Sstevel@tonic-gate 21540Sstevel@tonic-gateNotice: the last entry allows relaying for connections via a UNIX 21550Sstevel@tonic-gatesocket to the MTA/MSP. This might be necessary if your configuration 21560Sstevel@tonic-gatedoesn't allow relaying by other means in that case, e.g., by having 21570Sstevel@tonic-gatelocalhost.$m in class {R} (make sure $m is not just a top level 21580Sstevel@tonic-gatedomain). 21590Sstevel@tonic-gate 21600Sstevel@tonic-gateIf you use 21610Sstevel@tonic-gate 21620Sstevel@tonic-gate FEATURE(`relay_entire_domain') 21630Sstevel@tonic-gate 21640Sstevel@tonic-gatethen any host in any of your local domains (that is, class {m}) 21650Sstevel@tonic-gatewill be relayed (that is, you will accept mail either to or from any 21660Sstevel@tonic-gatehost in your domain). 21670Sstevel@tonic-gate 21680Sstevel@tonic-gateYou can also allow relaying based on the MX records of the host 21690Sstevel@tonic-gateportion of an incoming recipient address by using 21700Sstevel@tonic-gate 21710Sstevel@tonic-gate FEATURE(`relay_based_on_MX') 21720Sstevel@tonic-gate 21730Sstevel@tonic-gateFor example, if your server receives a recipient of user@domain.com 21740Sstevel@tonic-gateand domain.com lists your server in its MX records, the mail will be 21750Sstevel@tonic-gateaccepted for relay to domain.com. This feature may cause problems 21760Sstevel@tonic-gateif MX lookups for the recipient domain are slow or time out. In that 21770Sstevel@tonic-gatecase, mail will be temporarily rejected. It is usually better to 21780Sstevel@tonic-gatemaintain a list of hosts/domains for which the server acts as relay. 21790Sstevel@tonic-gateNote also that this feature will stop spammers from using your host 21800Sstevel@tonic-gateto relay spam but it will not stop outsiders from using your server 21810Sstevel@tonic-gateas a relay for their site (that is, they set up an MX record pointing 21820Sstevel@tonic-gateto your mail server, and you will relay mail addressed to them 21830Sstevel@tonic-gatewithout any prior arrangement). Along the same lines, 21840Sstevel@tonic-gate 21850Sstevel@tonic-gate FEATURE(`relay_local_from') 21860Sstevel@tonic-gate 21870Sstevel@tonic-gatewill allow relaying if the sender specifies a return path (i.e. 2188616SjbeckMAIL FROM:<user@domain>) domain which is a local domain. This is a 21890Sstevel@tonic-gatedangerous feature as it will allow spammers to spam using your mail 21900Sstevel@tonic-gateserver by simply specifying a return address of user@your.domain.com. 21910Sstevel@tonic-gateIt should not be used unless absolutely necessary. 21920Sstevel@tonic-gateA slightly better solution is 21930Sstevel@tonic-gate 21940Sstevel@tonic-gate FEATURE(`relay_mail_from') 21950Sstevel@tonic-gate 21960Sstevel@tonic-gatewhich allows relaying if the mail sender is listed as RELAY in the 21970Sstevel@tonic-gateaccess map. If an optional argument `domain' (this is the literal 21980Sstevel@tonic-gateword `domain', not a placeholder) is given, the domain portion of 21990Sstevel@tonic-gatethe mail sender is also checked to allowing relaying. This option 22000Sstevel@tonic-gateonly works together with the tag From: for the LHS of the access 22010Sstevel@tonic-gatemap entries. This feature allows spammers to abuse your mail server 22020Sstevel@tonic-gateby specifying a return address that you enabled in your access file. 22030Sstevel@tonic-gateThis may be harder to figure out for spammers, but it should not 22040Sstevel@tonic-gatebe used unless necessary. Instead use STARTTLS to 22050Sstevel@tonic-gateallow relaying for roaming users. 22060Sstevel@tonic-gate 22070Sstevel@tonic-gate 22080Sstevel@tonic-gateIf source routing is used in the recipient address (e.g., 2209616SjbeckRCPT TO:<user%site.com@othersite.com>), sendmail will check 22100Sstevel@tonic-gateuser@site.com for relaying if othersite.com is an allowed relay host 22110Sstevel@tonic-gatein either class {R}, class {m} if FEATURE(`relay_entire_domain') is used, 22120Sstevel@tonic-gateor the access database if FEATURE(`access_db') is used. To prevent 22130Sstevel@tonic-gatethe address from being stripped down, use: 22140Sstevel@tonic-gate 22150Sstevel@tonic-gate FEATURE(`loose_relay_check') 22160Sstevel@tonic-gate 22170Sstevel@tonic-gateIf you think you need to use this feature, you probably do not. This 22180Sstevel@tonic-gateshould only be used for sites which have no control over the addresses 22190Sstevel@tonic-gatethat they provide a gateway for. Use this FEATURE with caution as it 22200Sstevel@tonic-gatecan allow spammers to relay through your server if not setup properly. 22210Sstevel@tonic-gate 22220Sstevel@tonic-gateNOTICE: It is possible to relay mail through a system which the anti-relay 22230Sstevel@tonic-gaterules do not prevent: the case of a system that does use FEATURE(`nouucp', 22240Sstevel@tonic-gate`nospecial') (system A) and relays local messages to a mail hub (e.g., via 22250Sstevel@tonic-gateLOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use 22260Sstevel@tonic-gateFEATURE(`nouucp') at all, addresses of the form 22270Sstevel@tonic-gate<example.net!user@local.host> would be relayed to <user@example.net>. 22280Sstevel@tonic-gateSystem A doesn't recognize `!' as an address separator and therefore 22290Sstevel@tonic-gateforwards it to the mail hub which in turns relays it because it came from 22300Sstevel@tonic-gatea trusted local host. So if a mailserver allows UUCP (bang-format) 22310Sstevel@tonic-gateaddresses, all systems from which it allows relaying should do the same 22320Sstevel@tonic-gateor reject those addresses. 22330Sstevel@tonic-gate 22340Sstevel@tonic-gateAs of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has 22350Sstevel@tonic-gatean unresolvable domain (i.e., one that DNS, your local name service, 22360Sstevel@tonic-gateor special case rules in ruleset 3 cannot locate). This also applies 22370Sstevel@tonic-gateto addresses that use domain literals, e.g., <user@[1.2.3.4]>, if the 22380Sstevel@tonic-gateIP address can't be mapped to a host name. If you want to continue 22390Sstevel@tonic-gateto accept such domains, e.g., because you are inside a firewall that 22400Sstevel@tonic-gatehas only a limited view of the Internet host name space (note that you 22410Sstevel@tonic-gatewill not be able to return mail to them unless you have some "smart 22420Sstevel@tonic-gatehost" forwarder), use 22430Sstevel@tonic-gate 22440Sstevel@tonic-gate FEATURE(`accept_unresolvable_domains') 22450Sstevel@tonic-gate 22460Sstevel@tonic-gateAlternatively, you can allow specific addresses by adding them to 22470Sstevel@tonic-gatethe access map, e.g., 22480Sstevel@tonic-gate 22490Sstevel@tonic-gate From:unresolvable.domain OK 22500Sstevel@tonic-gate From:[1.2.3.4] OK 22510Sstevel@tonic-gate From:[1.2.4] OK 22520Sstevel@tonic-gate 22530Sstevel@tonic-gateNotice: domains which are temporarily unresolvable are (temporarily) 22540Sstevel@tonic-gaterejected with a 451 reply code. If those domains should be accepted 22550Sstevel@tonic-gate(which is discouraged) then you can use 22560Sstevel@tonic-gate 22570Sstevel@tonic-gate LOCAL_CONFIG 22580Sstevel@tonic-gate C{ResOk}TEMP 22590Sstevel@tonic-gate 22600Sstevel@tonic-gatesendmail will also refuse mail if the MAIL FROM: parameter is not 22610Sstevel@tonic-gatefully qualified (i.e., contains a domain as well as a user). If you 22620Sstevel@tonic-gatewant to continue to accept such senders, use 22630Sstevel@tonic-gate 22640Sstevel@tonic-gate FEATURE(`accept_unqualified_senders') 22650Sstevel@tonic-gate 22660Sstevel@tonic-gateSetting the DaemonPortOptions modifier 'u' overrides the default behavior, 22670Sstevel@tonic-gatei.e., unqualified addresses are accepted even without this FEATURE. If 22680Sstevel@tonic-gatethis FEATURE is not used, the DaemonPortOptions modifier 'f' can be used 22690Sstevel@tonic-gateto enforce fully qualified domain names. 22700Sstevel@tonic-gate 22710Sstevel@tonic-gateAn ``access'' database can be created to accept or reject mail from 22720Sstevel@tonic-gateselected domains. For example, you may choose to reject all mail 22730Sstevel@tonic-gateoriginating from known spammers. To enable such a database, use 22740Sstevel@tonic-gate 22750Sstevel@tonic-gate FEATURE(`access_db') 22760Sstevel@tonic-gate 22770Sstevel@tonic-gateNotice: the access database is applied to the envelope addresses 22780Sstevel@tonic-gateand the connection information, not to the header. 22790Sstevel@tonic-gate 22800Sstevel@tonic-gateThe FEATURE macro can accept as second parameter the key file 22810Sstevel@tonic-gatedefinition for the database; for example 22820Sstevel@tonic-gate 22830Sstevel@tonic-gate FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access_map') 22840Sstevel@tonic-gate 22850Sstevel@tonic-gateNotice: If a second argument is specified it must contain the option 22863544Sjbeck`-T<TMPF>' as shown above. The optional parameters may be 22873544Sjbeck 22883544Sjbeck `skip' enables SKIP as value part (see below). 22893544Sjbeck `lookupdotdomain' another way to enable the feature of the 22903544Sjbeck same name (see above). 22913544Sjbeck `relaytofulladdress' enable entries of the form 22923544Sjbeck To:user@example.com RELAY 22933544Sjbeck to allow relaying to just a specific 22943544Sjbeck e-mail address instead of an entire domain. 22950Sstevel@tonic-gate 22960Sstevel@tonic-gateRemember, since /etc/mail/access is a database, after creating the text 22970Sstevel@tonic-gatefile as described below, you must use makemap to create the database 22980Sstevel@tonic-gatemap. For example: 22990Sstevel@tonic-gate 23000Sstevel@tonic-gate makemap hash /etc/mail/access < /etc/mail/access 23010Sstevel@tonic-gate 23020Sstevel@tonic-gateThe table itself uses e-mail addresses, domain names, and network 23030Sstevel@tonic-gatenumbers as keys. Note that IPv6 addresses must be prefaced with "IPv6:". 23040Sstevel@tonic-gateFor example, 23050Sstevel@tonic-gate 23060Sstevel@tonic-gate From:spammer@aol.com REJECT 23070Sstevel@tonic-gate From:cyberspammer.com REJECT 23080Sstevel@tonic-gate Connect:cyberspammer.com REJECT 23090Sstevel@tonic-gate Connect:TLD REJECT 23100Sstevel@tonic-gate Connect:192.168.212 REJECT 23110Sstevel@tonic-gate Connect:IPv6:2002:c0a8:02c7 RELAY 23120Sstevel@tonic-gate Connect:IPv6:2002:c0a8:51d2::23f4 REJECT 23130Sstevel@tonic-gate 23140Sstevel@tonic-gatewould refuse mail from spammer@aol.com, any user from cyberspammer.com 23150Sstevel@tonic-gate(or any host within the cyberspammer.com domain), any host in the entire 23160Sstevel@tonic-gatetop level domain TLD, 192.168.212.* network, and the IPv6 address 23170Sstevel@tonic-gate2002:c0a8:51d2::23f4. It would allow relay for the IPv6 network 23180Sstevel@tonic-gate2002:c0a8:02c7::/48. 23190Sstevel@tonic-gate 23200Sstevel@tonic-gateEntries in the access map should be tagged according to their type. 23210Sstevel@tonic-gateThree tags are available: 23220Sstevel@tonic-gate 23230Sstevel@tonic-gate Connect: connection information (${client_addr}, ${client_name}) 23240Sstevel@tonic-gate From: envelope sender 23250Sstevel@tonic-gate To: envelope recipient 23260Sstevel@tonic-gate 23270Sstevel@tonic-gateNotice: untagged entries are deprecated. 23280Sstevel@tonic-gate 23290Sstevel@tonic-gateIf the required item is looked up in a map, it will be tried first 23300Sstevel@tonic-gatewith the corresponding tag in front, then (as fallback to enable 23310Sstevel@tonic-gatebackward compatibility) without any tag, unless the specific feature 23320Sstevel@tonic-gaterequires a tag. For example, 23330Sstevel@tonic-gate 23340Sstevel@tonic-gate From:spammer@some.dom REJECT 23350Sstevel@tonic-gate To:friend.domain RELAY 23360Sstevel@tonic-gate Connect:friend.domain OK 23370Sstevel@tonic-gate Connect:from.domain RELAY 23380Sstevel@tonic-gate From:good@another.dom OK 23390Sstevel@tonic-gate From:another.dom REJECT 23400Sstevel@tonic-gate 23410Sstevel@tonic-gateThis would deny mails from spammer@some.dom but you could still 23420Sstevel@tonic-gatesend mail to that address even if FEATURE(`blacklist_recipients') 23430Sstevel@tonic-gateis enabled. Your system will allow relaying to friend.domain, but 23440Sstevel@tonic-gatenot from it (unless enabled by other means). Connections from that 23450Sstevel@tonic-gatedomain will be allowed even if it ends up in one of the DNS based 23460Sstevel@tonic-gaterejection lists. Relaying is enabled from from.domain but not to 23470Sstevel@tonic-gateit (since relaying is based on the connection information for 23480Sstevel@tonic-gateoutgoing relaying, the tag Connect: must be used; for incoming 23490Sstevel@tonic-gaterelaying, which is based on the recipient address, To: must be 23500Sstevel@tonic-gateused). The last two entries allow mails from good@another.dom but 23510Sstevel@tonic-gatereject mail from all other addresses with another.dom as domain 23520Sstevel@tonic-gatepart. 23530Sstevel@tonic-gate 23540Sstevel@tonic-gate 23550Sstevel@tonic-gateThe value part of the map can contain: 23560Sstevel@tonic-gate 23570Sstevel@tonic-gate OK Accept mail even if other rules in the running 23580Sstevel@tonic-gate ruleset would reject it, for example, if the domain 23590Sstevel@tonic-gate name is unresolvable. "Accept" does not mean 23600Sstevel@tonic-gate "relay", but at most acceptance for local 23610Sstevel@tonic-gate recipients. That is, OK allows less than RELAY. 23623544Sjbeck RELAY Accept mail addressed to the indicated domain 23633544Sjbeck (or address if `relaytofulladdress' is set) or 23640Sstevel@tonic-gate received from the indicated domain for relaying 23650Sstevel@tonic-gate through your SMTP server. RELAY also serves as 23660Sstevel@tonic-gate an implicit OK for the other checks. 23670Sstevel@tonic-gate REJECT Reject the sender or recipient with a general 23680Sstevel@tonic-gate purpose message. 23690Sstevel@tonic-gate DISCARD Discard the message completely using the 23700Sstevel@tonic-gate $#discard mailer. If it is used in check_compat, 23710Sstevel@tonic-gate it affects only the designated recipient, not 23720Sstevel@tonic-gate the whole message as it does in all other cases. 23730Sstevel@tonic-gate This should only be used if really necessary. 23740Sstevel@tonic-gate SKIP This can only be used for host/domain names 23750Sstevel@tonic-gate and IP addresses/nets. It will abort the current 23760Sstevel@tonic-gate search for this entry without accepting or rejecting 23770Sstevel@tonic-gate it but causing the default action. 23780Sstevel@tonic-gate ### any text where ### is an RFC 821 compliant error code and 23790Sstevel@tonic-gate "any text" is a message to return for the command. 23801658Sjbeck The entire string should be quoted to avoid 23811658Sjbeck surprises: 23821658Sjbeck 23831658Sjbeck "### any text" 23841658Sjbeck 23851658Sjbeck Otherwise sendmail formats the text as email 23861658Sjbeck addresses, e.g., it may remove spaces. 23870Sstevel@tonic-gate This type is deprecated, use one of the two 23880Sstevel@tonic-gate ERROR: entries below instead. 23890Sstevel@tonic-gate ERROR:### any text 23900Sstevel@tonic-gate as above, but useful to mark error messages as such. 23911658Sjbeck If quotes need to be used to avoid modifications 23921658Sjbeck (see above), they should be placed like this: 23931658Sjbeck 23941658Sjbeck ERROR:"### any text" 23951658Sjbeck 23960Sstevel@tonic-gate ERROR:D.S.N:### any text 23970Sstevel@tonic-gate where D.S.N is an RFC 1893 compliant error code 23981658Sjbeck and the rest as above. If quotes need to be used 23991658Sjbeck to avoid modifications, they should be placed 24001658Sjbeck like this: 24011658Sjbeck 24021658Sjbeck ERROR:D.S.N:"### any text" 24031658Sjbeck 24040Sstevel@tonic-gate QUARANTINE:any text 24050Sstevel@tonic-gate Quarantine the message using the given text as the 24060Sstevel@tonic-gate quarantining reason. 24070Sstevel@tonic-gate 24080Sstevel@tonic-gateFor example: 24090Sstevel@tonic-gate 24100Sstevel@tonic-gate From:cyberspammer.com ERROR:"550 We don't accept mail from spammers" 24110Sstevel@tonic-gate From:okay.cyberspammer.com OK 24120Sstevel@tonic-gate Connect:sendmail.org RELAY 24130Sstevel@tonic-gate To:sendmail.org RELAY 24140Sstevel@tonic-gate Connect:128.32 RELAY 24150Sstevel@tonic-gate Connect:128.32.2 SKIP 24160Sstevel@tonic-gate Connect:IPv6:1:2:3:4:5:6:7 RELAY 24170Sstevel@tonic-gate Connect:suspicious.example.com QUARANTINE:Mail from suspicious host 24180Sstevel@tonic-gate Connect:[127.0.0.3] OK 24190Sstevel@tonic-gate Connect:[IPv6:1:2:3:4:5:6:7:8] OK 24200Sstevel@tonic-gate 24210Sstevel@tonic-gatewould accept mail from okay.cyberspammer.com, but would reject mail 24220Sstevel@tonic-gatefrom all other hosts at cyberspammer.com with the indicated message. 24230Sstevel@tonic-gateIt would allow relaying mail from and to any hosts in the sendmail.org 24240Sstevel@tonic-gatedomain, and allow relaying from the IPv6 1:2:3:4:5:6:7:* network 24250Sstevel@tonic-gateand from the 128.32.*.* network except for the 128.32.2.* network, 24260Sstevel@tonic-gatewhich shows how SKIP is useful to exempt subnets/subdomains. The 24270Sstevel@tonic-gatelast two entries are for checks against ${client_name} if the IP 24280Sstevel@tonic-gateaddress doesn't resolve to a hostname (or is considered as "may be 24290Sstevel@tonic-gateforged"). That is, using square brackets means these are host 24300Sstevel@tonic-gatenames, not network numbers. 24310Sstevel@tonic-gate 24320Sstevel@tonic-gateWarning: if you change the RFC 821 compliant error code from the default 24330Sstevel@tonic-gatevalue of 550, then you should probably also change the RFC 1893 compliant 24340Sstevel@tonic-gateerror code to match it. For example, if you use 24350Sstevel@tonic-gate 24360Sstevel@tonic-gate To:user@example.com ERROR:450 mailbox full 24370Sstevel@tonic-gate 24380Sstevel@tonic-gatethe error returned would be "450 5.0.0 mailbox full" which is wrong. 24390Sstevel@tonic-gateUse "ERROR:4.2.2:450 mailbox full" instead. 24400Sstevel@tonic-gate 24410Sstevel@tonic-gateNote, UUCP users may need to add hostname.UUCP to the access database 24420Sstevel@tonic-gateor class {R}. 24430Sstevel@tonic-gate 24440Sstevel@tonic-gateIf you also use: 24450Sstevel@tonic-gate 24460Sstevel@tonic-gate FEATURE(`relay_hosts_only') 24470Sstevel@tonic-gate 24480Sstevel@tonic-gatethen the above example will allow relaying for sendmail.org, but not 24490Sstevel@tonic-gatehosts within the sendmail.org domain. Note that this will also require 24500Sstevel@tonic-gatehosts listed in class {R} to be fully qualified host names. 24510Sstevel@tonic-gate 24520Sstevel@tonic-gateYou can also use the access database to block sender addresses based on 24530Sstevel@tonic-gatethe username portion of the address. For example: 24540Sstevel@tonic-gate 24550Sstevel@tonic-gate From:FREE.STEALTH.MAILER@ ERROR:550 Spam not accepted 24560Sstevel@tonic-gate 24570Sstevel@tonic-gateNote that you must include the @ after the username to signify that 24580Sstevel@tonic-gatethis database entry is for checking only the username portion of the 24590Sstevel@tonic-gatesender address. 24600Sstevel@tonic-gate 24610Sstevel@tonic-gateIf you use: 24620Sstevel@tonic-gate 24630Sstevel@tonic-gate FEATURE(`blacklist_recipients') 24640Sstevel@tonic-gate 24650Sstevel@tonic-gatethen you can add entries to the map for local users, hosts in your 24660Sstevel@tonic-gatedomains, or addresses in your domain which should not receive mail: 24670Sstevel@tonic-gate 24680Sstevel@tonic-gate To:badlocaluser@ ERROR:550 Mailbox disabled for badlocaluser 24690Sstevel@tonic-gate To:host.my.TLD ERROR:550 That host does not accept mail 24700Sstevel@tonic-gate To:user@other.my.TLD ERROR:550 Mailbox disabled for this recipient 24710Sstevel@tonic-gate 24720Sstevel@tonic-gateThis would prevent a recipient of badlocaluser in any of the local 24730Sstevel@tonic-gatedomains (class {w}), any user at host.my.TLD, and the single address 24740Sstevel@tonic-gateuser@other.my.TLD from receiving mail. Please note: a local username 24750Sstevel@tonic-gatemust be now tagged with an @ (this is consistent with the check of 24760Sstevel@tonic-gatethe sender address, and hence it is possible to distinguish between 24770Sstevel@tonic-gatehostnames and usernames). Enabling this feature will keep you from 24780Sstevel@tonic-gatesending mails to all addresses that have an error message or REJECT 24790Sstevel@tonic-gateas value part in the access map. Taking the example from above: 24800Sstevel@tonic-gate 24810Sstevel@tonic-gate spammer@aol.com REJECT 24820Sstevel@tonic-gate cyberspammer.com REJECT 24830Sstevel@tonic-gate 24840Sstevel@tonic-gateMail can't be sent to spammer@aol.com or anyone at cyberspammer.com. 24850Sstevel@tonic-gateThat's why tagged entries should be used. 24860Sstevel@tonic-gate 24872197SjbeckThere are several DNS based blacklists which can be found by 24882197Sjbeckquerying a search engine. These are databases of spammers 24890Sstevel@tonic-gatemaintained in DNS. To use such a database, specify 24900Sstevel@tonic-gate 24912197Sjbeck FEATURE(`dnsbl', `dnsbl.example.com') 24922197Sjbeck 24932197SjbeckThis will cause sendmail to reject mail from any site listed in the 24943544SjbeckDNS based blacklist. You must select a DNS based blacklist domain 24952197Sjbeckto check by specifying an argument to the FEATURE. The default 24962197Sjbeckerror message is 24970Sstevel@tonic-gate 24980Sstevel@tonic-gate Rejected: IP-ADDRESS listed at SERVER 24990Sstevel@tonic-gate 25000Sstevel@tonic-gatewhere IP-ADDRESS and SERVER are replaced by the appropriate 25010Sstevel@tonic-gateinformation. A second argument can be used to specify a different 25023544Sjbecktext or action. For example, 25033544Sjbeck 25043544Sjbeck FEATURE(`dnsbl', `dnsbl.example.com', `quarantine') 25053544Sjbeck 25063544Sjbeckwould quarantine the message if the client IP address is listed 25073544Sjbeckat `dnsbl.example.com'. 25083544Sjbeck 25093544SjbeckBy default, temporary lookup failures are ignored 25103544Sjbeckand hence cause the connection not to be rejected by the DNS based 25113544Sjbeckrejection list. This behavior can be changed by specifying a third 25123544Sjbeckargument, which must be either `t' or a full error message. For 25133544Sjbeckexample: 25140Sstevel@tonic-gate 25150Sstevel@tonic-gate FEATURE(`dnsbl', `dnsbl.example.com', `', 25160Sstevel@tonic-gate `"451 Temporary lookup failure for " $&{client_addr} " in dnsbl.example.com"') 25170Sstevel@tonic-gate 25180Sstevel@tonic-gateIf `t' is used, the error message is: 25190Sstevel@tonic-gate 25200Sstevel@tonic-gate 451 Temporary lookup failure of IP-ADDRESS at SERVER 25210Sstevel@tonic-gate 25220Sstevel@tonic-gatewhere IP-ADDRESS and SERVER are replaced by the appropriate 25230Sstevel@tonic-gateinformation. 25240Sstevel@tonic-gate 25250Sstevel@tonic-gateThis FEATURE can be included several times to query different 25262197SjbeckDNS based rejection lists. 25270Sstevel@tonic-gate 25280Sstevel@tonic-gateNotice: to avoid checking your own local domains against those 25290Sstevel@tonic-gateblacklists, use the access_db feature and add: 25300Sstevel@tonic-gate 25310Sstevel@tonic-gate Connect:10.1 OK 25320Sstevel@tonic-gate Connect:127.0.0.1 RELAY 25330Sstevel@tonic-gate 25340Sstevel@tonic-gateto the access map, where 10.1 is your local network. You may 25350Sstevel@tonic-gatewant to use "RELAY" instead of "OK" to allow also relaying 25360Sstevel@tonic-gateinstead of just disabling the DNS lookups in the blacklists. 25370Sstevel@tonic-gate 25380Sstevel@tonic-gate 25390Sstevel@tonic-gateThe features described above make use of the check_relay, check_mail, 25400Sstevel@tonic-gateand check_rcpt rulesets. Note that check_relay checks the SMTP 25410Sstevel@tonic-gateclient hostname and IP address when the connection is made to your 25420Sstevel@tonic-gateserver. It does not check if a mail message is being relayed to 25430Sstevel@tonic-gateanother server. That check is done in check_rcpt. If you wish to 25440Sstevel@tonic-gateinclude your own checks, you can put your checks in the rulesets 25450Sstevel@tonic-gateLocal_check_relay, Local_check_mail, and Local_check_rcpt. For 25460Sstevel@tonic-gateexample if you wanted to block senders with all numeric usernames 25470Sstevel@tonic-gate(i.e. 2312343@bigisp.com), you would use Local_check_mail and the 25480Sstevel@tonic-gateregex map: 25490Sstevel@tonic-gate 25500Sstevel@tonic-gate LOCAL_CONFIG 25510Sstevel@tonic-gate Kallnumbers regex -a@MATCH ^[0-9]+$ 25520Sstevel@tonic-gate 25530Sstevel@tonic-gate LOCAL_RULESETS 25540Sstevel@tonic-gate SLocal_check_mail 25550Sstevel@tonic-gate # check address against various regex checks 25560Sstevel@tonic-gate R$* $: $>Parse0 $>3 $1 25570Sstevel@tonic-gate R$+ < @ bigisp.com. > $* $: $(allnumbers $1 $) 25580Sstevel@tonic-gate R@MATCH $#error $: 553 Header Error 25590Sstevel@tonic-gate 25600Sstevel@tonic-gateThese rules are called with the original arguments of the corresponding 25610Sstevel@tonic-gatecheck_* ruleset. If the local ruleset returns $#OK, no further checking 25620Sstevel@tonic-gateis done by the features described above and the mail is accepted. If 25630Sstevel@tonic-gatethe local ruleset resolves to a mailer (such as $#error or $#discard), 25640Sstevel@tonic-gatethe appropriate action is taken. Other results starting with $# are 25650Sstevel@tonic-gateinterpreted by sendmail and may lead to unspecified behavior. Note: do 25660Sstevel@tonic-gateNOT create a mailer with the name OK. Return values that do not start 25670Sstevel@tonic-gatewith $# are ignored, i.e., normal processing continues. 25680Sstevel@tonic-gate 25690Sstevel@tonic-gateDelay all checks 25700Sstevel@tonic-gate---------------- 25710Sstevel@tonic-gate 25720Sstevel@tonic-gateBy using FEATURE(`delay_checks') the rulesets check_mail and check_relay 25730Sstevel@tonic-gatewill not be called when a client connects or issues a MAIL command, 25740Sstevel@tonic-gaterespectively. Instead, those rulesets will be called by the check_rcpt 25750Sstevel@tonic-gateruleset; they will be skipped if a sender has been authenticated using 25760Sstevel@tonic-gatea "trusted" mechanism, i.e., one that is defined via TRUST_AUTH_MECH(). 25770Sstevel@tonic-gateIf check_mail returns an error then the RCPT TO command will be rejected 25780Sstevel@tonic-gatewith that error. If it returns some other result starting with $# then 25790Sstevel@tonic-gatecheck_relay will be skipped. If the sender address (or a part of it) is 25800Sstevel@tonic-gatelisted in the access map and it has a RHS of OK or RELAY, then check_relay 25810Sstevel@tonic-gatewill be skipped. This has an interesting side effect: if your domain is 25820Sstevel@tonic-gatemy.domain and you have 25830Sstevel@tonic-gate 25840Sstevel@tonic-gate my.domain RELAY 25850Sstevel@tonic-gate 25860Sstevel@tonic-gatein the access map, then any e-mail with a sender address of 25870Sstevel@tonic-gate<user@my.domain> will not be rejected by check_relay even though 25880Sstevel@tonic-gateit would match the hostname or IP address. This allows spammers 25890Sstevel@tonic-gateto get around DNS based blacklist by faking the sender address. To 25900Sstevel@tonic-gateavoid this problem you have to use tagged entries: 25910Sstevel@tonic-gate 25920Sstevel@tonic-gate To:my.domain RELAY 25930Sstevel@tonic-gate Connect:my.domain RELAY 25940Sstevel@tonic-gate 25950Sstevel@tonic-gateif you need those entries at all (class {R} may take care of them). 25960Sstevel@tonic-gate 25970Sstevel@tonic-gateFEATURE(`delay_checks') can take an optional argument: 25980Sstevel@tonic-gate 25990Sstevel@tonic-gate FEATURE(`delay_checks', `friend') 26000Sstevel@tonic-gate enables spamfriend test 26010Sstevel@tonic-gate FEATURE(`delay_checks', `hater') 26020Sstevel@tonic-gate enables spamhater test 26030Sstevel@tonic-gate 26040Sstevel@tonic-gateIf such an argument is given, the recipient will be looked up in the 26050Sstevel@tonic-gateaccess map (using the tag Spam:). If the argument is `friend', then 26060Sstevel@tonic-gatethe default behavior is to apply the other rulesets and make a SPAM 26070Sstevel@tonic-gatefriend the exception. The rulesets check_mail and check_relay will be 26080Sstevel@tonic-gateskipped only if the recipient address is found and has RHS FRIEND. If 26090Sstevel@tonic-gatethe argument is `hater', then the default behavior is to skip the rulesets 26100Sstevel@tonic-gatecheck_mail and check_relay and make a SPAM hater the exception. The 26110Sstevel@tonic-gateother two rulesets will be applied only if the recipient address is 26120Sstevel@tonic-gatefound and has RHS HATER. 26130Sstevel@tonic-gate 26140Sstevel@tonic-gateThis allows for simple exceptions from the tests, e.g., by activating 26150Sstevel@tonic-gatethe friend option and having 26160Sstevel@tonic-gate 26170Sstevel@tonic-gate Spam:abuse@ FRIEND 26180Sstevel@tonic-gate 26190Sstevel@tonic-gatein the access map, mail to abuse@localdomain will get through (where 26200Sstevel@tonic-gate"localdomain" is any domain in class {w}). It is also possible to 26210Sstevel@tonic-gatespecify a full address or an address with +detail: 26220Sstevel@tonic-gate 26230Sstevel@tonic-gate Spam:abuse@my.domain FRIEND 26240Sstevel@tonic-gate Spam:me+abuse@ FRIEND 26250Sstevel@tonic-gate Spam:spam.domain FRIEND 26260Sstevel@tonic-gate 26270Sstevel@tonic-gateNote: The required tag has been changed in 8.12 from To: to Spam:. 26280Sstevel@tonic-gateThis change is incompatible to previous versions. However, you can 26290Sstevel@tonic-gate(for now) simply add the new entries to the access map, the old 26300Sstevel@tonic-gateones will be ignored. As soon as you removed the old entries from 26310Sstevel@tonic-gatethe access map, specify a third parameter (`n') to this feature and 26320Sstevel@tonic-gatethe backward compatibility rules will not be in the generated .cf 26330Sstevel@tonic-gatefile. 26340Sstevel@tonic-gate 26350Sstevel@tonic-gateHeader Checks 26360Sstevel@tonic-gate------------- 26370Sstevel@tonic-gate 26380Sstevel@tonic-gateYou can also reject mail on the basis of the contents of headers. 26390Sstevel@tonic-gateThis is done by adding a ruleset call to the 'H' header definition command 26400Sstevel@tonic-gatein sendmail.cf. For example, this can be used to check the validity of 26410Sstevel@tonic-gatea Message-ID: header: 26420Sstevel@tonic-gate 26430Sstevel@tonic-gate LOCAL_CONFIG 26440Sstevel@tonic-gate HMessage-Id: $>CheckMessageId 26450Sstevel@tonic-gate 26460Sstevel@tonic-gate LOCAL_RULESETS 26470Sstevel@tonic-gate SCheckMessageId 26480Sstevel@tonic-gate R< $+ @ $+ > $@ OK 26490Sstevel@tonic-gate R$* $#error $: 553 Header Error 26500Sstevel@tonic-gate 26510Sstevel@tonic-gateThe alternative format: 26520Sstevel@tonic-gate 26530Sstevel@tonic-gate HSubject: $>+CheckSubject 26540Sstevel@tonic-gate 26550Sstevel@tonic-gatethat is, $>+ instead of $>, gives the full Subject: header including 26560Sstevel@tonic-gatecomments to the ruleset (comments in parentheses () are stripped 26570Sstevel@tonic-gateby default). 26580Sstevel@tonic-gate 26590Sstevel@tonic-gateA default ruleset for headers which don't have a specific ruleset 26600Sstevel@tonic-gatedefined for them can be given by: 26610Sstevel@tonic-gate 26620Sstevel@tonic-gate H*: $>CheckHdr 26630Sstevel@tonic-gate 26640Sstevel@tonic-gateNotice: 26650Sstevel@tonic-gate1. All rules act on tokens as explained in doc/op/op.{me,ps,txt}. 26660Sstevel@tonic-gateThat may cause problems with simple header checks due to the 26670Sstevel@tonic-gatetokenization. It might be simpler to use a regex map and apply it 26680Sstevel@tonic-gateto $&{currHeader}. 26690Sstevel@tonic-gate2. There are no default rulesets coming with this distribution of 2670616Sjbecksendmail. You can write your own or search the WWW for examples. 26711658Sjbeck3. When using a default ruleset for headers, the name of the header 26720Sstevel@tonic-gatecurrently being checked can be found in the $&{hdr_name} macro. 26730Sstevel@tonic-gate 26740Sstevel@tonic-gateAfter all of the headers are read, the check_eoh ruleset will be called for 26750Sstevel@tonic-gateany final header-related checks. The ruleset is called with the number of 26760Sstevel@tonic-gateheaders and the size of all of the headers in bytes separated by $|. One 26770Sstevel@tonic-gateexample usage is to reject messages which do not have a Message-Id: 26780Sstevel@tonic-gateheader. However, the Message-Id: header is *NOT* a required header and is 26790Sstevel@tonic-gatenot a guaranteed spam indicator. This ruleset is an example and should 26800Sstevel@tonic-gateprobably not be used in production. 26810Sstevel@tonic-gate 26820Sstevel@tonic-gate LOCAL_CONFIG 26830Sstevel@tonic-gate Kstorage macro 26840Sstevel@tonic-gate HMessage-Id: $>CheckMessageId 26850Sstevel@tonic-gate 26860Sstevel@tonic-gate LOCAL_RULESETS 26870Sstevel@tonic-gate SCheckMessageId 26880Sstevel@tonic-gate # Record the presence of the header 26890Sstevel@tonic-gate R$* $: $(storage {MessageIdCheck} $@ OK $) $1 26900Sstevel@tonic-gate R< $+ @ $+ > $@ OK 26910Sstevel@tonic-gate R$* $#error $: 553 Header Error 26920Sstevel@tonic-gate 26930Sstevel@tonic-gate Scheck_eoh 26940Sstevel@tonic-gate # Check the macro 26950Sstevel@tonic-gate R$* $: < $&{MessageIdCheck} > 26960Sstevel@tonic-gate # Clear the macro for the next message 26970Sstevel@tonic-gate R$* $: $(storage {MessageIdCheck} $) $1 26980Sstevel@tonic-gate # Has a Message-Id: header 26990Sstevel@tonic-gate R< $+ > $@ OK 27000Sstevel@tonic-gate # Allow missing Message-Id: from local mail 27010Sstevel@tonic-gate R$* $: < $&{client_name} > 27020Sstevel@tonic-gate R< > $@ OK 27030Sstevel@tonic-gate R< $=w > $@ OK 27040Sstevel@tonic-gate # Otherwise, reject the mail 27050Sstevel@tonic-gate R$* $#error $: 553 Header Error 27060Sstevel@tonic-gate 27070Sstevel@tonic-gate 27080Sstevel@tonic-gate+--------------------+ 27090Sstevel@tonic-gate| CONNECTION CONTROL | 27100Sstevel@tonic-gate+--------------------+ 27110Sstevel@tonic-gate 27120Sstevel@tonic-gateThe features ratecontrol and conncontrol allow to establish connection 27130Sstevel@tonic-gatelimits per client IP address or net. These features can limit the 27140Sstevel@tonic-gaterate of connections (connections per time unit) or the number of 27150Sstevel@tonic-gateincoming SMTP connections, respectively. If enabled, appropriate 27160Sstevel@tonic-gaterulesets are called at the end of check_relay, i.e., after DNS 27170Sstevel@tonic-gateblacklists and generic access_db operations. The features require 27180Sstevel@tonic-gateFEATURE(`access_db') to be listed earlier in the mc file. 27190Sstevel@tonic-gate 27200Sstevel@tonic-gateNote: FEATURE(`delay_checks') delays those connection control checks 27210Sstevel@tonic-gateafter a recipient address has been received, hence making these 27220Sstevel@tonic-gateconnection control features less useful. To run the checks as early 27230Sstevel@tonic-gateas possible, specify the parameter `nodelay', e.g., 27240Sstevel@tonic-gate 27250Sstevel@tonic-gate FEATURE(`ratecontrol', `nodelay') 27260Sstevel@tonic-gate 27270Sstevel@tonic-gateIn that case, FEATURE(`delay_checks') has no effect on connection 27280Sstevel@tonic-gatecontrol (and it must be specified earlier in the mc file). 27290Sstevel@tonic-gate 27300Sstevel@tonic-gateAn optional second argument `terminate' specifies whether the 27310Sstevel@tonic-gaterulesets should return the error code 421 which will cause 27320Sstevel@tonic-gatesendmail to terminate the session with that error if it is 27330Sstevel@tonic-gatereturned from check_relay, i.e., not delayed as explained in 27340Sstevel@tonic-gatethe previous paragraph. Example: 27350Sstevel@tonic-gate 27360Sstevel@tonic-gate FEATURE(`ratecontrol', `nodelay', `terminate') 27370Sstevel@tonic-gate 27380Sstevel@tonic-gate 27390Sstevel@tonic-gate+----------+ 27400Sstevel@tonic-gate| STARTTLS | 27410Sstevel@tonic-gate+----------+ 27420Sstevel@tonic-gate 27430Sstevel@tonic-gateIn this text, cert will be used as an abbreviation for X.509 certificate, 27440Sstevel@tonic-gateDN (CN) is the distinguished (common) name of a cert, and CA is a 27450Sstevel@tonic-gatecertification authority, which signs (issues) certs. 27460Sstevel@tonic-gate 27470Sstevel@tonic-gateFor STARTTLS to be offered by sendmail you need to set at least 27480Sstevel@tonic-gatethese variables (the file names and paths are just examples): 27490Sstevel@tonic-gate 27500Sstevel@tonic-gate define(`confCACERT_PATH', `/etc/mail/certs/') 27510Sstevel@tonic-gate define(`confCACERT', `/etc/mail/certs/CA.cert.pem') 27520Sstevel@tonic-gate define(`confSERVER_CERT', `/etc/mail/certs/my.cert.pem') 27530Sstevel@tonic-gate define(`confSERVER_KEY', `/etc/mail/certs/my.key.pem') 27540Sstevel@tonic-gate 27550Sstevel@tonic-gateOn systems which do not have the compile flag HASURANDOM set (see 27560Sstevel@tonic-gatesendmail/README) you also must set confRAND_FILE. 27570Sstevel@tonic-gate 27580Sstevel@tonic-gateSee doc/op/op.{me,ps,txt} for more information about these options, 27590Sstevel@tonic-gateespecially the sections ``Certificates for STARTTLS'' and ``PRNG for 27600Sstevel@tonic-gateSTARTTLS''. 27610Sstevel@tonic-gate 27620Sstevel@tonic-gateMacros related to STARTTLS are: 27630Sstevel@tonic-gate 27640Sstevel@tonic-gate${cert_issuer} holds the DN of the CA (the cert issuer). 27650Sstevel@tonic-gate${cert_subject} holds the DN of the cert (called the cert subject). 27660Sstevel@tonic-gate${cn_issuer} holds the CN of the CA (the cert issuer). 27670Sstevel@tonic-gate${cn_subject} holds the CN of the cert (called the cert subject). 27680Sstevel@tonic-gate${tls_version} the TLS/SSL version used for the connection, e.g., TLSv1, 27690Sstevel@tonic-gate TLSv1/SSLv3, SSLv3, SSLv2. 27700Sstevel@tonic-gate${cipher} the cipher used for the connection, e.g., EDH-DSS-DES-CBC3-SHA, 27710Sstevel@tonic-gate EDH-RSA-DES-CBC-SHA, DES-CBC-MD5, DES-CBC3-SHA. 27720Sstevel@tonic-gate${cipher_bits} the keylength (in bits) of the symmetric encryption algorithm 27730Sstevel@tonic-gate used for the connection. 27740Sstevel@tonic-gate${verify} holds the result of the verification of the presented cert. 27750Sstevel@tonic-gate Possible values are: 27760Sstevel@tonic-gate OK verification succeeded. 27770Sstevel@tonic-gate NO no cert presented. 27780Sstevel@tonic-gate NOT no cert requested. 27790Sstevel@tonic-gate FAIL cert presented but could not be verified, 27800Sstevel@tonic-gate e.g., the cert of the signing CA is missing. 27810Sstevel@tonic-gate NONE STARTTLS has not been performed. 27820Sstevel@tonic-gate TEMP temporary error occurred. 27830Sstevel@tonic-gate PROTOCOL protocol error occurred (SMTP level). 27840Sstevel@tonic-gate SOFTWARE STARTTLS handshake failed. 27850Sstevel@tonic-gate${server_name} the name of the server of the current outgoing SMTP 27860Sstevel@tonic-gate connection. 27870Sstevel@tonic-gate${server_addr} the address of the server of the current outgoing SMTP 27880Sstevel@tonic-gate connection. 27890Sstevel@tonic-gate 27900Sstevel@tonic-gateRelaying 27910Sstevel@tonic-gate-------- 27920Sstevel@tonic-gate 27930Sstevel@tonic-gateSMTP STARTTLS can allow relaying for remote SMTP clients which have 27940Sstevel@tonic-gatesuccessfully authenticated themselves. If the verification of the cert 27950Sstevel@tonic-gatefailed (${verify} != OK), relaying is subject to the usual rules. 27960Sstevel@tonic-gateOtherwise the DN of the issuer is looked up in the access map using the 27970Sstevel@tonic-gatetag CERTISSUER. If the resulting value is RELAY, relaying is allowed. 27980Sstevel@tonic-gateIf it is SUBJECT, the DN of the cert subject is looked up next in the 27990Sstevel@tonic-gateaccess map using the tag CERTSUBJECT. If the value is RELAY, relaying 28000Sstevel@tonic-gateis allowed. 28010Sstevel@tonic-gate 28020Sstevel@tonic-gateTo make things a bit more flexible (or complicated), the values for 28030Sstevel@tonic-gate${cert_issuer} and ${cert_subject} can be optionally modified by regular 28040Sstevel@tonic-gateexpressions defined in the m4 variables _CERT_REGEX_ISSUER_ and 28050Sstevel@tonic-gate_CERT_REGEX_SUBJECT_, respectively. To avoid problems with those macros in 28060Sstevel@tonic-gaterulesets and map lookups, they are modified as follows: each non-printable 28070Sstevel@tonic-gatecharacter and the characters '<', '>', '(', ')', '"', '+', ' ' are replaced 28080Sstevel@tonic-gateby their HEX value with a leading '+'. For example: 28090Sstevel@tonic-gate 28100Sstevel@tonic-gate/C=US/ST=California/O=endmail.org/OU=private/CN=Darth Mail (Cert)/Email= 28110Sstevel@tonic-gatedarth+cert@endmail.org 28120Sstevel@tonic-gate 28130Sstevel@tonic-gateis encoded as: 28140Sstevel@tonic-gate 28150Sstevel@tonic-gate/C=US/ST=California/O=endmail.org/OU=private/CN= 28160Sstevel@tonic-gateDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 28170Sstevel@tonic-gate 28180Sstevel@tonic-gate(line breaks have been inserted for readability). 28190Sstevel@tonic-gate 28200Sstevel@tonic-gateThe macros which are subject to this encoding are ${cert_subject}, 28210Sstevel@tonic-gate${cert_issuer}, ${cn_subject}, and ${cn_issuer}. 28220Sstevel@tonic-gate 28230Sstevel@tonic-gateExamples: 28240Sstevel@tonic-gate 28250Sstevel@tonic-gateTo allow relaying for everyone who can present a cert signed by 28260Sstevel@tonic-gate 28270Sstevel@tonic-gate/C=US/ST=California/O=endmail.org/OU=private/CN= 28280Sstevel@tonic-gateDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 28290Sstevel@tonic-gate 28300Sstevel@tonic-gatesimply use: 28310Sstevel@tonic-gate 28320Sstevel@tonic-gateCertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= 28330Sstevel@tonic-gateDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org RELAY 28340Sstevel@tonic-gate 28350Sstevel@tonic-gateTo allow relaying only for a subset of machines that have a cert signed by 28360Sstevel@tonic-gate 28370Sstevel@tonic-gate/C=US/ST=California/O=endmail.org/OU=private/CN= 28380Sstevel@tonic-gateDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org 28390Sstevel@tonic-gate 28400Sstevel@tonic-gateuse: 28410Sstevel@tonic-gate 28420Sstevel@tonic-gateCertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= 28430Sstevel@tonic-gateDarth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org SUBJECT 28440Sstevel@tonic-gateCertSubject:/C=US/ST=California/O=endmail.org/OU=private/CN= 28450Sstevel@tonic-gateDeathStar/Email=deathstar@endmail.org RELAY 28460Sstevel@tonic-gate 28470Sstevel@tonic-gateNotes: 28480Sstevel@tonic-gate- line breaks have been inserted after "CN=" for readability, 28490Sstevel@tonic-gate each tagged entry must be one (long) line in the access map. 28500Sstevel@tonic-gate- if OpenSSL 0.9.7 or newer is used then the "Email=" part of a DN 28510Sstevel@tonic-gate is replaced by "emailAddress=". 28520Sstevel@tonic-gate 28530Sstevel@tonic-gateOf course it is also possible to write a simple ruleset that allows 28540Sstevel@tonic-gaterelaying for everyone who can present a cert that can be verified, e.g., 28550Sstevel@tonic-gate 28560Sstevel@tonic-gateLOCAL_RULESETS 28570Sstevel@tonic-gateSLocal_check_rcpt 28580Sstevel@tonic-gateR$* $: $&{verify} 28590Sstevel@tonic-gateROK $# OK 28600Sstevel@tonic-gate 28610Sstevel@tonic-gateAllowing Connections 28620Sstevel@tonic-gate-------------------- 28630Sstevel@tonic-gate 28640Sstevel@tonic-gateThe rulesets tls_server, tls_client, and tls_rcpt are used to decide whether 28650Sstevel@tonic-gatean SMTP connection is accepted (or should continue). 28660Sstevel@tonic-gate 28670Sstevel@tonic-gatetls_server is called when sendmail acts as client after a STARTTLS command 28680Sstevel@tonic-gate(should) have been issued. The parameter is the value of ${verify}. 28690Sstevel@tonic-gate 28700Sstevel@tonic-gatetls_client is called when sendmail acts as server, after a STARTTLS command 28710Sstevel@tonic-gatehas been issued, and from check_mail. The parameter is the value of 28720Sstevel@tonic-gate${verify} and STARTTLS or MAIL, respectively. 28730Sstevel@tonic-gate 28740Sstevel@tonic-gateBoth rulesets behave the same. If no access map is in use, the connection 28750Sstevel@tonic-gatewill be accepted unless ${verify} is SOFTWARE, in which case the connection 28760Sstevel@tonic-gateis always aborted. For tls_server/tls_client, ${client_name}/${server_name} 28770Sstevel@tonic-gateis looked up in the access map using the tag TLS_Srv/TLS_Clt, which is done 28780Sstevel@tonic-gatewith the ruleset LookUpDomain. If no entry is found, ${client_addr} 28790Sstevel@tonic-gate(${server_addr}) is looked up in the access map (same tag, ruleset 28800Sstevel@tonic-gateLookUpAddr). If this doesn't result in an entry either, just the tag is 28810Sstevel@tonic-gatelooked up in the access map (included the trailing colon). Notice: 28820Sstevel@tonic-gaterequiring that e-mail is sent to a server only encrypted, e.g., via 28830Sstevel@tonic-gate 28840Sstevel@tonic-gateTLS_Srv:secure.domain ENCR:112 28850Sstevel@tonic-gate 28860Sstevel@tonic-gatedoesn't necessarily mean that e-mail sent to that domain is encrypted. 28870Sstevel@tonic-gateIf the domain has multiple MX servers, e.g., 28880Sstevel@tonic-gate 28890Sstevel@tonic-gatesecure.domain. IN MX 10 mail.secure.domain. 28900Sstevel@tonic-gatesecure.domain. IN MX 50 mail.other.domain. 28910Sstevel@tonic-gate 28920Sstevel@tonic-gatethen mail to user@secure.domain may go unencrypted to mail.other.domain. 28930Sstevel@tonic-gatetls_rcpt can be used to address this problem. 28940Sstevel@tonic-gate 28950Sstevel@tonic-gatetls_rcpt is called before a RCPT TO: command is sent. The parameter is the 28960Sstevel@tonic-gatecurrent recipient. This ruleset is only defined if FEATURE(`access_db') 28970Sstevel@tonic-gateis selected. A recipient address user@domain is looked up in the access 28980Sstevel@tonic-gatemap in four formats: TLS_Rcpt:user@domain, TLS_Rcpt:user@, TLS_Rcpt:domain, 28990Sstevel@tonic-gateand TLS_Rcpt:; the first match is taken. 29000Sstevel@tonic-gate 29010Sstevel@tonic-gateThe result of the lookups is then used to call the ruleset TLS_connection, 29020Sstevel@tonic-gatewhich checks the requirement specified by the RHS in the access map against 29030Sstevel@tonic-gatethe actual parameters of the current TLS connection, esp. ${verify} and 29040Sstevel@tonic-gate${cipher_bits}. Legal RHSs in the access map are: 29050Sstevel@tonic-gate 29060Sstevel@tonic-gateVERIFY verification must have succeeded 29070Sstevel@tonic-gateVERIFY:bits verification must have succeeded and ${cipher_bits} must 29080Sstevel@tonic-gate be greater than or equal bits. 29090Sstevel@tonic-gateENCR:bits ${cipher_bits} must be greater than or equal bits. 29100Sstevel@tonic-gate 29110Sstevel@tonic-gateThe RHS can optionally be prefixed by TEMP+ or PERM+ to select a temporary 29120Sstevel@tonic-gateor permanent error. The default is a temporary error code (403 4.7.0) 29130Sstevel@tonic-gateunless the macro TLS_PERM_ERR is set during generation of the .cf file. 29140Sstevel@tonic-gate 29150Sstevel@tonic-gateIf a certain level of encryption is required, then it might also be 29160Sstevel@tonic-gatepossible that this level is provided by the security layer from a SASL 29170Sstevel@tonic-gatealgorithm, e.g., DIGEST-MD5. 29180Sstevel@tonic-gate 29190Sstevel@tonic-gateFurthermore, there can be a list of extensions added. Such a list 29200Sstevel@tonic-gatestarts with '+' and the items are separated by '++'. Allowed 29210Sstevel@tonic-gateextensions are: 29220Sstevel@tonic-gate 29230Sstevel@tonic-gateCN:name name must match ${cn_subject} 2924*11440SJohn.Beck@Sun.COMCN ${client_name}/${server_name} must match ${cn_subject} 29250Sstevel@tonic-gateCS:name name must match ${cert_subject} 29260Sstevel@tonic-gateCI:name name must match ${cert_issuer} 29270Sstevel@tonic-gate 29280Sstevel@tonic-gateExample: e-mail sent to secure.example.com should only use an encrypted 29290Sstevel@tonic-gateconnection. E-mail received from hosts within the laptop.example.com domain 29300Sstevel@tonic-gateshould only be accepted if they have been authenticated. The host which 29310Sstevel@tonic-gatereceives e-mail for darth@endmail.org must present a cert that uses the 29320Sstevel@tonic-gateCN smtp.endmail.org. 29330Sstevel@tonic-gate 29340Sstevel@tonic-gateTLS_Srv:secure.example.com ENCR:112 29350Sstevel@tonic-gateTLS_Clt:laptop.example.com PERM+VERIFY:112 29360Sstevel@tonic-gateTLS_Rcpt:darth@endmail.org ENCR:112+CN:smtp.endmail.org 29370Sstevel@tonic-gate 29380Sstevel@tonic-gate 29390Sstevel@tonic-gateDisabling STARTTLS And Setting SMTP Server Features 29400Sstevel@tonic-gate--------------------------------------------------- 29410Sstevel@tonic-gate 29420Sstevel@tonic-gateBy default STARTTLS is used whenever possible. However, there are 29430Sstevel@tonic-gatesome broken MTAs that don't properly implement STARTTLS. To be able 29440Sstevel@tonic-gateto send to (or receive from) those MTAs, the ruleset try_tls 29450Sstevel@tonic-gate(srv_features) can be used that work together with the access map. 29460Sstevel@tonic-gateEntries for the access map must be tagged with Try_TLS (Srv_Features) 29470Sstevel@tonic-gateand refer to the hostname or IP address of the connecting system. 29480Sstevel@tonic-gateA default case can be specified by using just the tag. For example, 29490Sstevel@tonic-gatethe following entries in the access map: 29500Sstevel@tonic-gate 29510Sstevel@tonic-gate Try_TLS:broken.server NO 29520Sstevel@tonic-gate Srv_Features:my.domain v 29530Sstevel@tonic-gate Srv_Features: V 29540Sstevel@tonic-gate 29550Sstevel@tonic-gatewill turn off STARTTLS when sending to broken.server (or any host 29560Sstevel@tonic-gatein that domain), and request a client certificate during the TLS 29570Sstevel@tonic-gatehandshake only for hosts in my.domain. The valid entries on the RHS 29580Sstevel@tonic-gatefor Srv_Features are listed in the Sendmail Installation and 29590Sstevel@tonic-gateOperations Guide. 29600Sstevel@tonic-gate 29610Sstevel@tonic-gate 29620Sstevel@tonic-gateReceived: Header 29630Sstevel@tonic-gate---------------- 29640Sstevel@tonic-gate 29650Sstevel@tonic-gateThe Received: header reveals whether STARTTLS has been used. It contains an 29660Sstevel@tonic-gateextra line: 29670Sstevel@tonic-gate 29680Sstevel@tonic-gate(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify}) 29690Sstevel@tonic-gate 29700Sstevel@tonic-gate 29710Sstevel@tonic-gate+--------------------------------+ 29720Sstevel@tonic-gate| ADDING NEW MAILERS OR RULESETS | 29730Sstevel@tonic-gate+--------------------------------+ 29740Sstevel@tonic-gate 29750Sstevel@tonic-gateSometimes you may need to add entirely new mailers or rulesets. They 29760Sstevel@tonic-gateshould be introduced with the constructs MAILER_DEFINITIONS and 29770Sstevel@tonic-gateLOCAL_RULESETS respectively. For example: 29780Sstevel@tonic-gate 29790Sstevel@tonic-gate MAILER_DEFINITIONS 29800Sstevel@tonic-gate Mmymailer, ... 29810Sstevel@tonic-gate ... 29820Sstevel@tonic-gate 29830Sstevel@tonic-gate LOCAL_RULESETS 29840Sstevel@tonic-gate Smyruleset 29850Sstevel@tonic-gate ... 29860Sstevel@tonic-gate 2987616SjbeckLocal additions for the rulesets srv_features, try_tls, tls_rcpt, 2988616Sjbecktls_client, and tls_server can be made using LOCAL_SRV_FEATURES, 2989616SjbeckLOCAL_TRY_TLS, LOCAL_TLS_RCPT, LOCAL_TLS_CLIENT, and LOCAL_TLS_SERVER, 2990616Sjbeckrespectively. For example, to add a local ruleset that decides 2991616Sjbeckwhether to try STARTTLS in a sendmail client, use: 2992616Sjbeck 2993616Sjbeck LOCAL_TRY_TLS 2994616Sjbeck R... 2995616Sjbeck 29960Sstevel@tonic-gateNote: you don't need to add a name for the ruleset, it is implicitly 29970Sstevel@tonic-gatedefined by using the appropriate macro. 29980Sstevel@tonic-gate 29990Sstevel@tonic-gate 30000Sstevel@tonic-gate+-------------------------+ 30010Sstevel@tonic-gate| ADDING NEW MAIL FILTERS | 30020Sstevel@tonic-gate+-------------------------+ 30030Sstevel@tonic-gate 30040Sstevel@tonic-gateSendmail supports mail filters to filter incoming SMTP messages according 30050Sstevel@tonic-gateto the "Sendmail Mail Filter API" documentation. These filters can be 30060Sstevel@tonic-gateconfigured in your mc file using the two commands: 30070Sstevel@tonic-gate 30080Sstevel@tonic-gate MAIL_FILTER(`name', `equates') 30090Sstevel@tonic-gate INPUT_MAIL_FILTER(`name', `equates') 30100Sstevel@tonic-gate 30110Sstevel@tonic-gateThe first command, MAIL_FILTER(), simply defines a filter with the given 30120Sstevel@tonic-gatename and equates. For example: 30130Sstevel@tonic-gate 30140Sstevel@tonic-gate MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 30150Sstevel@tonic-gate 30160Sstevel@tonic-gateThis creates the equivalent sendmail.cf entry: 30170Sstevel@tonic-gate 30180Sstevel@tonic-gate Xarchive, S=local:/var/run/archivesock, F=R 30190Sstevel@tonic-gate 30200Sstevel@tonic-gateThe INPUT_MAIL_FILTER() command performs the same actions as MAIL_FILTER 30210Sstevel@tonic-gatebut also populates the m4 variable `confINPUT_MAIL_FILTERS' with the name 30220Sstevel@tonic-gateof the filter such that the filter will actually be called by sendmail. 30230Sstevel@tonic-gate 30240Sstevel@tonic-gateFor example, the two commands: 30250Sstevel@tonic-gate 30260Sstevel@tonic-gate INPUT_MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 30270Sstevel@tonic-gate INPUT_MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T') 30280Sstevel@tonic-gate 30290Sstevel@tonic-gateare equivalent to the three commands: 30300Sstevel@tonic-gate 30310Sstevel@tonic-gate MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R') 30320Sstevel@tonic-gate MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T') 30330Sstevel@tonic-gate define(`confINPUT_MAIL_FILTERS', `archive, spamcheck') 30340Sstevel@tonic-gate 30350Sstevel@tonic-gateIn general, INPUT_MAIL_FILTER() should be used unless you need to define 30360Sstevel@tonic-gatemore filters than you want to use for `confINPUT_MAIL_FILTERS'. 30370Sstevel@tonic-gate 30380Sstevel@tonic-gateNote that setting `confINPUT_MAIL_FILTERS' after any INPUT_MAIL_FILTER() 30390Sstevel@tonic-gatecommands will clear the list created by the prior INPUT_MAIL_FILTER() 30400Sstevel@tonic-gatecommands. 30410Sstevel@tonic-gate 30420Sstevel@tonic-gate 30430Sstevel@tonic-gate+-------------------------+ 30440Sstevel@tonic-gate| QUEUE GROUP DEFINITIONS | 30450Sstevel@tonic-gate+-------------------------+ 30460Sstevel@tonic-gate 30470Sstevel@tonic-gateIn addition to the queue directory (which is the default queue group 30480Sstevel@tonic-gatecalled "mqueue"), sendmail can deal with multiple queue groups, which 30490Sstevel@tonic-gateare collections of queue directories with the same behaviour. Queue 30500Sstevel@tonic-gategroups can be defined using the command: 30510Sstevel@tonic-gate 30520Sstevel@tonic-gate QUEUE_GROUP(`name', `equates') 30530Sstevel@tonic-gate 30540Sstevel@tonic-gateFor details about queue groups, please see doc/op/op.{me,ps,txt}. 30550Sstevel@tonic-gate 30560Sstevel@tonic-gate+-------------------------------+ 30570Sstevel@tonic-gate| NON-SMTP BASED CONFIGURATIONS | 30580Sstevel@tonic-gate+-------------------------------+ 30590Sstevel@tonic-gate 30600Sstevel@tonic-gateThese configuration files are designed primarily for use by 30610Sstevel@tonic-gateSMTP-based sites. They may not be well tuned for UUCP-only or 30620Sstevel@tonic-gateUUCP-primarily nodes (the latter is defined as a small local net 30630Sstevel@tonic-gateconnected to the rest of the world via UUCP). However, there is 30640Sstevel@tonic-gateone hook to handle some special cases. 30650Sstevel@tonic-gate 30660Sstevel@tonic-gateYou can define a ``smart host'' that understands a richer address syntax 30670Sstevel@tonic-gateusing: 30680Sstevel@tonic-gate 30690Sstevel@tonic-gate define(`SMART_HOST', `mailer:hostname') 30700Sstevel@tonic-gate 30710Sstevel@tonic-gateIn this case, the ``mailer:'' defaults to "relay". Any messages that 30720Sstevel@tonic-gatecan't be handled using the usual UUCP rules are passed to this host. 30730Sstevel@tonic-gate 30740Sstevel@tonic-gateIf you are on a local SMTP-based net that connects to the outside 30750Sstevel@tonic-gateworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. 30760Sstevel@tonic-gateFor example: 30770Sstevel@tonic-gate 30780Sstevel@tonic-gate define(`SMART_HOST', `uucp-new:uunet') 30790Sstevel@tonic-gate LOCAL_NET_CONFIG 30800Sstevel@tonic-gate R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 30810Sstevel@tonic-gate 30820Sstevel@tonic-gateThis will cause all names that end in your domain name ($m) to be sent 30830Sstevel@tonic-gatevia SMTP; anything else will be sent via uucp-new (smart UUCP) to uunet. 30840Sstevel@tonic-gateIf you have FEATURE(`nocanonify'), you may need to omit the dots after 30850Sstevel@tonic-gatethe $m. If you are running a local DNS inside your domain which is 30860Sstevel@tonic-gatenot otherwise connected to the outside world, you probably want to 30870Sstevel@tonic-gateuse: 30880Sstevel@tonic-gate 30890Sstevel@tonic-gate define(`SMART_HOST', `smtp:fire.wall.com') 30900Sstevel@tonic-gate LOCAL_NET_CONFIG 30910Sstevel@tonic-gate R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 30920Sstevel@tonic-gate 30930Sstevel@tonic-gateThat is, send directly only to things you found in your DNS lookup; 30940Sstevel@tonic-gateanything else goes through SMART_HOST. 30950Sstevel@tonic-gate 30960Sstevel@tonic-gateYou may need to turn off the anti-spam rules in order to accept 30970Sstevel@tonic-gateUUCP mail with FEATURE(`promiscuous_relay') and 30980Sstevel@tonic-gateFEATURE(`accept_unresolvable_domains'). 30990Sstevel@tonic-gate 31000Sstevel@tonic-gate 31010Sstevel@tonic-gate+-----------+ 31020Sstevel@tonic-gate| WHO AM I? | 31030Sstevel@tonic-gate+-----------+ 31040Sstevel@tonic-gate 31050Sstevel@tonic-gateNormally, the $j macro is automatically defined to be your fully 31060Sstevel@tonic-gatequalified domain name (FQDN). Sendmail does this by getting your 31070Sstevel@tonic-gatehost name using gethostname and then calling gethostbyname on the 31080Sstevel@tonic-gateresult. For example, in some environments gethostname returns 31090Sstevel@tonic-gateonly the root of the host name (such as "foo"); gethostbyname is 31100Sstevel@tonic-gatesupposed to return the FQDN ("foo.bar.com"). In some (fairly rare) 31110Sstevel@tonic-gatecases, gethostbyname may fail to return the FQDN. In this case 31120Sstevel@tonic-gateyou MUST define confDOMAIN_NAME to be your fully qualified domain 31130Sstevel@tonic-gatename. This is usually done using: 31140Sstevel@tonic-gate 31150Sstevel@tonic-gate Dmbar.com 31160Sstevel@tonic-gate define(`confDOMAIN_NAME', `$w.$m')dnl 31170Sstevel@tonic-gate 31180Sstevel@tonic-gate 31190Sstevel@tonic-gate+-----------------------------------+ 31200Sstevel@tonic-gate| ACCEPTING MAIL FOR MULTIPLE NAMES | 31210Sstevel@tonic-gate+-----------------------------------+ 31220Sstevel@tonic-gate 31230Sstevel@tonic-gateIf your host is known by several different names, you need to augment 31240Sstevel@tonic-gateclass {w}. This is a list of names by which your host is known, and 31250Sstevel@tonic-gateanything sent to an address using a host name in this list will be 31260Sstevel@tonic-gatetreated as local mail. You can do this in two ways: either create the 31270Sstevel@tonic-gatefile /etc/mail/local-host-names containing a list of your aliases (one per 31280Sstevel@tonic-gateline), and use ``FEATURE(`use_cw_file')'' in the .mc file, or add 31290Sstevel@tonic-gate``LOCAL_DOMAIN(`alias.host.name')''. Be sure you use the fully-qualified 31300Sstevel@tonic-gatename of the host, rather than a short name. 31310Sstevel@tonic-gate 31320Sstevel@tonic-gateIf you want to have different address in different domains, take 31330Sstevel@tonic-gatea look at the virtusertable feature, which is also explained at 31340Sstevel@tonic-gatehttp://www.sendmail.org/virtual-hosting.html 31350Sstevel@tonic-gate 31360Sstevel@tonic-gate 31370Sstevel@tonic-gate+--------------------+ 31380Sstevel@tonic-gate| USING MAILERTABLES | 31390Sstevel@tonic-gate+--------------------+ 31400Sstevel@tonic-gate 31410Sstevel@tonic-gateTo use FEATURE(`mailertable'), you will have to create an external 31420Sstevel@tonic-gatedatabase containing the routing information for various domains. 31430Sstevel@tonic-gateFor example, a mailertable file in text format might be: 31440Sstevel@tonic-gate 31450Sstevel@tonic-gate .my.domain xnet:%1.my.domain 31460Sstevel@tonic-gate uuhost1.my.domain uucp-new:uuhost1 31470Sstevel@tonic-gate .bitnet smtp:relay.bit.net 31480Sstevel@tonic-gate 31490Sstevel@tonic-gateThis should normally be stored in /etc/mail/mailertable. The actual 31500Sstevel@tonic-gatedatabase version of the mailertable is built using: 31510Sstevel@tonic-gate 31520Sstevel@tonic-gate makemap hash /etc/mail/mailertable < /etc/mail/mailertable 31530Sstevel@tonic-gate 31540Sstevel@tonic-gateThe semantics are simple. Any LHS entry that does not begin with 31550Sstevel@tonic-gatea dot matches the full host name indicated. LHS entries beginning 31560Sstevel@tonic-gatewith a dot match anything ending with that domain name (including 31570Sstevel@tonic-gatethe leading dot) -- that is, they can be thought of as having a 31580Sstevel@tonic-gateleading ".+" regular expression pattern for a non-empty sequence of 31590Sstevel@tonic-gatecharacters. Matching is done in order of most-to-least qualified 31600Sstevel@tonic-gate-- for example, even though ".my.domain" is listed first in the 31610Sstevel@tonic-gateabove example, an entry of "uuhost1.my.domain" will match the second 31620Sstevel@tonic-gateentry since it is more explicit. Note: e-mail to "user@my.domain" 31630Sstevel@tonic-gatedoes not match any entry in the above table. You need to have 31640Sstevel@tonic-gatesomething like: 31650Sstevel@tonic-gate 31660Sstevel@tonic-gate my.domain esmtp:host.my.domain 31670Sstevel@tonic-gate 31680Sstevel@tonic-gateThe RHS should always be a "mailer:host" pair. The mailer is the 31690Sstevel@tonic-gateconfiguration name of a mailer (that is, an M line in the 31700Sstevel@tonic-gatesendmail.cf file). The "host" will be the hostname passed to 31710Sstevel@tonic-gatethat mailer. In domain-based matches (that is, those with leading 31720Sstevel@tonic-gatedots) the "%1" may be used to interpolate the wildcarded part of 31730Sstevel@tonic-gatethe host name. For example, the first line above sends everything 31740Sstevel@tonic-gateaddressed to "anything.my.domain" to that same host name, but using 31750Sstevel@tonic-gatethe (presumably experimental) xnet mailer. 31760Sstevel@tonic-gate 31770Sstevel@tonic-gateIn some cases you may want to temporarily turn off MX records, 31780Sstevel@tonic-gateparticularly on gateways. For example, you may want to MX 31790Sstevel@tonic-gateeverything in a domain to one machine that then forwards it 31800Sstevel@tonic-gatedirectly. To do this, you might use the DNS configuration: 31810Sstevel@tonic-gate 31820Sstevel@tonic-gate *.domain. IN MX 0 relay.machine 31830Sstevel@tonic-gate 31840Sstevel@tonic-gateand on relay.machine use the mailertable: 31850Sstevel@tonic-gate 31860Sstevel@tonic-gate .domain smtp:[gateway.domain] 31870Sstevel@tonic-gate 31880Sstevel@tonic-gateThe [square brackets] turn off MX records for this host only. 31890Sstevel@tonic-gateIf you didn't do this, the mailertable would use the MX record 31900Sstevel@tonic-gateagain, which would give you an MX loop. Note that the use of 31910Sstevel@tonic-gatewildcard MX records is almost always a bad idea. Please avoid 31920Sstevel@tonic-gateusing them if possible. 31930Sstevel@tonic-gate 31940Sstevel@tonic-gate 31950Sstevel@tonic-gate+--------------------------------+ 31960Sstevel@tonic-gate| USING USERDB TO MAP FULL NAMES | 31970Sstevel@tonic-gate+--------------------------------+ 31980Sstevel@tonic-gate 31990Sstevel@tonic-gateThe user database was not originally intended for mapping full names 32000Sstevel@tonic-gateto login names (e.g., Eric.Allman => eric), but some people are using 32010Sstevel@tonic-gateit that way. (it is recommended that you set up aliases for this 32020Sstevel@tonic-gatepurpose instead -- since you can specify multiple alias files, this 32030Sstevel@tonic-gateis fairly easy.) The intent was to locate the default maildrop at 32040Sstevel@tonic-gatea site, but allow you to override this by sending to a specific host. 32050Sstevel@tonic-gate 32060Sstevel@tonic-gateIf you decide to set up the user database in this fashion, it is 32070Sstevel@tonic-gateimperative that you not use FEATURE(`stickyhost') -- otherwise, 32080Sstevel@tonic-gatee-mail sent to Full.Name@local.host.name will be rejected. 32090Sstevel@tonic-gate 32100Sstevel@tonic-gateTo build the internal form of the user database, use: 32110Sstevel@tonic-gate 32120Sstevel@tonic-gate makemap btree /etc/mail/userdb < /etc/mail/userdb.txt 32130Sstevel@tonic-gate 32140Sstevel@tonic-gateAs a general rule, it is an extremely bad idea to using full names 32150Sstevel@tonic-gateas e-mail addresses, since they are not in any sense unique. For 32160Sstevel@tonic-gateexample, the UNIX software-development community has at least two 32170Sstevel@tonic-gatewell-known Peter Deutsches, and at one time Bell Labs had two 32180Sstevel@tonic-gateStephen R. Bournes with offices along the same hallway. Which one 32190Sstevel@tonic-gatewill be forced to suffer the indignity of being Stephen_R_Bourne_2? 32200Sstevel@tonic-gateThe less famous of the two, or the one that was hired later? 32210Sstevel@tonic-gate 32220Sstevel@tonic-gateFinger should handle full names (and be fuzzy). Mail should use 32230Sstevel@tonic-gatehandles, and not be fuzzy. 32240Sstevel@tonic-gate 32250Sstevel@tonic-gate 32260Sstevel@tonic-gate+--------------------------------+ 32270Sstevel@tonic-gate| MISCELLANEOUS SPECIAL FEATURES | 32280Sstevel@tonic-gate+--------------------------------+ 32290Sstevel@tonic-gate 32300Sstevel@tonic-gatePlussed users 32310Sstevel@tonic-gate Sometimes it is convenient to merge configuration on a 32320Sstevel@tonic-gate centralized mail machine, for example, to forward all 32330Sstevel@tonic-gate root mail to a mail server. In this case it might be 32340Sstevel@tonic-gate useful to be able to treat the root addresses as a class 32350Sstevel@tonic-gate of addresses with subtle differences. You can do this 32360Sstevel@tonic-gate using plussed users. For example, a client might include 32370Sstevel@tonic-gate the alias: 32380Sstevel@tonic-gate 32390Sstevel@tonic-gate root: root+client1@server 32400Sstevel@tonic-gate 32410Sstevel@tonic-gate On the server, this will match an alias for "root+client1". 32420Sstevel@tonic-gate If that is not found, the alias "root+*" will be tried, 32430Sstevel@tonic-gate then "root". 32440Sstevel@tonic-gate 32450Sstevel@tonic-gate 32460Sstevel@tonic-gate+----------------+ 32470Sstevel@tonic-gate| SECURITY NOTES | 32480Sstevel@tonic-gate+----------------+ 32490Sstevel@tonic-gate 32500Sstevel@tonic-gateA lot of sendmail security comes down to you. Sendmail 8 is much 32510Sstevel@tonic-gatemore careful about checking for security problems than previous 32520Sstevel@tonic-gateversions, but there are some things that you still need to watch 32530Sstevel@tonic-gatefor. In particular: 32540Sstevel@tonic-gate 32550Sstevel@tonic-gate* Make sure the aliases file is not writable except by trusted 32560Sstevel@tonic-gate system personnel. This includes both the text and database 32570Sstevel@tonic-gate version. 32580Sstevel@tonic-gate 32590Sstevel@tonic-gate* Make sure that other files that sendmail reads, such as the 32600Sstevel@tonic-gate mailertable, are only writable by trusted system personnel. 32610Sstevel@tonic-gate 32620Sstevel@tonic-gate* The queue directory should not be world writable PARTICULARLY 32630Sstevel@tonic-gate if your system allows "file giveaways" (that is, if a non-root 32640Sstevel@tonic-gate user can chown any file they own to any other user). 32650Sstevel@tonic-gate 32660Sstevel@tonic-gate* If your system allows file giveaways, DO NOT create a publically 32670Sstevel@tonic-gate writable directory for forward files. This will allow anyone 32680Sstevel@tonic-gate to steal anyone else's e-mail. Instead, create a script that 32690Sstevel@tonic-gate copies the .forward file from users' home directories once a 32700Sstevel@tonic-gate night (if you want the non-NFS-mounted forward directory). 32710Sstevel@tonic-gate 32720Sstevel@tonic-gate* If your system allows file giveaways, you'll find that 32730Sstevel@tonic-gate sendmail is much less trusting of :include: files -- in 32740Sstevel@tonic-gate particular, you'll have to have /SENDMAIL/ANY/SHELL/ in 32750Sstevel@tonic-gate /etc/shells before they will be trusted (that is, before 32760Sstevel@tonic-gate files and programs listed in them will be honored). 32770Sstevel@tonic-gate 32780Sstevel@tonic-gateIn general, file giveaways are a mistake -- if you can turn them 32790Sstevel@tonic-gateoff, do so. 32800Sstevel@tonic-gate 32810Sstevel@tonic-gate 32820Sstevel@tonic-gate+--------------------------------+ 32830Sstevel@tonic-gate| TWEAKING CONFIGURATION OPTIONS | 32840Sstevel@tonic-gate+--------------------------------+ 32850Sstevel@tonic-gate 32860Sstevel@tonic-gateThere are a large number of configuration options that don't normally 32870Sstevel@tonic-gateneed to be changed. However, if you feel you need to tweak them, 32880Sstevel@tonic-gateyou can define the following M4 variables. Note that some of these 32890Sstevel@tonic-gatevariables require formats that are defined in RFC 2821 or RFC 2822. 32900Sstevel@tonic-gateBefore changing them you need to make sure you do not violate those 32910Sstevel@tonic-gate(and other relevant) RFCs. 32920Sstevel@tonic-gate 32930Sstevel@tonic-gateThis list is shown in four columns: the name you define, the default 32940Sstevel@tonic-gatevalue for that definition, the option or macro that is affected 32950Sstevel@tonic-gate(either Ox for an option or Dx for a macro), and a brief description. 32960Sstevel@tonic-gate 32970Sstevel@tonic-gateSome options are likely to be deprecated in future versions -- that is, 32980Sstevel@tonic-gatethe option is only included to provide back-compatibility. These are 32990Sstevel@tonic-gatemarked with "*". 33000Sstevel@tonic-gate 33010Sstevel@tonic-gateRemember that these options are M4 variables, and hence may need to 33020Sstevel@tonic-gatebe quoted. In particular, arguments with commas will usually have to 33030Sstevel@tonic-gatebe ``double quoted, like this phrase'' to avoid having the comma 33040Sstevel@tonic-gateconfuse things. This is common for alias file definitions and for 33050Sstevel@tonic-gatethe read timeout. 33060Sstevel@tonic-gate 33070Sstevel@tonic-gateM4 Variable Name Configuration [Default] & Description 33080Sstevel@tonic-gate================ ============= ======================= 33090Sstevel@tonic-gateconfMAILER_NAME $n macro [MAILER-DAEMON] The sender name used 33100Sstevel@tonic-gate for internally generated outgoing 33110Sstevel@tonic-gate messages. 33120Sstevel@tonic-gateconfDOMAIN_NAME $j macro If defined, sets $j. This should 33130Sstevel@tonic-gate only be done if your system cannot 33140Sstevel@tonic-gate determine your local domain name, 33150Sstevel@tonic-gate and then it should be set to 33160Sstevel@tonic-gate $w.Foo.COM, where Foo.COM is your 33170Sstevel@tonic-gate domain name. 33180Sstevel@tonic-gateconfCF_VERSION $Z macro If defined, this is appended to the 33190Sstevel@tonic-gate configuration version name. 33200Sstevel@tonic-gateconfLDAP_CLUSTER ${sendmailMTACluster} macro 33210Sstevel@tonic-gate If defined, this is the LDAP 33220Sstevel@tonic-gate cluster to use for LDAP searches 33230Sstevel@tonic-gate as described above in ``USING LDAP 33240Sstevel@tonic-gate FOR ALIASES, MAPS, AND CLASSES''. 33250Sstevel@tonic-gateconfFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an 33260Sstevel@tonic-gate internally generated From: address. 33270Sstevel@tonic-gateconfRECEIVED_HEADER Received: 33280Sstevel@tonic-gate [$?sfrom $s $.$?_($?s$|from $.$_) 33290Sstevel@tonic-gate $.$?{auth_type}(authenticated) 33300Sstevel@tonic-gate $.by $j ($v/$Z)$?r with $r$. id $i$?u 33310Sstevel@tonic-gate for $u; $|; 33320Sstevel@tonic-gate $.$b] 33330Sstevel@tonic-gate The format of the Received: header 33340Sstevel@tonic-gate in messages passed through this host. 33350Sstevel@tonic-gate It is unwise to try to change this. 33360Sstevel@tonic-gateconfMESSAGEID_HEADER Message-Id: [<$t.$i@$j>] The format of an 33370Sstevel@tonic-gate internally generated Message-Id: 33380Sstevel@tonic-gate header. 33390Sstevel@tonic-gateconfCW_FILE Fw class [/etc/mail/local-host-names] Name 33400Sstevel@tonic-gate of file used to get the local 33410Sstevel@tonic-gate additions to class {w} (local host 33420Sstevel@tonic-gate names). 33430Sstevel@tonic-gateconfCT_FILE Ft class [/etc/mail/trusted-users] Name of 33440Sstevel@tonic-gate file used to get the local additions 33450Sstevel@tonic-gate to class {t} (trusted users). 33460Sstevel@tonic-gateconfCR_FILE FR class [/etc/mail/relay-domains] Name of 33470Sstevel@tonic-gate file used to get the local additions 33480Sstevel@tonic-gate to class {R} (hosts allowed to relay). 33490Sstevel@tonic-gateconfTRUSTED_USERS Ct class [no default] Names of users to add to 33500Sstevel@tonic-gate the list of trusted users. This list 33510Sstevel@tonic-gate always includes root, uucp, and daemon. 33520Sstevel@tonic-gate See also FEATURE(`use_ct_file'). 33530Sstevel@tonic-gateconfTRUSTED_USER TrustedUser [no default] Trusted user for file 33540Sstevel@tonic-gate ownership and starting the daemon. 33550Sstevel@tonic-gate Not to be confused with 33560Sstevel@tonic-gate confTRUSTED_USERS (see above). 33570Sstevel@tonic-gateconfSMTP_MAILER - [esmtp] The mailer name used when 33580Sstevel@tonic-gate SMTP connectivity is required. 33590Sstevel@tonic-gate One of "smtp", "smtp8", 33600Sstevel@tonic-gate "esmtp", or "dsmtp". 33610Sstevel@tonic-gateconfUUCP_MAILER - [uucp-old] The mailer to be used by 33620Sstevel@tonic-gate default for bang-format recipient 33630Sstevel@tonic-gate addresses. See also discussion of 33640Sstevel@tonic-gate class {U}, class {Y}, and class {Z} 33650Sstevel@tonic-gate in the MAILER(`uucp') section. 33660Sstevel@tonic-gateconfLOCAL_MAILER - [local] The mailer name used when 33670Sstevel@tonic-gate local connectivity is required. 33680Sstevel@tonic-gate Almost always "local". 33690Sstevel@tonic-gateconfRELAY_MAILER - [relay] The default mailer name used 33700Sstevel@tonic-gate for relaying any mail (e.g., to a 33710Sstevel@tonic-gate BITNET_RELAY, a SMART_HOST, or 33720Sstevel@tonic-gate whatever). This can reasonably be 33730Sstevel@tonic-gate "uucp-new" if you are on a 33740Sstevel@tonic-gate UUCP-connected site. 33750Sstevel@tonic-gateconfSEVEN_BIT_INPUT SevenBitInput [False] Force input to seven bits? 33760Sstevel@tonic-gateconfEIGHT_BIT_HANDLING EightBitMode [pass8] 8-bit data handling 33770Sstevel@tonic-gateconfALIAS_WAIT AliasWait [10m] Time to wait for alias file 33780Sstevel@tonic-gate rebuild until you get bored and 33790Sstevel@tonic-gate decide that the apparently pending 33800Sstevel@tonic-gate rebuild failed. 33810Sstevel@tonic-gateconfMIN_FREE_BLOCKS MinFreeBlocks [100] Minimum number of free blocks on 33820Sstevel@tonic-gate queue filesystem to accept SMTP mail. 33830Sstevel@tonic-gate (Prior to 8.7 this was minfree/maxsize, 33840Sstevel@tonic-gate where minfree was the number of free 33850Sstevel@tonic-gate blocks and maxsize was the maximum 33860Sstevel@tonic-gate message size. Use confMAX_MESSAGE_SIZE 33870Sstevel@tonic-gate for the second value now.) 33880Sstevel@tonic-gateconfMAX_MESSAGE_SIZE MaxMessageSize [infinite] The maximum size of messages 33890Sstevel@tonic-gate that will be accepted (in bytes). 33900Sstevel@tonic-gateconfBLANK_SUB BlankSub [.] Blank (space) substitution 33910Sstevel@tonic-gate character. 33920Sstevel@tonic-gateconfCON_EXPENSIVE HoldExpensive [False] Avoid connecting immediately 33930Sstevel@tonic-gate to mailers marked expensive. 33940Sstevel@tonic-gateconfCHECKPOINT_INTERVAL CheckpointInterval 33950Sstevel@tonic-gate [10] Checkpoint queue files every N 33960Sstevel@tonic-gate recipients. 33970Sstevel@tonic-gateconfDELIVERY_MODE DeliveryMode [background] Default delivery mode. 33980Sstevel@tonic-gateconfERROR_MODE ErrorMode [print] Error message mode. 33990Sstevel@tonic-gateconfERROR_MESSAGE ErrorHeader [undefined] Error message header/file. 34000Sstevel@tonic-gateconfSAVE_FROM_LINES SaveFromLine Save extra leading From_ lines. 34010Sstevel@tonic-gateconfTEMP_FILE_MODE TempFileMode [0600] Temporary file mode. 34020Sstevel@tonic-gateconfMATCH_GECOS MatchGECOS [False] Match GECOS field. 34030Sstevel@tonic-gateconfMAX_HOP MaxHopCount [25] Maximum hop count. 34040Sstevel@tonic-gateconfIGNORE_DOTS* IgnoreDots [False; always False in -bs or -bd 34050Sstevel@tonic-gate mode] Ignore dot as terminator for 34060Sstevel@tonic-gate incoming messages? 34070Sstevel@tonic-gateconfBIND_OPTS ResolverOptions [undefined] Default options for DNS 34080Sstevel@tonic-gate resolver. 34090Sstevel@tonic-gateconfMIME_FORMAT_ERRORS* SendMimeErrors [True] Send error messages as MIME- 34100Sstevel@tonic-gate encapsulated messages per RFC 1344. 34110Sstevel@tonic-gateconfFORWARD_PATH ForwardPath [$z/.forward.$w:$z/.forward] 34120Sstevel@tonic-gate The colon-separated list of places to 34130Sstevel@tonic-gate search for .forward files. N.B.: see 34140Sstevel@tonic-gate the Security Notes section. 34150Sstevel@tonic-gateconfMCI_CACHE_SIZE ConnectionCacheSize 34160Sstevel@tonic-gate [2] Size of open connection cache. 34170Sstevel@tonic-gateconfMCI_CACHE_TIMEOUT ConnectionCacheTimeout 34180Sstevel@tonic-gate [5m] Open connection cache timeout. 34190Sstevel@tonic-gateconfHOST_STATUS_DIRECTORY HostStatusDirectory 34200Sstevel@tonic-gate [undefined] If set, host status is kept 34210Sstevel@tonic-gate on disk between sendmail runs in the 34220Sstevel@tonic-gate named directory tree. This need not be 34230Sstevel@tonic-gate a full pathname, in which case it is 34240Sstevel@tonic-gate interpreted relative to the queue 34250Sstevel@tonic-gate directory. 34260Sstevel@tonic-gateconfSINGLE_THREAD_DELIVERY SingleThreadDelivery 34270Sstevel@tonic-gate [False] If this option and the 34280Sstevel@tonic-gate HostStatusDirectory option are both 34290Sstevel@tonic-gate set, single thread deliveries to other 34300Sstevel@tonic-gate hosts. That is, don't allow any two 34310Sstevel@tonic-gate sendmails on this host to connect 34320Sstevel@tonic-gate simultaneously to any other single 34330Sstevel@tonic-gate host. This can slow down delivery in 34340Sstevel@tonic-gate some cases, in particular since a 34350Sstevel@tonic-gate cached but otherwise idle connection 34360Sstevel@tonic-gate to a host will prevent other sendmails 34370Sstevel@tonic-gate from connecting to the other host. 34380Sstevel@tonic-gateconfUSE_ERRORS_TO* UseErrorsTo [False] Use the Errors-To: header to 34390Sstevel@tonic-gate deliver error messages. This should 34400Sstevel@tonic-gate not be necessary because of general 34410Sstevel@tonic-gate acceptance of the envelope/header 34420Sstevel@tonic-gate distinction. 34430Sstevel@tonic-gateconfLOG_LEVEL LogLevel [9] Log level. 34440Sstevel@tonic-gateconfME_TOO MeToo [True] Include sender in group 34450Sstevel@tonic-gate expansions. This option is 34460Sstevel@tonic-gate deprecated and will be removed from 34470Sstevel@tonic-gate a future version. 34480Sstevel@tonic-gateconfCHECK_ALIASES CheckAliases [False] Check RHS of aliases when 34490Sstevel@tonic-gate running newaliases. Since this does 34500Sstevel@tonic-gate DNS lookups on every address, it can 34510Sstevel@tonic-gate slow down the alias rebuild process 34520Sstevel@tonic-gate considerably on large alias files. 34530Sstevel@tonic-gateconfOLD_STYLE_HEADERS* OldStyleHeaders [True] Assume that headers without 34540Sstevel@tonic-gate special chars are old style. 34550Sstevel@tonic-gateconfPRIVACY_FLAGS PrivacyOptions [authwarnings] Privacy flags. 34560Sstevel@tonic-gateconfCOPY_ERRORS_TO PostmasterCopy [undefined] Address for additional 34570Sstevel@tonic-gate copies of all error messages. 34580Sstevel@tonic-gateconfQUEUE_FACTOR QueueFactor [600000] Slope of queue-only function. 34590Sstevel@tonic-gateconfQUEUE_FILE_MODE QueueFileMode [undefined] Default permissions for 34600Sstevel@tonic-gate queue files (octal). If not set, 34610Sstevel@tonic-gate sendmail uses 0600 unless its real 34620Sstevel@tonic-gate and effective uid are different in 34630Sstevel@tonic-gate which case it uses 0644. 34640Sstevel@tonic-gateconfDONT_PRUNE_ROUTES DontPruneRoutes [False] Don't prune down route-addr 34650Sstevel@tonic-gate syntax addresses to the minimum 34660Sstevel@tonic-gate possible. 34670Sstevel@tonic-gateconfSAFE_QUEUE* SuperSafe [True] Commit all messages to disk 34680Sstevel@tonic-gate before forking. 34690Sstevel@tonic-gateconfTO_INITIAL Timeout.initial [5m] The timeout waiting for a response 34700Sstevel@tonic-gate on the initial connect. 34710Sstevel@tonic-gateconfTO_CONNECT Timeout.connect [0] The timeout waiting for an initial 34720Sstevel@tonic-gate connect() to complete. This can only 34730Sstevel@tonic-gate shorten connection timeouts; the kernel 34740Sstevel@tonic-gate silently enforces an absolute maximum 34750Sstevel@tonic-gate (which varies depending on the system). 34760Sstevel@tonic-gateconfTO_ICONNECT Timeout.iconnect 34770Sstevel@tonic-gate [undefined] Like Timeout.connect, but 34780Sstevel@tonic-gate applies only to the very first attempt 34790Sstevel@tonic-gate to connect to a host in a message. 34800Sstevel@tonic-gate This allows a single very fast pass 34810Sstevel@tonic-gate followed by more careful delivery 34820Sstevel@tonic-gate attempts in the future. 34830Sstevel@tonic-gateconfTO_ACONNECT Timeout.aconnect 34840Sstevel@tonic-gate [0] The overall timeout waiting for 34850Sstevel@tonic-gate all connection for a single delivery 34860Sstevel@tonic-gate attempt to succeed. If 0, no overall 34870Sstevel@tonic-gate limit is applied. 34880Sstevel@tonic-gateconfTO_HELO Timeout.helo [5m] The timeout waiting for a response 34890Sstevel@tonic-gate to a HELO or EHLO command. 34900Sstevel@tonic-gateconfTO_MAIL Timeout.mail [10m] The timeout waiting for a 34910Sstevel@tonic-gate response to the MAIL command. 34920Sstevel@tonic-gateconfTO_RCPT Timeout.rcpt [1h] The timeout waiting for a response 34930Sstevel@tonic-gate to the RCPT command. 34940Sstevel@tonic-gateconfTO_DATAINIT Timeout.datainit 34950Sstevel@tonic-gate [5m] The timeout waiting for a 354 34960Sstevel@tonic-gate response from the DATA command. 34970Sstevel@tonic-gateconfTO_DATABLOCK Timeout.datablock 34980Sstevel@tonic-gate [1h] The timeout waiting for a block 34990Sstevel@tonic-gate during DATA phase. 35000Sstevel@tonic-gateconfTO_DATAFINAL Timeout.datafinal 35010Sstevel@tonic-gate [1h] The timeout waiting for a response 35020Sstevel@tonic-gate to the final "." that terminates a 35030Sstevel@tonic-gate message. 35040Sstevel@tonic-gateconfTO_RSET Timeout.rset [5m] The timeout waiting for a response 35050Sstevel@tonic-gate to the RSET command. 35060Sstevel@tonic-gateconfTO_QUIT Timeout.quit [2m] The timeout waiting for a response 35070Sstevel@tonic-gate to the QUIT command. 35080Sstevel@tonic-gateconfTO_MISC Timeout.misc [2m] The timeout waiting for a response 35090Sstevel@tonic-gate to other SMTP commands. 35100Sstevel@tonic-gateconfTO_COMMAND Timeout.command [1h] In server SMTP, the timeout 35110Sstevel@tonic-gate waiting for a command to be issued. 35120Sstevel@tonic-gateconfTO_IDENT Timeout.ident [5s] The timeout waiting for a 35130Sstevel@tonic-gate response to an IDENT query. 35140Sstevel@tonic-gateconfTO_FILEOPEN Timeout.fileopen 35150Sstevel@tonic-gate [60s] The timeout waiting for a file 35160Sstevel@tonic-gate (e.g., :include: file) to be opened. 35170Sstevel@tonic-gateconfTO_LHLO Timeout.lhlo [2m] The timeout waiting for a response 35180Sstevel@tonic-gate to an LMTP LHLO command. 35190Sstevel@tonic-gateconfTO_STARTTLS Timeout.starttls 35200Sstevel@tonic-gate [1h] The timeout waiting for a 35210Sstevel@tonic-gate response to an SMTP STARTTLS command. 35220Sstevel@tonic-gateconfTO_CONTROL Timeout.control 35230Sstevel@tonic-gate [2m] The timeout for a complete 35240Sstevel@tonic-gate control socket transaction to complete. 35250Sstevel@tonic-gateconfTO_QUEUERETURN Timeout.queuereturn 35260Sstevel@tonic-gate [5d] The timeout before a message is 35270Sstevel@tonic-gate returned as undeliverable. 35280Sstevel@tonic-gateconfTO_QUEUERETURN_NORMAL 35290Sstevel@tonic-gate Timeout.queuereturn.normal 35300Sstevel@tonic-gate [undefined] As above, for normal 35310Sstevel@tonic-gate priority messages. 35320Sstevel@tonic-gateconfTO_QUEUERETURN_URGENT 35330Sstevel@tonic-gate Timeout.queuereturn.urgent 35340Sstevel@tonic-gate [undefined] As above, for urgent 35350Sstevel@tonic-gate priority messages. 35360Sstevel@tonic-gateconfTO_QUEUERETURN_NONURGENT 35370Sstevel@tonic-gate Timeout.queuereturn.non-urgent 35380Sstevel@tonic-gate [undefined] As above, for non-urgent 35390Sstevel@tonic-gate (low) priority messages. 35400Sstevel@tonic-gateconfTO_QUEUERETURN_DSN 35410Sstevel@tonic-gate Timeout.queuereturn.dsn 35420Sstevel@tonic-gate [undefined] As above, for delivery 35430Sstevel@tonic-gate status notification messages. 35440Sstevel@tonic-gateconfTO_QUEUEWARN Timeout.queuewarn 35450Sstevel@tonic-gate [4h] The timeout before a warning 35460Sstevel@tonic-gate message is sent to the sender telling 35470Sstevel@tonic-gate them that the message has been 35480Sstevel@tonic-gate deferred. 35490Sstevel@tonic-gateconfTO_QUEUEWARN_NORMAL Timeout.queuewarn.normal 35500Sstevel@tonic-gate [undefined] As above, for normal 35510Sstevel@tonic-gate priority messages. 35520Sstevel@tonic-gateconfTO_QUEUEWARN_URGENT Timeout.queuewarn.urgent 35530Sstevel@tonic-gate [undefined] As above, for urgent 35540Sstevel@tonic-gate priority messages. 35550Sstevel@tonic-gateconfTO_QUEUEWARN_NONURGENT 35560Sstevel@tonic-gate Timeout.queuewarn.non-urgent 35570Sstevel@tonic-gate [undefined] As above, for non-urgent 35580Sstevel@tonic-gate (low) priority messages. 35590Sstevel@tonic-gateconfTO_QUEUEWARN_DSN 35600Sstevel@tonic-gate Timeout.queuewarn.dsn 35610Sstevel@tonic-gate [undefined] As above, for delivery 35620Sstevel@tonic-gate status notification messages. 35630Sstevel@tonic-gateconfTO_HOSTSTATUS Timeout.hoststatus 35640Sstevel@tonic-gate [30m] How long information about host 35650Sstevel@tonic-gate statuses will be maintained before it 35660Sstevel@tonic-gate is considered stale and the host should 35670Sstevel@tonic-gate be retried. This applies both within 35680Sstevel@tonic-gate a single queue run and to persistent 35690Sstevel@tonic-gate information (see below). 35700Sstevel@tonic-gateconfTO_RESOLVER_RETRANS Timeout.resolver.retrans 35710Sstevel@tonic-gate [varies] Sets the resolver's 35720Sstevel@tonic-gate retransmission time interval (in 35730Sstevel@tonic-gate seconds). Sets both 35740Sstevel@tonic-gate Timeout.resolver.retrans.first and 35750Sstevel@tonic-gate Timeout.resolver.retrans.normal. 35760Sstevel@tonic-gateconfTO_RESOLVER_RETRANS_FIRST Timeout.resolver.retrans.first 35770Sstevel@tonic-gate [varies] Sets the resolver's 35780Sstevel@tonic-gate retransmission time interval (in 35790Sstevel@tonic-gate seconds) for the first attempt to 35800Sstevel@tonic-gate deliver a message. 35810Sstevel@tonic-gateconfTO_RESOLVER_RETRANS_NORMAL Timeout.resolver.retrans.normal 35820Sstevel@tonic-gate [varies] Sets the resolver's 35830Sstevel@tonic-gate retransmission time interval (in 35840Sstevel@tonic-gate seconds) for all resolver lookups 35850Sstevel@tonic-gate except the first delivery attempt. 35860Sstevel@tonic-gateconfTO_RESOLVER_RETRY Timeout.resolver.retry 35870Sstevel@tonic-gate [varies] Sets the number of times 35880Sstevel@tonic-gate to retransmit a resolver query. 35890Sstevel@tonic-gate Sets both 35900Sstevel@tonic-gate Timeout.resolver.retry.first and 35910Sstevel@tonic-gate Timeout.resolver.retry.normal. 35920Sstevel@tonic-gateconfTO_RESOLVER_RETRY_FIRST Timeout.resolver.retry.first 35930Sstevel@tonic-gate [varies] Sets the number of times 35940Sstevel@tonic-gate to retransmit a resolver query for 35950Sstevel@tonic-gate the first attempt to deliver a 35960Sstevel@tonic-gate message. 35970Sstevel@tonic-gateconfTO_RESOLVER_RETRY_NORMAL Timeout.resolver.retry.normal 35980Sstevel@tonic-gate [varies] Sets the number of times 35990Sstevel@tonic-gate to retransmit a resolver query for 36000Sstevel@tonic-gate all resolver lookups except the 36010Sstevel@tonic-gate first delivery attempt. 36020Sstevel@tonic-gateconfTIME_ZONE TimeZoneSpec [USE_SYSTEM] Time zone info -- can be 36030Sstevel@tonic-gate USE_SYSTEM to use the system's idea, 36040Sstevel@tonic-gate USE_TZ to use the user's TZ envariable, 36050Sstevel@tonic-gate or something else to force that value. 36060Sstevel@tonic-gateconfDEF_USER_ID DefaultUser [1:1] Default user id. 36070Sstevel@tonic-gateconfUSERDB_SPEC UserDatabaseSpec 36080Sstevel@tonic-gate [undefined] User database 36090Sstevel@tonic-gate specification. 36100Sstevel@tonic-gateconfFALLBACK_MX FallbackMXhost [undefined] Fallback MX host. 36110Sstevel@tonic-gateconfFALLBACK_SMARTHOST FallbackSmartHost 36120Sstevel@tonic-gate [undefined] Fallback smart host. 36130Sstevel@tonic-gateconfTRY_NULL_MX_LIST TryNullMXList [False] If this host is the best MX 36140Sstevel@tonic-gate for a host and other arrangements 36150Sstevel@tonic-gate haven't been made, try connecting 36160Sstevel@tonic-gate to the host directly; normally this 36170Sstevel@tonic-gate would be a config error. 36180Sstevel@tonic-gateconfQUEUE_LA QueueLA [varies] Load average at which 36190Sstevel@tonic-gate queue-only function kicks in. 36200Sstevel@tonic-gate Default values is (8 * numproc) 36210Sstevel@tonic-gate where numproc is the number of 36220Sstevel@tonic-gate processors online (if that can be 36230Sstevel@tonic-gate determined). 36240Sstevel@tonic-gateconfREFUSE_LA RefuseLA [varies] Load average at which 36250Sstevel@tonic-gate incoming SMTP connections are 36260Sstevel@tonic-gate refused. Default values is (12 * 36270Sstevel@tonic-gate numproc) where numproc is the 36280Sstevel@tonic-gate number of processors online (if 36290Sstevel@tonic-gate that can be determined). 36300Sstevel@tonic-gateconfREJECT_LOG_INTERVAL RejectLogInterval [3h] Log interval when 36310Sstevel@tonic-gate refusing connections for this long. 36320Sstevel@tonic-gateconfDELAY_LA DelayLA [0] Load average at which sendmail 36330Sstevel@tonic-gate will sleep for one second on most 36340Sstevel@tonic-gate SMTP commands and before accepting 36350Sstevel@tonic-gate connections. 0 means no limit. 36360Sstevel@tonic-gateconfMAX_ALIAS_RECURSION MaxAliasRecursion 36370Sstevel@tonic-gate [10] Maximum depth of alias recursion. 36380Sstevel@tonic-gateconfMAX_DAEMON_CHILDREN MaxDaemonChildren 36390Sstevel@tonic-gate [undefined] The maximum number of 36400Sstevel@tonic-gate children the daemon will permit. After 36410Sstevel@tonic-gate this number, connections will be 36420Sstevel@tonic-gate rejected. If not set or <= 0, there is 36430Sstevel@tonic-gate no limit. 36440Sstevel@tonic-gateconfMAX_HEADERS_LENGTH MaxHeadersLength 36450Sstevel@tonic-gate [32768] Maximum length of the sum 36460Sstevel@tonic-gate of all headers. 36470Sstevel@tonic-gateconfMAX_MIME_HEADER_LENGTH MaxMimeHeaderLength 36480Sstevel@tonic-gate [undefined] Maximum length of 36490Sstevel@tonic-gate certain MIME header field values. 36500Sstevel@tonic-gateconfCONNECTION_RATE_THROTTLE ConnectionRateThrottle 36510Sstevel@tonic-gate [undefined] The maximum number of 36520Sstevel@tonic-gate connections permitted per second per 36530Sstevel@tonic-gate daemon. After this many connections 36540Sstevel@tonic-gate are accepted, further connections 36550Sstevel@tonic-gate will be delayed. If not set or <= 0, 36560Sstevel@tonic-gate there is no limit. 36570Sstevel@tonic-gateconfCONNECTION_RATE_WINDOW_SIZE ConnectionRateWindowSize 36580Sstevel@tonic-gate [60s] Define the length of the 36590Sstevel@tonic-gate interval for which the number of 36600Sstevel@tonic-gate incoming connections is maintained. 36610Sstevel@tonic-gateconfWORK_RECIPIENT_FACTOR 36620Sstevel@tonic-gate RecipientFactor [30000] Cost of each recipient. 36630Sstevel@tonic-gateconfSEPARATE_PROC ForkEachJob [False] Run all deliveries in a 36640Sstevel@tonic-gate separate process. 36650Sstevel@tonic-gateconfWORK_CLASS_FACTOR ClassFactor [1800] Priority multiplier for class. 36660Sstevel@tonic-gateconfWORK_TIME_FACTOR RetryFactor [90000] Cost of each delivery attempt. 36670Sstevel@tonic-gateconfQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: 36680Sstevel@tonic-gate Priority, Host, Filename, Random, 36690Sstevel@tonic-gate Modification, or Time. 36700Sstevel@tonic-gateconfMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job 36710Sstevel@tonic-gate must sit in the queue between queue 36720Sstevel@tonic-gate runs. This allows you to set the 36730Sstevel@tonic-gate queue run interval low for better 36740Sstevel@tonic-gate responsiveness without trying all 36750Sstevel@tonic-gate jobs in each run. 36760Sstevel@tonic-gateconfDEF_CHAR_SET DefaultCharSet [unknown-8bit] When converting 36770Sstevel@tonic-gate unlabeled 8 bit input to MIME, the 36780Sstevel@tonic-gate character set to use by default. 36790Sstevel@tonic-gateconfSERVICE_SWITCH_FILE ServiceSwitchFile 36800Sstevel@tonic-gate [/etc/mail/service.switch] The file 36810Sstevel@tonic-gate to use for the service switch on 36820Sstevel@tonic-gate systems that do not have a 36830Sstevel@tonic-gate system-defined switch. 36840Sstevel@tonic-gateconfHOSTS_FILE HostsFile [/etc/hosts] The file to use when doing 36850Sstevel@tonic-gate "file" type access of hosts names. 36860Sstevel@tonic-gateconfDIAL_DELAY DialDelay [0s] If a connection fails, wait this 36870Sstevel@tonic-gate long and try again. Zero means "don't 36880Sstevel@tonic-gate retry". This is to allow "dial on 36890Sstevel@tonic-gate demand" connections to have enough time 36900Sstevel@tonic-gate to complete a connection. 36910Sstevel@tonic-gateconfNO_RCPT_ACTION NoRecipientAction 36920Sstevel@tonic-gate [none] What to do if there are no legal 36930Sstevel@tonic-gate recipient fields (To:, Cc: or Bcc:) 36940Sstevel@tonic-gate in the message. Legal values can 36950Sstevel@tonic-gate be "none" to just leave the 36960Sstevel@tonic-gate nonconforming message as is, "add-to" 36970Sstevel@tonic-gate to add a To: header with all the 36980Sstevel@tonic-gate known recipients (which may expose 36990Sstevel@tonic-gate blind recipients), "add-apparently-to" 37000Sstevel@tonic-gate to do the same but use Apparently-To: 37010Sstevel@tonic-gate instead of To: (strongly discouraged 37020Sstevel@tonic-gate in accordance with IETF standards), 37030Sstevel@tonic-gate "add-bcc" to add an empty Bcc: 37040Sstevel@tonic-gate header, or "add-to-undisclosed" to 37050Sstevel@tonic-gate add the header 37060Sstevel@tonic-gate ``To: undisclosed-recipients:;''. 37070Sstevel@tonic-gateconfSAFE_FILE_ENV SafeFileEnvironment 37080Sstevel@tonic-gate [undefined] If set, sendmail will do a 37090Sstevel@tonic-gate chroot() into this directory before 37100Sstevel@tonic-gate writing files. 37110Sstevel@tonic-gateconfCOLON_OK_IN_ADDR ColonOkInAddr [True unless Configuration Level > 6] 37120Sstevel@tonic-gate If set, colons are treated as a regular 37130Sstevel@tonic-gate character in addresses. If not set, 37140Sstevel@tonic-gate they are treated as the introducer to 37150Sstevel@tonic-gate the RFC 822 "group" syntax. Colons are 37160Sstevel@tonic-gate handled properly in route-addrs. This 37170Sstevel@tonic-gate option defaults on for V5 and lower 37180Sstevel@tonic-gate configuration files. 37190Sstevel@tonic-gateconfMAX_QUEUE_RUN_SIZE MaxQueueRunSize [0] If set, limit the maximum size of 37200Sstevel@tonic-gate any given queue run to this number of 37210Sstevel@tonic-gate entries. Essentially, this will stop 37220Sstevel@tonic-gate reading each queue directory after this 37230Sstevel@tonic-gate number of entries are reached; it does 37240Sstevel@tonic-gate _not_ pick the highest priority jobs, 37250Sstevel@tonic-gate so this should be as large as your 37260Sstevel@tonic-gate system can tolerate. If not set, there 37270Sstevel@tonic-gate is no limit. 37280Sstevel@tonic-gateconfMAX_QUEUE_CHILDREN MaxQueueChildren 37290Sstevel@tonic-gate [undefined] Limits the maximum number 37300Sstevel@tonic-gate of concurrent queue runners active. 37310Sstevel@tonic-gate This is to keep system resources used 37320Sstevel@tonic-gate within a reasonable limit. Relates to 37330Sstevel@tonic-gate Queue Groups and ForkEachJob. 37340Sstevel@tonic-gateconfMAX_RUNNERS_PER_QUEUE MaxRunnersPerQueue 37350Sstevel@tonic-gate [1] Only active when MaxQueueChildren 37360Sstevel@tonic-gate defined. Controls the maximum number 37370Sstevel@tonic-gate of queue runners (aka queue children) 37380Sstevel@tonic-gate active at the same time in a work 37390Sstevel@tonic-gate group. See also MaxQueueChildren. 37400Sstevel@tonic-gateconfDONT_EXPAND_CNAMES DontExpandCnames 37410Sstevel@tonic-gate [False] If set, $[ ... $] lookups that 37420Sstevel@tonic-gate do DNS based lookups do not expand 37430Sstevel@tonic-gate CNAME records. This currently violates 37440Sstevel@tonic-gate the published standards, but the IETF 37450Sstevel@tonic-gate seems to be moving toward legalizing 37460Sstevel@tonic-gate this. For example, if "FTP.Foo.ORG" 37470Sstevel@tonic-gate is a CNAME for "Cruft.Foo.ORG", then 37480Sstevel@tonic-gate with this option set a lookup of 37490Sstevel@tonic-gate "FTP" will return "FTP.Foo.ORG"; if 37500Sstevel@tonic-gate clear it returns "Cruft.FOO.ORG". N.B. 37510Sstevel@tonic-gate you may not see any effect until your 37520Sstevel@tonic-gate downstream neighbors stop doing CNAME 37530Sstevel@tonic-gate lookups as well. 37540Sstevel@tonic-gateconfFROM_LINE UnixFromLine [From $g $d] The From_ line used 37550Sstevel@tonic-gate when sending to files or programs. 37560Sstevel@tonic-gateconfSINGLE_LINE_FROM_HEADER SingleLineFromHeader 37570Sstevel@tonic-gate [False] From: lines that have 37580Sstevel@tonic-gate embedded newlines are unwrapped 37590Sstevel@tonic-gate onto one line. 37600Sstevel@tonic-gateconfALLOW_BOGUS_HELO AllowBogusHELO [False] Allow HELO SMTP command that 37610Sstevel@tonic-gate does not include a host name. 37620Sstevel@tonic-gateconfMUST_QUOTE_CHARS MustQuoteChars [.'] Characters to be quoted in a full 37630Sstevel@tonic-gate name phrase (@,;:\()[] are automatic). 37640Sstevel@tonic-gateconfOPERATORS OperatorChars [.:%@!^/[]+] Address operator 37650Sstevel@tonic-gate characters. 37660Sstevel@tonic-gateconfSMTP_LOGIN_MSG SmtpGreetingMessage 37670Sstevel@tonic-gate [$j Sendmail $v/$Z; $b] 37680Sstevel@tonic-gate The initial (spontaneous) SMTP 37690Sstevel@tonic-gate greeting message. The word "ESMTP" 37700Sstevel@tonic-gate will be inserted between the first and 37710Sstevel@tonic-gate second words to convince other 37720Sstevel@tonic-gate sendmails to try to speak ESMTP. 37730Sstevel@tonic-gateconfDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3) 37740Sstevel@tonic-gate routine will never be invoked. You 37750Sstevel@tonic-gate might want to do this if you are 37760Sstevel@tonic-gate running NIS and you have a large group 37770Sstevel@tonic-gate map, since this call does a sequential 37780Sstevel@tonic-gate scan of the map; in a large site this 37790Sstevel@tonic-gate can cause your ypserv to run 37800Sstevel@tonic-gate essentially full time. If you set 37810Sstevel@tonic-gate this, agents run on behalf of users 37820Sstevel@tonic-gate will only have their primary 37830Sstevel@tonic-gate (/etc/passwd) group permissions. 37840Sstevel@tonic-gateconfUNSAFE_GROUP_WRITES UnsafeGroupWrites 3785616Sjbeck [True] If set, group-writable 37860Sstevel@tonic-gate :include: and .forward files are 37870Sstevel@tonic-gate considered "unsafe", that is, programs 37880Sstevel@tonic-gate and files cannot be directly referenced 37890Sstevel@tonic-gate from such files. World-writable files 37900Sstevel@tonic-gate are always considered unsafe. 3791616Sjbeck Notice: this option is deprecated and 3792616Sjbeck will be removed in future versions; 3793616Sjbeck Set GroupWritableForwardFileSafe 3794616Sjbeck and GroupWritableIncludeFileSafe in 3795616Sjbeck DontBlameSendmail if required. 37960Sstevel@tonic-gateconfCONNECT_ONLY_TO ConnectOnlyTo [undefined] override connection 37970Sstevel@tonic-gate address (for testing). 37980Sstevel@tonic-gateconfCONTROL_SOCKET_NAME ControlSocketName 37990Sstevel@tonic-gate [undefined] Control socket for daemon 38000Sstevel@tonic-gate management. 38010Sstevel@tonic-gateconfDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress 38020Sstevel@tonic-gate [postmaster] If an error occurs when 38030Sstevel@tonic-gate sending an error message, send that 38040Sstevel@tonic-gate "double bounce" error message to this 38050Sstevel@tonic-gate address. If it expands to an empty 38060Sstevel@tonic-gate string, double bounces are dropped. 38073966SjbeckconfSOFT_BOUNCE SoftBounce [False] If set, issue temporary errors 38083966Sjbeck (4xy) instead of permanent errors 38093966Sjbeck (5xy). This can be useful during 38103966Sjbeck testing of a new configuration to 38113966Sjbeck avoid erroneous bouncing of mails. 38120Sstevel@tonic-gateconfDEAD_LETTER_DROP DeadLetterDrop [undefined] Filename to save bounce 38130Sstevel@tonic-gate messages which could not be returned 38140Sstevel@tonic-gate to the user or sent to postmaster. 38150Sstevel@tonic-gate If not set, the queue file will 38160Sstevel@tonic-gate be renamed. 38170Sstevel@tonic-gateconfRRT_IMPLIES_DSN RrtImpliesDsn [False] Return-Receipt-To: header 38180Sstevel@tonic-gate implies DSN request. 38190Sstevel@tonic-gateconfRUN_AS_USER RunAsUser [undefined] If set, become this user 38200Sstevel@tonic-gate when reading and delivering mail. 38210Sstevel@tonic-gate Causes all file reads (e.g., .forward 38220Sstevel@tonic-gate and :include: files) to be done as 38230Sstevel@tonic-gate this user. Also, all programs will 38240Sstevel@tonic-gate be run as this user, and all output 38250Sstevel@tonic-gate files will be written as this user. 38260Sstevel@tonic-gateconfMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage 38270Sstevel@tonic-gate [infinite] If set, allow no more than 38280Sstevel@tonic-gate the specified number of recipients in 38290Sstevel@tonic-gate an SMTP envelope. Further recipients 38300Sstevel@tonic-gate receive a 452 error code (i.e., they 38310Sstevel@tonic-gate are deferred for the next delivery 38320Sstevel@tonic-gate attempt). 38330Sstevel@tonic-gateconfBAD_RCPT_THROTTLE BadRcptThrottle [infinite] If set and the specified 38340Sstevel@tonic-gate number of recipients in a single SMTP 38350Sstevel@tonic-gate transaction have been rejected, sleep 38360Sstevel@tonic-gate for one second after each subsequent 38370Sstevel@tonic-gate RCPT command in that transaction. 38380Sstevel@tonic-gateconfDONT_PROBE_INTERFACES DontProbeInterfaces 38390Sstevel@tonic-gate [False] If set, sendmail will _not_ 38400Sstevel@tonic-gate insert the names and addresses of any 38410Sstevel@tonic-gate local interfaces into class {w} 38420Sstevel@tonic-gate (list of known "equivalent" addresses). 38430Sstevel@tonic-gate If you set this, you must also include 38440Sstevel@tonic-gate some support for these addresses (e.g., 38450Sstevel@tonic-gate in a mailertable entry) -- otherwise, 38460Sstevel@tonic-gate mail to addresses in this list will 38470Sstevel@tonic-gate bounce with a configuration error. 38480Sstevel@tonic-gate If set to "loopback" (without 38490Sstevel@tonic-gate quotes), sendmail will skip 38500Sstevel@tonic-gate loopback interfaces (e.g., "lo0"). 38510Sstevel@tonic-gateconfPID_FILE PidFile [system dependent] Location of pid 38520Sstevel@tonic-gate file. 38530Sstevel@tonic-gateconfPROCESS_TITLE_PREFIX ProcessTitlePrefix 38540Sstevel@tonic-gate [undefined] Prefix string for the 38550Sstevel@tonic-gate process title shown on 'ps' listings. 38560Sstevel@tonic-gateconfDONT_BLAME_SENDMAIL DontBlameSendmail 38570Sstevel@tonic-gate [safe] Override sendmail's file 38580Sstevel@tonic-gate safety checks. This will definitely 38590Sstevel@tonic-gate compromise system security and should 38600Sstevel@tonic-gate not be used unless absolutely 38610Sstevel@tonic-gate necessary. 38620Sstevel@tonic-gateconfREJECT_MSG - [550 Access denied] The message 38630Sstevel@tonic-gate given if the access database contains 38640Sstevel@tonic-gate REJECT in the value portion. 38650Sstevel@tonic-gateconfRELAY_MSG - [550 Relaying denied] The message 38660Sstevel@tonic-gate given if an unauthorized relaying 38670Sstevel@tonic-gate attempt is rejected. 38680Sstevel@tonic-gateconfDF_BUFFER_SIZE DataFileBufferSize 38690Sstevel@tonic-gate [4096] The maximum size of a 38700Sstevel@tonic-gate memory-buffered data (df) file 38710Sstevel@tonic-gate before a disk-based file is used. 38720Sstevel@tonic-gateconfXF_BUFFER_SIZE XScriptFileBufferSize 38730Sstevel@tonic-gate [4096] The maximum size of a 38740Sstevel@tonic-gate memory-buffered transcript (xf) 38750Sstevel@tonic-gate file before a disk-based file is 38760Sstevel@tonic-gate used. 38770Sstevel@tonic-gateconfTLS_SRV_OPTIONS TLSSrvOptions If this option is 'V' no client 38780Sstevel@tonic-gate verification is performed, i.e., 38790Sstevel@tonic-gate the server doesn't ask for a 38800Sstevel@tonic-gate certificate. 38810Sstevel@tonic-gateconfLDAP_DEFAULT_SPEC LDAPDefaultSpec [undefined] Default map 38820Sstevel@tonic-gate specification for LDAP maps. The 38830Sstevel@tonic-gate value should only contain LDAP 38840Sstevel@tonic-gate specific settings such as "-h host 38850Sstevel@tonic-gate -p port -d bindDN", etc. The 38860Sstevel@tonic-gate settings will be used for all LDAP 38870Sstevel@tonic-gate maps unless they are specified in 38880Sstevel@tonic-gate the individual map specification 38890Sstevel@tonic-gate ('K' command). 38900Sstevel@tonic-gateconfCACERT_PATH CACertPath [undefined] Path to directory 38910Sstevel@tonic-gate with certs of CAs. 38920Sstevel@tonic-gateconfCACERT CACertFile [undefined] File containing one CA 38930Sstevel@tonic-gate cert. 38940Sstevel@tonic-gateconfSERVER_CERT ServerCertFile [undefined] File containing the 38950Sstevel@tonic-gate cert of the server, i.e., this cert 38960Sstevel@tonic-gate is used when sendmail acts as 38970Sstevel@tonic-gate server. 38980Sstevel@tonic-gateconfSERVER_KEY ServerKeyFile [undefined] File containing the 38990Sstevel@tonic-gate private key belonging to the server 39000Sstevel@tonic-gate cert. 39010Sstevel@tonic-gateconfCLIENT_CERT ClientCertFile [undefined] File containing the 39020Sstevel@tonic-gate cert of the client, i.e., this cert 39030Sstevel@tonic-gate is used when sendmail acts as 39040Sstevel@tonic-gate client. 39050Sstevel@tonic-gateconfCLIENT_KEY ClientKeyFile [undefined] File containing the 39060Sstevel@tonic-gate private key belonging to the client 39070Sstevel@tonic-gate cert. 39080Sstevel@tonic-gateconfCRL CRLFile [undefined] File containing certificate 39090Sstevel@tonic-gate revocation status, useful for X.509v3 39100Sstevel@tonic-gate authentication. Note that CRL requires 39110Sstevel@tonic-gate at least OpenSSL version 0.9.7. 39120Sstevel@tonic-gateconfDH_PARAMETERS DHParameters [undefined] File containing the 39130Sstevel@tonic-gate DH parameters. 39140Sstevel@tonic-gateconfRAND_FILE RandFile [undefined] File containing random 39150Sstevel@tonic-gate data (use prefix file:) or the 39160Sstevel@tonic-gate name of the UNIX socket if EGD is 39170Sstevel@tonic-gate used (use prefix egd:). STARTTLS 39180Sstevel@tonic-gate requires this option if the compile 39190Sstevel@tonic-gate flag HASURANDOM is not set (see 39200Sstevel@tonic-gate sendmail/README). 39210Sstevel@tonic-gateconfNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of 39220Sstevel@tonic-gate queue runners is set the given value 39230Sstevel@tonic-gate (nice(3)). 39240Sstevel@tonic-gateconfDIRECT_SUBMISSION_MODIFIERS DirectSubmissionModifiers 39250Sstevel@tonic-gate [undefined] Defines {daemon_flags} 39260Sstevel@tonic-gate for direct submissions. 3927616SjbeckconfUSE_MSP UseMSP [undefined] Use as mail submission 39280Sstevel@tonic-gate program. 39290Sstevel@tonic-gateconfDELIVER_BY_MIN DeliverByMin [0] Minimum time for Deliver By 39300Sstevel@tonic-gate SMTP Service Extension (RFC 2852). 39310Sstevel@tonic-gateconfREQUIRES_DIR_FSYNC RequiresDirfsync [true] RequiresDirfsync can 39320Sstevel@tonic-gate be used to turn off the compile time 39330Sstevel@tonic-gate flag REQUIRES_DIR_FSYNC at runtime. 39340Sstevel@tonic-gate See sendmail/README for details. 39350Sstevel@tonic-gateconfSHARED_MEMORY_KEY SharedMemoryKey [0] Key for shared memory. 39363544SjbeckconfSHARED_MEMORY_KEY_FILE 39373544Sjbeck SharedMemoryKeyFile 39383544Sjbeck [undefined] File where the 39393544Sjbeck automatically selected key for 39403544Sjbeck shared memory is stored. 39410Sstevel@tonic-gateconfFAST_SPLIT FastSplit [1] If set to a value greater than 39420Sstevel@tonic-gate zero, the initial MX lookups on 39430Sstevel@tonic-gate addresses is suppressed when they 39440Sstevel@tonic-gate are sorted which may result in 39450Sstevel@tonic-gate faster envelope splitting. If the 39460Sstevel@tonic-gate mail is submitted directly from the 39470Sstevel@tonic-gate command line, then the value also 39480Sstevel@tonic-gate limits the number of processes to 39490Sstevel@tonic-gate deliver the envelopes. 39500Sstevel@tonic-gateconfMAILBOX_DATABASE MailboxDatabase [pw] Type of lookup to find 39510Sstevel@tonic-gate information about local mailboxes. 39520Sstevel@tonic-gateconfDEQUOTE_OPTS - [empty] Additional options for the 39530Sstevel@tonic-gate dequote map. 39543544SjbeckconfMAX_NOOP_COMMANDS MaxNOOPCommands [20] Maximum number of "useless" 39553544Sjbeck commands before the SMTP server 39563544Sjbeck will slow down responding. 39573544SjbeckconfHELO_NAME HeloName If defined, use as name for EHLO/HELO 39583544Sjbeck command (instead of $j). 39590Sstevel@tonic-gateconfINPUT_MAIL_FILTERS InputMailFilters 39600Sstevel@tonic-gate A comma separated list of filters 39610Sstevel@tonic-gate which determines which filters and 39620Sstevel@tonic-gate the invocation sequence are 39630Sstevel@tonic-gate contacted for incoming SMTP 39640Sstevel@tonic-gate messages. If none are set, no 39650Sstevel@tonic-gate filters will be contacted. 39660Sstevel@tonic-gateconfMILTER_LOG_LEVEL Milter.LogLevel [9] Log level for input mail filter 39670Sstevel@tonic-gate actions, defaults to LogLevel. 39680Sstevel@tonic-gateconfMILTER_MACROS_CONNECT Milter.macros.connect 39690Sstevel@tonic-gate [j, _, {daemon_name}, {if_name}, 39700Sstevel@tonic-gate {if_addr}] Macros to transmit to 39710Sstevel@tonic-gate milters when a session connection 39720Sstevel@tonic-gate starts. 39730Sstevel@tonic-gateconfMILTER_MACROS_HELO Milter.macros.helo 39740Sstevel@tonic-gate [{tls_version}, {cipher}, 39750Sstevel@tonic-gate {cipher_bits}, {cert_subject}, 39760Sstevel@tonic-gate {cert_issuer}] Macros to transmit to 39770Sstevel@tonic-gate milters after HELO/EHLO command. 39780Sstevel@tonic-gateconfMILTER_MACROS_ENVFROM Milter.macros.envfrom 39790Sstevel@tonic-gate [i, {auth_type}, {auth_authen}, 39800Sstevel@tonic-gate {auth_ssf}, {auth_author}, 39810Sstevel@tonic-gate {mail_mailer}, {mail_host}, 39820Sstevel@tonic-gate {mail_addr}] Macros to transmit to 39830Sstevel@tonic-gate milters after MAIL FROM command. 39840Sstevel@tonic-gateconfMILTER_MACROS_ENVRCPT Milter.macros.envrcpt 39850Sstevel@tonic-gate [{rcpt_mailer}, {rcpt_host}, 39860Sstevel@tonic-gate {rcpt_addr}] Macros to transmit to 39870Sstevel@tonic-gate milters after RCPT TO command. 39880Sstevel@tonic-gateconfMILTER_MACROS_EOM Milter.macros.eom 39890Sstevel@tonic-gate [{msg_id}] Macros to transmit to 39903966Sjbeck milters after the terminating 39913966Sjbeck DATA '.' is received. 39923966SjbeckconfMILTER_MACROS_EOH Milter.macros.eoh 39933966Sjbeck Macros to transmit to milters 39943966Sjbeck after the end of headers. 39953966SjbeckconfMILTER_MACROS_DATA Milter.macros.data 39963966Sjbeck Macros to transmit to milters 39973966Sjbeck after DATA command is received. 39980Sstevel@tonic-gate 39990Sstevel@tonic-gate 40000Sstevel@tonic-gateSee also the description of OSTYPE for some parameters that can be 40010Sstevel@tonic-gatetweaked (generally pathnames to mailers). 40020Sstevel@tonic-gate 40030Sstevel@tonic-gateClientPortOptions and DaemonPortOptions are special cases since multiple 40040Sstevel@tonic-gateclients/daemons can be defined. This can be done via 40050Sstevel@tonic-gate 40060Sstevel@tonic-gate CLIENT_OPTIONS(`field1=value1,field2=value2,...') 40070Sstevel@tonic-gate DAEMON_OPTIONS(`field1=value1,field2=value2,...') 40080Sstevel@tonic-gate 40090Sstevel@tonic-gateNote that multiple CLIENT_OPTIONS() commands (and therefore multiple 40100Sstevel@tonic-gateClientPortOptions settings) are allowed in order to give settings for each 40110Sstevel@tonic-gateprotocol family (e.g., one for Family=inet and one for Family=inet6). A 40120Sstevel@tonic-gaterestriction placed on one family only affects outgoing connections on that 40130Sstevel@tonic-gateparticular family. 40140Sstevel@tonic-gate 40150Sstevel@tonic-gateIf DAEMON_OPTIONS is not used, then the default is 40160Sstevel@tonic-gate 40170Sstevel@tonic-gate DAEMON_OPTIONS(`Port=smtp, Name=MTA') 40180Sstevel@tonic-gate DAEMON_OPTIONS(`Port=587, Name=MSA, M=E') 40190Sstevel@tonic-gate 40200Sstevel@tonic-gateIf you use one DAEMON_OPTIONS macro, it will alter the parameters 40210Sstevel@tonic-gateof the first of these. The second will still be defaulted; it 40220Sstevel@tonic-gaterepresents a "Message Submission Agent" (MSA) as defined by RFC 40230Sstevel@tonic-gate2476 (see below). To turn off the default definition for the MSA, 40240Sstevel@tonic-gateuse FEATURE(`no_default_msa') (see also FEATURES). If you use 40250Sstevel@tonic-gateadditional DAEMON_OPTIONS macros, they will add additional daemons. 40260Sstevel@tonic-gate 40270Sstevel@tonic-gateExample 1: To change the port for the SMTP listener, while 40280Sstevel@tonic-gatestill using the MSA default, use 40290Sstevel@tonic-gate DAEMON_OPTIONS(`Port=925, Name=MTA') 40300Sstevel@tonic-gate 40310Sstevel@tonic-gateExample 2: To change the port for the MSA daemon, while still 40320Sstevel@tonic-gateusing the default SMTP port, use 40330Sstevel@tonic-gate FEATURE(`no_default_msa') 40340Sstevel@tonic-gate DAEMON_OPTIONS(`Name=MTA') 40350Sstevel@tonic-gate DAEMON_OPTIONS(`Port=987, Name=MSA, M=E') 40360Sstevel@tonic-gate 40370Sstevel@tonic-gateNote that if the first of those DAEMON_OPTIONS lines were omitted, then 40380Sstevel@tonic-gatethere would be no listener on the standard SMTP port. 40390Sstevel@tonic-gate 40400Sstevel@tonic-gateExample 3: To listen on both IPv4 and IPv6 interfaces, use 40410Sstevel@tonic-gate 40420Sstevel@tonic-gate DAEMON_OPTIONS(`Name=MTA-v4, Family=inet') 40430Sstevel@tonic-gate DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6') 40440Sstevel@tonic-gate 40450Sstevel@tonic-gateA "Message Submission Agent" still uses all of the same rulesets for 40460Sstevel@tonic-gateprocessing the message (and therefore still allows message rejection via 40470Sstevel@tonic-gatethe check_* rulesets). In accordance with the RFC, the MSA will ensure 40480Sstevel@tonic-gatethat all domains in envelope addresses are fully qualified if the message 40490Sstevel@tonic-gateis relayed to another MTA. It will also enforce the normal address syntax 40500Sstevel@tonic-gaterules and log error messages. Additionally, by using the M=a modifier you 40510Sstevel@tonic-gatecan require authentication before messages are accepted by the MSA. 40520Sstevel@tonic-gateNotice: Do NOT use the 'a' modifier on a public accessible MTA! Finally, 40530Sstevel@tonic-gatethe M=E modifier shown above disables ETRN as required by RFC 2476. 40540Sstevel@tonic-gate 40550Sstevel@tonic-gateMail filters can be defined using the INPUT_MAIL_FILTER() and MAIL_FILTER() 40560Sstevel@tonic-gatecommands: 40570Sstevel@tonic-gate 40580Sstevel@tonic-gate INPUT_MAIL_FILTER(`sample', `S=local:/var/run/f1.sock') 40590Sstevel@tonic-gate MAIL_FILTER(`myfilter', `S=inet:3333@localhost') 40600Sstevel@tonic-gate 40610Sstevel@tonic-gateThe INPUT_MAIL_FILTER() command causes the filter(s) to be called in the 40620Sstevel@tonic-gatesame order they were specified by also setting confINPUT_MAIL_FILTERS. A 40630Sstevel@tonic-gatefilter can be defined without adding it to the input filter list by using 40640Sstevel@tonic-gateMAIL_FILTER() instead of INPUT_MAIL_FILTER() in your .mc file. 40650Sstevel@tonic-gateAlternatively, you can reset the list of filters and their order by setting 40660Sstevel@tonic-gateconfINPUT_MAIL_FILTERS option after all INPUT_MAIL_FILTER() commands in 40670Sstevel@tonic-gateyour .mc file. 40680Sstevel@tonic-gate 40690Sstevel@tonic-gate 40700Sstevel@tonic-gate+----------------------------+ 40710Sstevel@tonic-gate| MESSAGE SUBMISSION PROGRAM | 40720Sstevel@tonic-gate+----------------------------+ 40730Sstevel@tonic-gate 40740Sstevel@tonic-gateThis section contains a list of caveats and 40750Sstevel@tonic-gatea few hints how for those who want to tweak the default configuration 40760Sstevel@tonic-gatefor it (which is installed as submit.cf). 40770Sstevel@tonic-gate 40780Sstevel@tonic-gateNotice: do not add options/features to submit.mc unless you are 40790Sstevel@tonic-gateabsolutely sure you need them. Options you may want to change 40800Sstevel@tonic-gateinclude: 40810Sstevel@tonic-gate 40820Sstevel@tonic-gate- confTRUSTED_USERS, FEATURE(`use_ct_file'), and confCT_FILE for 40830Sstevel@tonic-gate avoiding X-Authentication warnings. 40840Sstevel@tonic-gate- confTIME_ZONE to change it from the default `USE_TZ'. 40850Sstevel@tonic-gate- confDELIVERY_MODE is set to interactive in msp.m4 instead 40860Sstevel@tonic-gate of the default background mode. 40870Sstevel@tonic-gate- FEATURE(stickyhost) and LOCAL_RELAY to send unqualified addresses 40880Sstevel@tonic-gate to the LOCAL_RELAY instead of the default relay. 40890Sstevel@tonic-gate 40900Sstevel@tonic-gateThe MSP performs hostname canonicalization by default. Mail may end 40910Sstevel@tonic-gateup for various DNS related reasons in the MSP queue. This problem 40920Sstevel@tonic-gatecan be minimized by using 40930Sstevel@tonic-gate 40940Sstevel@tonic-gate FEATURE(`nocanonify', `canonify_hosts') 40950Sstevel@tonic-gate define(`confDIRECT_SUBMISSION_MODIFIERS', `C') 40960Sstevel@tonic-gate 40970Sstevel@tonic-gateSee the discussion about nocanonify for possible side effects. 40980Sstevel@tonic-gate 40990Sstevel@tonic-gateSome things are not intended to work with the MSP. These include 41000Sstevel@tonic-gatefeatures that influence the delivery process (e.g., mailertable, 41010Sstevel@tonic-gatealiases), or those that are only important for a SMTP server (e.g., 41020Sstevel@tonic-gatevirtusertable, DaemonPortOptions, multiple queues). Moreover, 41030Sstevel@tonic-gaterelaxing certain restrictions (RestrictQueueRun, permissions on 41040Sstevel@tonic-gatequeue directory) or adding features (e.g., enabling prog/file mailer) 41050Sstevel@tonic-gatecan cause security problems. 41060Sstevel@tonic-gate 41070Sstevel@tonic-gateOther things don't work well with the MSP and require tweaking or 41080Sstevel@tonic-gateworkarounds. 41090Sstevel@tonic-gate 41100Sstevel@tonic-gateThe file and the map created by makemap should be owned by smmsp, 41110Sstevel@tonic-gateits group should be smmsp, and it should have mode 640. 41120Sstevel@tonic-gate 41130Sstevel@tonic-gatefeature/msp.m4 defines almost all settings for the MSP. Most of 41140Sstevel@tonic-gatethose should not be changed at all. Some of the features and options 41150Sstevel@tonic-gatecan be overridden if really necessary. It is a bit tricky to do 41160Sstevel@tonic-gatethis, because it depends on the actual way the option is defined 41170Sstevel@tonic-gatein feature/msp.m4. If it is directly defined (i.e., define()) then 41180Sstevel@tonic-gatethe modified value must be defined after 41190Sstevel@tonic-gate 41200Sstevel@tonic-gate FEATURE(`msp') 41210Sstevel@tonic-gate 41220Sstevel@tonic-gateIf it is conditionally defined (i.e., ifdef()) then the desired 41230Sstevel@tonic-gatevalue must be defined before the FEATURE line in the .mc file. 41240Sstevel@tonic-gateTo see how the options are defined read feature/msp.m4. 41250Sstevel@tonic-gate 41260Sstevel@tonic-gate 41270Sstevel@tonic-gate+--------------------------+ 41280Sstevel@tonic-gate| FORMAT OF FILES AND MAPS | 41290Sstevel@tonic-gate+--------------------------+ 41300Sstevel@tonic-gate 41310Sstevel@tonic-gateFiles that define classes, i.e., F{classname}, consist of lines 41320Sstevel@tonic-gateeach of which contains a single element of the class. For example, 41330Sstevel@tonic-gate/etc/mail/local-host-names may have the following content: 41340Sstevel@tonic-gate 41350Sstevel@tonic-gatemy.domain 41360Sstevel@tonic-gateanother.domain 41370Sstevel@tonic-gate 41380Sstevel@tonic-gateMaps must be created using makemap(8) , e.g., 41390Sstevel@tonic-gate 41400Sstevel@tonic-gate makemap hash MAP < MAP 41410Sstevel@tonic-gate 41420Sstevel@tonic-gateIn general, a text file from which a map is created contains lines 41430Sstevel@tonic-gateof the form 41440Sstevel@tonic-gate 41450Sstevel@tonic-gatekey value 41460Sstevel@tonic-gate 41470Sstevel@tonic-gatewhere 'key' and 'value' are also called LHS and RHS, respectively. 41480Sstevel@tonic-gateBy default, the delimiter between LHS and RHS is a non-empty sequence 41490Sstevel@tonic-gateof white space characters. 41500Sstevel@tonic-gate 41510Sstevel@tonic-gate 41520Sstevel@tonic-gate+------------------+ 41530Sstevel@tonic-gate| DIRECTORY LAYOUT | 41540Sstevel@tonic-gate+------------------+ 41550Sstevel@tonic-gate 41560Sstevel@tonic-gateWithin this directory are several subdirectories, to wit: 41570Sstevel@tonic-gate 41580Sstevel@tonic-gatem4 General support routines. These are typically 41590Sstevel@tonic-gate very important and should not be changed without 41600Sstevel@tonic-gate very careful consideration. 41610Sstevel@tonic-gate 41620Sstevel@tonic-gatecf The configuration files themselves. They have 41630Sstevel@tonic-gate ".mc" suffixes, and must be run through m4 to 41640Sstevel@tonic-gate become complete. The resulting output should 41650Sstevel@tonic-gate have a ".cf" suffix. 41660Sstevel@tonic-gate 41670Sstevel@tonic-gateostype Definitions describing a particular operating 41680Sstevel@tonic-gate system type. These should always be referenced 41690Sstevel@tonic-gate using the OSTYPE macro in the .mc file. Examples 41700Sstevel@tonic-gate include "bsd4.3", "bsd4.4", "sunos3.5", and 41710Sstevel@tonic-gate "sunos4.1". 41720Sstevel@tonic-gate 41730Sstevel@tonic-gatedomain Definitions describing a particular domain, referenced 41740Sstevel@tonic-gate using the DOMAIN macro in the .mc file. These are 41750Sstevel@tonic-gate site dependent; for example, "CS.Berkeley.EDU.m4" 41760Sstevel@tonic-gate describes hosts in the CS.Berkeley.EDU subdomain. 41770Sstevel@tonic-gate 41780Sstevel@tonic-gatemailer Descriptions of mailers. These are referenced using 41790Sstevel@tonic-gate the MAILER macro in the .mc file. 41800Sstevel@tonic-gate 41810Sstevel@tonic-gatesh Shell files used when building the .cf file from the 41820Sstevel@tonic-gate .mc file in the cf subdirectory. 41830Sstevel@tonic-gate 41840Sstevel@tonic-gatefeature These hold special orthogonal features that you might 41850Sstevel@tonic-gate want to include. They should be referenced using 41860Sstevel@tonic-gate the FEATURE macro. 41870Sstevel@tonic-gate 41880Sstevel@tonic-gatehack Local hacks. These can be referenced using the HACK 41890Sstevel@tonic-gate macro. They shouldn't be of more than voyeuristic 41900Sstevel@tonic-gate interest outside the .Berkeley.EDU domain, but who knows? 41910Sstevel@tonic-gate 41920Sstevel@tonic-gatesiteconfig Site configuration -- e.g., tables of locally connected 41930Sstevel@tonic-gate UUCP sites. 41940Sstevel@tonic-gate 41950Sstevel@tonic-gate 41960Sstevel@tonic-gate+------------------------+ 41970Sstevel@tonic-gate| ADMINISTRATIVE DETAILS | 41980Sstevel@tonic-gate+------------------------+ 41990Sstevel@tonic-gate 42000Sstevel@tonic-gateThe following sections detail usage of certain internal parts of the 42010Sstevel@tonic-gatesendmail.cf file. Read them carefully if you are trying to modify 42020Sstevel@tonic-gatethe current model. If you find the above descriptions adequate, these 42030Sstevel@tonic-gateshould be {boring, confusing, tedious, ridiculous} (pick one or more). 42040Sstevel@tonic-gate 42050Sstevel@tonic-gateRULESETS (* means built in to sendmail) 42060Sstevel@tonic-gate 42070Sstevel@tonic-gate 0 * Parsing 42080Sstevel@tonic-gate 1 * Sender rewriting 42090Sstevel@tonic-gate 2 * Recipient rewriting 42100Sstevel@tonic-gate 3 * Canonicalization 42110Sstevel@tonic-gate 4 * Post cleanup 42120Sstevel@tonic-gate 5 * Local address rewrite (after aliasing) 42130Sstevel@tonic-gate 1x mailer rules (sender qualification) 42140Sstevel@tonic-gate 2x mailer rules (recipient qualification) 42150Sstevel@tonic-gate 3x mailer rules (sender header qualification) 42160Sstevel@tonic-gate 4x mailer rules (recipient header qualification) 42170Sstevel@tonic-gate 5x mailer subroutines (general) 42180Sstevel@tonic-gate 6x mailer subroutines (general) 42190Sstevel@tonic-gate 7x mailer subroutines (general) 42200Sstevel@tonic-gate 8x reserved 42210Sstevel@tonic-gate 90 Mailertable host stripping 42220Sstevel@tonic-gate 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) 42230Sstevel@tonic-gate 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) 42240Sstevel@tonic-gate 98 Local part of ruleset 0 (ruleset 8 in old sendmail) 42250Sstevel@tonic-gate 42260Sstevel@tonic-gate 42270Sstevel@tonic-gateMAILERS 42280Sstevel@tonic-gate 42290Sstevel@tonic-gate 0 local, prog local and program mailers 42300Sstevel@tonic-gate 1 [e]smtp, relay SMTP channel 42310Sstevel@tonic-gate 2 uucp-* UNIX-to-UNIX Copy Program 42320Sstevel@tonic-gate 3 netnews Network News delivery 42330Sstevel@tonic-gate 4 fax Sam Leffler's HylaFAX software 42340Sstevel@tonic-gate 5 mail11 DECnet mailer 42350Sstevel@tonic-gate 42360Sstevel@tonic-gate 42370Sstevel@tonic-gateMACROS 42380Sstevel@tonic-gate 42390Sstevel@tonic-gate A 42400Sstevel@tonic-gate B Bitnet Relay 42410Sstevel@tonic-gate C DECnet Relay 42420Sstevel@tonic-gate D The local domain -- usually not needed 42430Sstevel@tonic-gate E reserved for X.400 Relay 42440Sstevel@tonic-gate F FAX Relay 42450Sstevel@tonic-gate G 42460Sstevel@tonic-gate H mail Hub (for mail clusters) 42470Sstevel@tonic-gate I 42480Sstevel@tonic-gate J 42490Sstevel@tonic-gate K 42500Sstevel@tonic-gate L Luser Relay 42510Sstevel@tonic-gate M Masquerade (who you claim to be) 42520Sstevel@tonic-gate N 42530Sstevel@tonic-gate O 42540Sstevel@tonic-gate P 42550Sstevel@tonic-gate Q 42560Sstevel@tonic-gate R Relay (for unqualified names) 42570Sstevel@tonic-gate S Smart Host 42580Sstevel@tonic-gate T 42590Sstevel@tonic-gate U my UUCP name (if you have a UUCP connection) 42600Sstevel@tonic-gate V UUCP Relay (class {V} hosts) 42610Sstevel@tonic-gate W UUCP Relay (class {W} hosts) 42620Sstevel@tonic-gate X UUCP Relay (class {X} hosts) 42630Sstevel@tonic-gate Y UUCP Relay (all other hosts) 42640Sstevel@tonic-gate Z Version number 42650Sstevel@tonic-gate 42660Sstevel@tonic-gate 42670Sstevel@tonic-gateCLASSES 42680Sstevel@tonic-gate 42690Sstevel@tonic-gate A 42700Sstevel@tonic-gate B domains that are candidates for bestmx lookup 42710Sstevel@tonic-gate C 42720Sstevel@tonic-gate D 42730Sstevel@tonic-gate E addresses that should not seem to come from $M 42740Sstevel@tonic-gate F hosts this system forward for 42750Sstevel@tonic-gate G domains that should be looked up in genericstable 42760Sstevel@tonic-gate H 42770Sstevel@tonic-gate I 42780Sstevel@tonic-gate J 42790Sstevel@tonic-gate K 42800Sstevel@tonic-gate L addresses that should not be forwarded to $R 42810Sstevel@tonic-gate M domains that should be mapped to $M 42820Sstevel@tonic-gate N host/domains that should not be mapped to $M 42830Sstevel@tonic-gate O operators that indicate network operations (cannot be in local names) 42840Sstevel@tonic-gate P top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc. 42850Sstevel@tonic-gate Q 42860Sstevel@tonic-gate R domains this system is willing to relay (pass anti-spam filters) 42870Sstevel@tonic-gate S 42880Sstevel@tonic-gate T 42890Sstevel@tonic-gate U locally connected UUCP hosts 42900Sstevel@tonic-gate V UUCP hosts connected to relay $V 42910Sstevel@tonic-gate W UUCP hosts connected to relay $W 42920Sstevel@tonic-gate X UUCP hosts connected to relay $X 42930Sstevel@tonic-gate Y locally connected smart UUCP hosts 42940Sstevel@tonic-gate Z locally connected domain-ized UUCP hosts 42950Sstevel@tonic-gate . the class containing only a dot 42960Sstevel@tonic-gate [ the class containing only a left bracket 42970Sstevel@tonic-gate 42980Sstevel@tonic-gate 42990Sstevel@tonic-gateM4 DIVERSIONS 43000Sstevel@tonic-gate 43010Sstevel@tonic-gate 1 Local host detection and resolution 43020Sstevel@tonic-gate 2 Local Ruleset 3 additions 43030Sstevel@tonic-gate 3 Local Ruleset 0 additions 43040Sstevel@tonic-gate 4 UUCP Ruleset 0 additions 43050Sstevel@tonic-gate 5 locally interpreted names (overrides $R) 43060Sstevel@tonic-gate 6 local configuration (at top of file) 43070Sstevel@tonic-gate 7 mailer definitions 43080Sstevel@tonic-gate 8 DNS based blacklists 43090Sstevel@tonic-gate 9 special local rulesets (1 and 2) 43100Sstevel@tonic-gate 4311*11440SJohn.Beck@Sun.COM$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $ 4312