Sendmail, 3rd Edition

Book description

Reliable, flexible, and configurable enough to solve the mail routing needs of any web site, sendmail has withstood the test of time, but has become no less daunting in its complexity. Even the most experienced system administrators have found it challenging to configure and difficult to understand. For help in unraveling its intricacies, sendmail administrators have turned unanimously to one reliable source--the bat book, or sendmail by Bryan Costales and the creator of sendmail, Eric Allman. Now in its third edition, this best-selling reference will help you master the most demanding version of sendmail yet.The new edition of sendmail has been completely revised to cover sendmail 8.12--a version with more features and fundamental changes than any previous version of the Unix-based email routing program. Because the latest version of sendmail differs so significantly from earlier versions, a massive rewrite of this best-selling reference was called for.The book begins by guiding you through the building and installation of sendmail and its companion programs, such as vacation and makemap. These additional programs are pivotal to sendmail's daily operation. Next, you'll cover the day-to-day administration of sendmail. This section includes two entirely new chapters, "Performance Tuning" to help you make mail delivery as efficient as possible, and "Handling Spam" to deal with sendmail's rich anti-spam features. The next section of the book tackles the sendmail configuration file and debugging. And finally, the book wraps up with five appendices that provide more detail about sendmail than you may ever need. Altogether, versions 8.10 through 8.12 include dozens of new features, options, and macros, and this greatly expanded edition thoroughly addresses each, and provides and advance look at sendmail version 8.13 (expected to be released in 2003).With sendmail, Third Edition in hand, you will be able to configure this challenging but necessary utility for whatever needs your system requires. This much anticipated revision is essential reading for sendmail administrators.

Publisher resources

View/Submit Errata

Table of contents

  1. Dedication
  2. Preface
    1. Changes Since the Previous Edition
    2. Why This Book Is Necessary
    3. History
    4. Eric Allman Speaks
    5. Organization
    6. Audience and Assumptions
    7. Unix and sendmail Versions
    8. Conventions Used in This Handbook
    9. Additional Sources of Information
    10. Other Books, Other Problems
    11. How to Contact Us
    12. Acknowledgments
  3. 1. Some Basics
    1. 1.1. Email Basics
    2. 1.2. Requests for Comments (RFCs)
    3. 1.3. Email and sendmail
      1. 1.3.1. Other MTAs
      2. 1.3.2. Why sendmail Is So Complex
    4. 1.4. Basic Parts of sendmail
      1. 1.4.1. The Configuration File
      2. 1.4.2. The Queue
      3. 1.4.3. Aliases and Mailing Lists
    5. 1.5. Basic Parts of a Mail Message
      1. 1.5.1. Run sendmail by Hand
      2. 1.5.2. The Header
      3. 1.5.3. The Body
      4. 1.5.4. The Envelope
    6. 1.6. Basic Roles of sendmail
      1. 1.6.1. Role in the Filesystem
      2. 1.6.2. The Role in the Aliases File
      3. 1.6.3. Role in Queue Management
      4. 1.6.4. Role in Local Delivery
      5. 1.6.5. Delivery to a Mailbox
      6. 1.6.6. Delivery Through a Program
      7. 1.6.7. Role in Network Transport
      8. 1.6.8. TCP/IP
      9. 1.6.9. UUCP
      10. 1.6.10. Other Protocols
      11. 1.6.11. Role as a Daemon
    7. 1.7. Basic Modes of sendmail
      1. 1.7.1. How to Run sendmail
        1. 1.7.1.1. Become a mode (-b)
        2. 1.7.1.2. Daemon mode (-bd)
      2. 1.7.2. Kill and Restart, Beginning with V8.7
        1. 1.7.2.1. Kill and restart, with V8.6
        2. 1.7.2.2. Kill and restart, old versions
        3. 1.7.2.3. If you forget to kill the daemon
      3. 1.7.3. Show Queue Mode (-bp)
      4. 1.7.4. Rebuild Aliases Mode (-bi)
      5. 1.7.5. Verify Mode (-bv)
      6. 1.7.6. Verbose (-v)
      7. 1.7.7. Debugging (-d)
    8. 1.8. The sendmail.cf File
      1. 1.8.1. Configuration Commands
      2. 1.8.2. The version Command
      3. 1.8.3. Comments
      4. 1.8.4. A Quick Tour
        1. 1.8.4.1. Mail delivery agents
        2. 1.8.4.2. Macros
        3. 1.8.4.3. Rules
        4. 1.8.4.4. Rule sets
        5. 1.8.4.5. Class macros
        6. 1.8.4.6. File class macros
        7. 1.8.4.7. Options
        8. 1.8.4.8. Headers
        9. 1.8.4.9. Priority
        10. 1.8.4.10. Trusted users
        11. 1.8.4.11. Keyed databases
        12. 1.8.4.12. Environment variables
        13. 1.8.4.13. Queues defined
        14. 1.8.4.14. External filter programs
  4. I. Build and Install
    1. 2. Build and Install sendmail
      1. 2.1. Vendor Versus Compiling
      2. 2.2. Obtain the Source
        1. 2.2.1. What’s Where in the Source
          1. 2.2.1.1. The top-level Build script
          2. 2.2.1.2. The contrib directory
          3. 2.2.1.3. The devtools directory
          4. 2.2.1.4. The doc directory
          5. 2.2.1.5. The include directory
          6. 2.2.1.6. The INSTALL file
          7. 2.2.1.7. The KNOWNBUGS file
          8. 2.2.1.8. The libmilter directory
          9. 2.2.1.9. The libsm directory
          10. 2.2.1.10. The libsmdb directory
          11. 2.2.1.11. The libsmutil directory
          12. 2.2.1.12. The LICENSE file
          13. 2.2.1.13. The Makefile file
          14. 2.2.1.14. The PGPKEYS file
          15. 2.2.1.15. The README file
          16. 2.2.1.16. The RELEASE_NOTES file
          17. 2.2.1.17. The test directory
      3. 2.3. The Build Script
      4. 2.4. Building with m4
      5. 2.5. Build sendmail
        1. 2.5.1. If You Change Your m4 Build File
        2. 2.5.2. Use libresolv.a
        3. 2.5.3. Badly Defined sys_errlist
        4. 2.5.4. Error at or Near Variable
        5. 2.5.5. Undefined Symbol strtoul
        6. 2.5.6. warning: & Before Array
        7. 2.5.7. Other Considerations
      6. 2.6. Install sendmail
        1. 2.6.1. Pre-V8.12 Installation
        2. 2.6.2. Installation with V8.12 and Above
          1. 2.6.2.1. Add smmsp to /etc/passwd
          2. 2.6.2.2. Add smmsp to /etc/group
          3. 2.6.2.3. Modify init files
          4. 2.6.2.4. The submit.cf file
        3. 2.6.3. The /etc/mail Directory
        4. 2.6.4. Old Alias Files
        5. 2.6.5. Other Moved Files
          1. 2.6.5.1. The MAIL_SETTINGS_DIR mc macro
        6. 2.6.6. The Wrong Symbolic Link
      7. 2.7. Pitfalls
      8. 2.8. Build m4 Macro Reference
      9. APPENDDEF( )
      10. confBEFORE
      11. confBLDVARIANT
      12. confBUILDBIN
      13. confCC
      14. confCCOPTS
      15. confCCOPTS_SO
      16. confCOPY
      17. confDEPEND_TYPE
      18. confDEPLIBS
      19. confDONT_INSTALL_CATMAN
      20. confEBINDIR
      21. confENVDEF and conf_prog_ENVDEF
      22. confFORCE_RMAIL
      23. confGBIN...
      24. confHFDIR
      25. confHFFILE
      26. confINCDIRS
      27. confINC...
      28. confINSTALL
      29. confINSTALL_RAWMAN
      30. confLD
      31. confLDOPTS
      32. confLDOPTS_SO
      33. confLIB...
      34. confLIBDIRS
      35. confLIBS and conf_prog_LIBS
      36. confLIBSEARCH
      37. confLIBSEARCHPATH
      38. confLN
      39. confLNOPTS
      40. confLINKS
      41. confMAN...
      42. confMAPDEF
      43. confMBIN...
      44. confMSPQOWN
      45. confMSP_QUEUE_DIR
      46. confMTCCOPTS
      47. confMTLDOPTS
      48. confNO_HELPFILE_INSTALL
      49. confNO_MAN_BUILD
      50. confNO_MAN_INSTALL
      51. confNO_STATISTICS_INSTALL
      52. confOBJADD
      53. confOPTIMIZE
      54. confRANLIB
      55. confRANLIBOPTS
      56. confREQUIRE_LIBSM
      57. confSBINDIR
      58. confSBINGRP
      59. confSBINMODE
      60. confSBINOWN
      61. confSHAREDLIB...
      62. confSHELL
      63. confSM_OS_HEADER
      64. confSMOBJADD
      65. confSMSRCADD
      66. confSONAME
      67. conf_prog_OBJADD
      68. conf_prog_SRCADD
      69. confSRCDIR
      70. confSTDIOTYPE
      71. confSTDIR
      72. confSTFILE
      73. confSTRIP
      74. confSTRIPOPTS
      75. confUBINDIR
      76. confUBINGRP
      77. confUBINMODE
      78. confUBINOWN
      79. PREPENDDEF( )
    2. 3. Tune sendmail with Compile-Time Macros
      1. 3.1. Before You Begin, a Checklist
        1. 3.1.1. The tcpwrappers Package (V8.8 and Earlier)
        2. 3.1.2. The Sleepycat DB Library
        3. 3.1.3. The regex Library
      2. 3.2. To Port, Tune, or Debug
      3. 3.3. Pitfalls
      4. 3.4. Compile-Time Macro Reference
      5. AUTO_NIS_ALIASES
      6. BSD4_3
      7. BSD4_4
      8. DATA_PROGRESS_TIMEOUT
      9. DNSMAP
      10. DSN
      11. EGD
      12. ERRLIST_PREDEFINED
      13. FAST_PID_RECYCLE
      14. _FFR...
      15. FORK
      16. HAS...
      17. HESIOD
      18. HES_GETMAILHOST
      19. IDENTPROTO
      20. IP_SRCROUTE
      21. ...IS_BROKEN
      22. LA_TYPE
      23. LDAPMAP
      24. LOG
      25. MATCHGECOS
      26. MAX...
      27. MEMCHUNKSIZE
      28. MILTER
      29. MIME7TO8
      30. MIME8TO7
      31. NAMED_BIND
      32. MAP_NSD
      33. MAP_REGEX
      34. NDBM
      35. NEED...
      36. NET...
      37. NETINFO
      38. NEWDB
      39. NIS
      40. NISPLUS
      41. NOFTRUNCATE
      42. NO_GROUP_SET
      43. NOTUNIX
      44. _PATH...
      45. PH_MAP
      46. PICKY_HELO_CHECK
      47. PIPELINING
      48. PSBUFSIZ
      49. QUEUE
      50. QUEUESEGSIZE
      51. REQUIRES_DIR_FSYNC
      52. SASL
      53. SCANF
      54. SECUREWARE
      55. SFS_TYPE
      56. SHARE_V1
      57. SM_...
      58. SM_HEAP_CHECK
      59. SM_CONF_SHM
      60. SMTP
      61. SMTPDEBUG
      62. SMTPLINELIM
      63. SPT_TYPE
      64. STARTTLS
      65. SUID_ROOT_FILES_OK
      66. SYSLOG_BUFSIZE
      67. SYSTEM5
      68. TCPWRAPPERS
      69. TLS_NO_RSA
      70. TOBUFSIZE
      71. TTYNAME
      72. ...T
      73. UDB_DEFAULT_SPEC
      74. USE_DOUBLE_FORK
      75. USE_ENVIRON
      76. USING_NETSCAPE_LDAP
      77. USERDB
      78. USESETEUID
      79. WILDCARD_SHELL
      80. XDEBUG
    3. 4. Configure sendmail.cf with m4
      1. 4.1. The m4 Preprocessor
        1. 4.1.1. m4 Is Greedy
        2. 4.1.2. m4 and dnl
        3. 4.1.3. m4 and Arguments
        4. 4.1.4. The DOL m4 Macro
      2. 4.2. Configure with m4
        1. 4.2.1. The _CF_DIR_ m4 Macro
        2. 4.2.2. The Minimal mc File
          1. 4.2.2.1. OSTYPE( ) m4 macro
          2. 4.2.2.2. MAILER( ) m4 macro
          3. 4.2.2.3. DOMAIN( ) m4 macro
          4. 4.2.2.4. FEATURE( ) m4 macro
        3. 4.2.3. The Order of mc Lines
          1. 4.2.3.1. VERSIONID m4 macro
          2. 4.2.3.2. HACK( ) m4 macro
      3. 4.3. m4 Macros by Function
        1. 4.3.1. Options
        2. 4.3.2. Define sendmail Macros
        3. 4.3.3. Rules and Rule Sets
          1. 4.3.3.1. LOCAL_CONFIG mc macro
          2. 4.3.3.2. LOCAL_RULE_0 mc macro
          3. 4.3.3.3. LOCAL_RULE_1 and LOCAL_RULE_2 mc macros
          4. 4.3.3.4. LOCAL_RULE_3 mc macro
          5. 4.3.3.5. LOCAL_RULESETS mc macro
          6. 4.3.3.6. SMART_HOST mc macro
          7. 4.3.3.7. LOCAL_NET_CONFIG mc macro
      4. 4.4. Masquerading
        1. 4.4.1. EXPOSED_USER mc Macro
          1. 4.4.1.1. EXPOSED_USER_FILE mc macro
        2. 4.4.2. MASQUERADE_AS mc Macro
        3. 4.4.3. MASQUERADE_DOMAIN mc Macro
        4. 4.4.4. MASQUERADE_DOMAIN_FILE mc Macro
        5. 4.4.5. MASQUERADE_EXCEPTION mc Macro
        6. 4.4.6. MASQUERADE_EXCEPTION_FILE mc Macro
      5. 4.5. Relays
        1. 4.5.1. BITNET_RELAY mc Macro
        2. 4.5.2. DECNET_RELAY mc Macro
        3. 4.5.3. FAX_RELAY mc Macro
        4. 4.5.4. LOCAL_RELAY mc Macro
        5. 4.5.5. LOCAL_USER mc Macro
        6. 4.5.6. LUSER_RELAY mc Macro
        7. 4.5.7. MAIL_HUB mc Macro
        8. 4.5.8. UUCP_RELAY mc Macro
      6. 4.6. UUCP Support
        1. 4.6.1. uucp-old (aka uucp)
        2. 4.6.2. uucp-new (aka suucp)
        3. 4.6.3. uucp-uudom
        4. 4.6.4. uucp-dom
        5. 4.6.5. SITE mc Macro (Obsolete)
        6. 4.6.6. SITECONFIG mc Macro (Obsolete)
        7. 4.6.7. UUCPSMTP mc Macro
      7. 4.7. Pitfalls
      8. 4.8. Configuration File Feature Reference
      9. FEATURE(accept_unqualified_senders)
      10. FEATURE(accept_unresolvable_domains)
      11. FEATURE(access_db)
      12. FEATURE(allmasquerade)
      13. FEATURE(always_add_domain)
      14. FEATURE(authinfo)
      15. FEATURE(bestmx_is_local)
      16. FEATURE(bitdomain)
      17. FEATURE(blacklist_recipients)
      18. FEATURE(compat_check)
      19. FEATURE(delay_checks)
      20. FEATURE(dnsbl)
      21. FEATURE(domaintable)
      22. FEATURE(enhdnsbl)
      23. FEATURE(generics_entire_domain)
      24. FEATURE(genericstable)
      25. FEATURE(ldap_routing)
      26. FEATURE(limited_masquerade)
      27. FEATURE(local_lmtp)
      28. FEATURE(local_no_masquerade)
      29. FEATURE(local_procmail)
      30. FEATURE(lookupdotdomain)
      31. FEATURE(loose_relay_check)
      32. FEATURE(mailertable)
      33. FEATURE(masquerade_entire_domain)
      34. FEATURE(masquerade_envelope)
      35. FEATURE(msp)
      36. FEATURE(nocanonify)
      37. FEATURE(nodns)
      38. FEATURE(no_default_msa)
      39. FEATURE(notsticky)
      40. FEATURE(nouucp)
      41. FEATURE(nullclient)
      42. FEATURE(promiscuous_relay)
      43. FEATURE(preserve_local_plus_detail)
      44. FEATURE(preserve_luser_host)
      45. FEATURE(queuegroup)
      46. FEATURE(rbl)
      47. FEATURE(redirect)
      48. FEATURE(relay_based_on_MX)
      49. FEATURE(relay_entire_domain)
      50. FEATURE(relay_hosts_only)
      51. FEATURE(relay_local_from)
      52. FEATURE(relay_mail_from)
      53. FEATURE(smrsh)
      54. FEATURE(stickyhost)
      55. FEATURE(use_ct_file)
      56. FEATURE(use_cw_file)
      57. FEATURE(uucpdomain)
      58. FEATURE(virtuser_entire_domain)
      59. FEATURE(virtusertable)
    4. 5. Build and Use Companion Programs
      1. 5.1. The Build Script
      2. -A
      3. -c
      4. -E
      5. -f
      6. -I
      7. -L
      8. -M
      9. -m
      10. -n
      11. -O
      12. -Q
      13. -S
      14. -v
      15. 5.2. The editmap Program
        1. 5.2.1. editmap Command-Line Switches
      16. -C
      17. -f
      18. -N
      19. -q
      20. -u
      21. -x
      22. 5.3. The mail.local Delivery Agent
        1. 5.3.1. Build mail.local
        2. 5.3.2. Set up sendmail.cf for mail.local
        3. 5.3.3. The mail.local Command-Line Switches
      23. -7
      24. -b
      25. -d
      26. -D
      27. -f
      28. -h
      29. -l (lowercase L)
      30. -r
      31. 5.4. The mailstats Program
        1. 5.4.1. The statistics File
        2. 5.4.2. Viewing Statistics: mailstats
        3. 5.4.3. Using cron for Daily and Weekly Statistics
        4. 5.4.4. The mailstats Program’s Switches
      32. -c
      33. -C
      34. -f
      35. -o
      36. -p
      37. -P
      38. 5.5. The makemap Program
        1. 5.5.1. makemap Command-Line Switches
      39. -c
      40. -C
      41. -d
      42. -e
      43. -f
      44. -l (lowercase L)
      45. -N
      46. -o
      47. -r
      48. -s
      49. -t
      50. -u
      51. -v
      52. 5.6. The praliases Program
        1. 5.6.1. Some Examples of Using praliases
      53. -C
      54. -f
      55. 5.7. The rmail Delivery Agent
      56. 5.8. The smrsh Program
        1. 5.8.1. Build smrsh
        2. 5.8.2. Configure to Use smrsh
        3. 5.8.3. Populate its Directory
        4. 5.8.4. How smrsh Works
      57. 5.9. The vacation Program
        1. 5.9.1. Build the vacation Program
        2. 5.9.2. Other Uses for vacation
          1. 5.9.2.1. You are too busy to reply promptly
          2. 5.9.2.2. Retire users with notification
          3. 5.9.2.3. Manage your hours
        3. 5.9.3. Exclusions and assumptions
        4. 5.9.4. The vacation Program’s Command-Line Switches
      58. -a
      59. -C
      60. -d
      61. -f
      62. -i or -I
      63. -l (lowercase L)
      64. -m
      65. -r
      66. -s
      67. -t
      68. -U
      69. -x
      70. -z
      71. 5.10. Pitfalls
  5. II. Administration
    1. 6. Tune Performance
      1. 6.1. Handle Deep Queues
        1. 6.1.1. Recover from a Full Queue
      2. 6.2. Sidestep Slow Hosts
        1. 6.2.1. Run Separate Fast and Slow sendmail Daemons
        2. 6.2.2. Run a Fallback Host
      3. 6.3. Deliver to Files
        1. 6.3.1. A Bounce-Mail Handler
        2. 6.3.2. Handle Bounces by Discarding Them
        3. 6.3.3. An Email Blackhole
      4. 6.4. Buffered File I/O
      5. 6.5. Use Multiple Queues
      6. 6.6. Condition the Network
        1. 6.6.1. Don’t Appear to Spam
        2. 6.6.2. Use an Active Name Server
        3. 6.6.3. Make Reverse Lookups Swift
        4. 6.6.4. Don’t Let identd Hang
      7. 6.7. Tune the Kernel
        1. 6.7.1. Maximize File Descriptor Limits
        2. 6.7.2. Disable Source-Routed Packets
        3. 6.7.3. Maximize TCP/IP Connections
        4. 6.7.4. Maximize TCP/IP Buffer Sizes
        5. 6.7.5. Decrease TCP/IP Keepalive Intervals
      8. 6.8. Pitfalls
    2. 7. How to Handle spam
      1. 7.1. The Local_check_ Rule Sets
        1. 7.1.1. Local_check_relay and check_relay
        2. 7.1.2. Local_check_mail and check_mail
        3. 7.1.3. Local_check_rcpt and check_rcpt
        4. 7.1.4. The check_compat Rule Set
      2. 7.2. How DNSBL Works
        1. 7.2.1. FEATURE(dnsbl)
        2. 7.2.2. FEATURE(enhdnsbl)
      3. 7.3. Check Headers with Rule Sets
        1. 7.3.1. Virus Screening by Subject
        2. 7.3.2. Check Validity of Received:
      4. 7.4. Relaying
        1. 7.4.1. Macros to Allow Relaying
          1. 7.4.1.1. The RELAY_DOMAIN mc macro
          2. 7.4.1.2. The RELAY_DOMAIN_FILE mc macro
        2. 7.4.2. FEATURE(loose_relay_check)
        3. 7.4.3. FEATURE(promiscuous_relay)
        4. 7.4.4. FEATURE(relay_based_on_MX)
        5. 7.4.5. FEATURE(relay_entire_domain)
        6. 7.4.6. FEATURE(relay_hosts_only)
        7. 7.4.7. FEATURE(relay_local_from)
        8. 7.4.8. FEATURE(relay_mail_from)
        9. 7.4.9. Risk with FEATURE(nouucp)
        10. 7.4.10. FEATURE(accept_unresolvable_domains)
        11. 7.4.11. FEATURE(accept_unqualified_senders)
      5. 7.5. The access Database
        1. 7.5.1. Enabling the access Database Generally
        2. 7.5.2. Create the access Database
          1. 7.5.2.1. OK
          2. 7.5.2.2. RELAY
          3. 7.5.2.3. REJECT
          4. 7.5.2.4. DISCARD
          5. 7.5.2.5. SKIP
          6. 7.5.2.6. XYZ text
          7. 7.5.2.7. ERROR:XYZ text
          8. 7.5.2.8. ERROR:D.S.N:XYZ text
        3. 7.5.3. Finer Control with V8.10
        4. 7.5.4. Rejection Message for REJECT
        5. 7.5.5. Reject Per Recipient
        6. 7.5.6. Accept and Reject Per Recipient
        7. 7.5.7. FEATURE(check_compat)—V8.12 and Above
        8. 7.5.8. Screen by domain and .domain Too
        9. 7.5.9. Choose Queue Groups Via the access Database
        10. 7.5.10. Screen Based on STARTTLS and AUTH=
      6. 7.6. The Milter Library
        1. 7.6.1. Enable with -DMILTER
        2. 7.6.2. The X Configuration Command
          1. 7.6.2.1. The X configuration command F= equate
          2. 7.6.2.2. The X configuration command S= equate
          3. 7.6.2.3. The X configuration command T= equate
        3. 7.6.3. The InputMailFilters Option
        4. 7.6.4. Build a Filter
      7. 7.7. Pitfalls
    3. 8. Test Rule Sets with -bt
      1. 8.1. Overview
      2. 8.2. Configuration Lines
        1. 8.2.1. Define a Macro with .D
        2. 8.2.2. Add to a Class with .C
      3. 8.3. Dump a sendmail Macro or Class
        1. 8.3.1. Dump a Defined Macro with $
        2. 8.3.2. Dump a Class Macro with $=
      4. 8.4. Show an Item
        1. 8.4.1. Show Rules in a Rule Set with =S
        2. 8.4.2. Show Delivery Agents with =M
      5. 8.5. Complex Actions Made Simple
        1. 8.5.1. Canonify a Host with /canon
        2. 8.5.2. Look Up MX Records with /mx
        3. 8.5.3. Look up a Database Item with /map
          1. 8.5.3.1. The aliases database map
          2. 8.5.3.2. The host map
          3. 8.5.3.3. The dequote map
        4. 8.5.4. Select Whom to /parse or /try with /tryflags
        5. 8.5.5. Parse an Address with /parse
        6. 8.5.6. Try a Delivery Agent with /try
      6. 8.6. Process-Specified Addresses
        1. 8.6.1. Syntax
        2. 8.6.2. The Address
        3. 8.6.3. Rule Set 3 Always Called First with -bt
        4. 8.6.4. The Output
      7. 8.7. Add Debugging for Detail
        1. 8.7.1. A Trick
      8. 8.8. Batch Rule-Set Testing
      9. 8.9. Pitfalls
    4. 9. DNS and sendmail
      1. 9.1. Overview
        1. 9.1.1. Which BIND?
        2. 9.1.2. Make sendmail DNS-Aware
      2. 9.2. How sendmail Uses DNS
        1. 9.2.1. Determine the Local Canonical Name
        2. 9.2.2. Probe Network Interfaces
        3. 9.2.3. Look Up a Remote Host’s Name
        4. 9.2.4. DNS Blacklist Lookups
        5. 9.2.5. Look Up Addresses for Delivery
        6. 9.2.6. The $[ and $] Operators
        7. 9.2.7. Broken IPv6 Name Servers
      3. 9.3. Set Up MX Records
        1. 9.3.1. MX Must Point to Host With an A or AAAA Record
        2. 9.3.2. MX to CNAME Is Illegal
        3. 9.3.3. MX Records Are Nonrecursive
        4. 9.3.4. Wildcard MX Records
        5. 9.3.5. What? They Ignore MX Records?
        6. 9.3.6. Caching MX Records
        7. 9.3.7. Ambiguous MX Records
      4. 9.4. How to Use nslookup
      5. 9.5. Prepare for Disaster
        1. 9.5.1. Offsite MX Hosts
        2. 9.5.2. Offsite Servers
      6. 9.6. Pitfalls
    5. 10. Maintain Security with sendmail
      1. 10.1. Why root?
        1. 10.1.1. Test seteuid and setreuid
      2. 10.2. The Environment
        1. 10.2.1. The E Configuration Command
      3. 10.3. SMTP Probes
        1. 10.3.1. SMTP Debug
        2. 10.3.2. SMTP vrfy and expn
      4. 10.4. The Configuration File
        1. 10.4.1. The F Command—File Form
        2. 10.4.2. The F Command—Program Form
        3. 10.4.3. The P= of Delivery Agents
        4. 10.4.4. The StatusFile Option and the Statistics File
      5. 10.5. Permissions
        1. 10.5.1. Dangerous Write Permissions
        2. 10.5.2. Permissions for :include:
        3. 10.5.3. Permissions for ~/.forward Files
        4. 10.5.4. Recommended Permissions
        5. 10.5.5. Don’t Blame sendmail
      6. 10.6. The Aliases File
        1. 10.6.1. The Alias Database Files
      7. 10.7. Forged Mail
        1. 10.7.1. Forging with the Queue Directory
        2. 10.7.2. Forging with SMTP
      8. 10.8. Security Features
        1. 10.8.1. Trusted Users
          1. 10.8.1.1. Declare trusted users (ignored V8.1 through V8.6)
        2. 10.8.2. Security Options
          1. 10.8.2.1. The DefaultUser option
          2. 10.8.2.2. The RunAsUser option (V8.8 and above)
          3. 10.8.2.3. The TrustedUser option (V8.10 and above)
          4. 10.8.2.4. The ForwardPath option
          5. 10.8.2.5. The LogLevel option
          6. 10.8.2.6. The PostmasterCopy option
          7. 10.8.2.7. The PrivacyOptions option
          8. 10.8.2.8. The SafeFileEnvironment option
          9. 10.8.2.9. The TempFileMode and QueueFileMode options
        3. 10.8.3. The /etc/shells File
      9. 10.9. Support SMTP AUTH
        1. 10.9.1. Get and Install the SASL Library
        2. 10.9.2. Add SASL Support to sendmail
          1. 10.9.2.1. Test SASL support in sendmail
        3. 10.9.3. SASL and Your mc File
          1. 10.9.3.1. Format of the default-auth-info file (V8.10 and V8.11)
          2. 10.9.3.2. Authinfo and the access database (V8.12 and above)
        4. 10.9.4. SASL and Rule Sets
        5. 10.9.5. Additional SASL Help
      10. 10.10. STARTTLS
        1. 10.10.1. The SSL Library
          1. 10.10.1.1. A proper random number source
          2. 10.10.1.2. SUNWski
          3. 10.10.1.3. EGD
          4. 10.10.1.4. PRNGD
          5. 10.10.1.5. Roll your own
        2. 10.10.2. Digital Certificates
        3. 10.10.3. Enable TLS with Build
        4. 10.10.4. Set Up Your Certificates
        5. 10.10.5. Add STARTTLS Support to Your mc File
        6. 10.10.6. Test STARTTLS
        7. 10.10.7. Macros for Use with STARTTLS
        8. 10.10.8. STARTTLS and the access Database
          1. 10.10.8.1. The access database and Local_Relay_Auth
          2. 10.10.8.2. The access database with tls_server and tls_client
          3. 10.10.8.3. The tls_rcpt rule set
          4. 10.10.8.4. Disable STARTTLS with the try_tls rule set
      11. 10.11. Other Security Information
      12. 10.12. Pitfalls
    6. 11. Manage the Queue
      1. 11.1. Overview of the Queue
      2. 11.2. Parts of a Queued Message
        1. 11.2.1. The Queue Identifier
        2. 11.2.2. The Data (Message Body) File: df
        3. 11.2.3. Queue File Locking
          1. 11.2.3.1. Current-style file locking
          2. 11.2.3.2. Locks shown when printing the queue
          3. 11.2.3.3. Locks can get stuck
        4. 11.2.4. The ID Creation File (Obsolete as of V5.62): nf
        5. 11.2.5. The Queue Control File: qf
        6. 11.2.6. The Temporary qf Rewrite Image: tf
        7. 11.2.7. The Transcript File: xf
      3. 11.3. Using Multiple Queue Directories
        1. 11.3.1. Multiple Queue Directories
          1. 11.3.1.1. Printing multiple queue directories
          2. 11.3.1.2. Processing multiple queue directories
        2. 11.3.2. Using qf, df, and xf Subdirectories
      4. 11.4. Queue Groups (V8.12 and Above)
        1. 11.4.1. The Default Queue Group
        2. 11.4.2. The Q Configuration Command
          1. 11.4.2.1. The Flags= (F=) queue-group equate
          2. 11.4.2.2. The Interval= (I=) queue-group equate
          3. 11.4.2.3. The Jobs= (J=) queue-group equate
          4. 11.4.2.4. The Nice= (N=) queue-group equate
          5. 11.4.2.5. The Path= (P=) queue-group equate
          6. 11.4.2.6. The recipients= (r=) queue-group equate
          7. 11.4.2.7. The Runners= (R=) queue-group equate
        3. 11.4.3. How to Declare Queue Groups with the m4 Technique
        4. 11.4.4. The FEATURE(queuegroup) and the access Database
        5. 11.4.5. Rule Set Queue Group Selection
        6. 11.4.6. Queue Group Limitations
      5. 11.5. Bogus qf Files
        1. 11.5.1. Badly Formed qf Filename
        2. 11.5.2. Bad qf Owner or Permissions
        3. 11.5.3. Extra Data at End of qf File
        4. 11.5.4. Unknown Control Character in qf File
        5. 11.5.5. Funny Flag Bits in qf File
        6. 11.5.6. Savemail Panic
      6. 11.6. Printing the Queue
        1. 11.6.1. Printing the Queue in Verbose Mode
        2. 11.6.2. Print the Number of Messages in the Queue
      7. 11.7. How the Queue Is Processed
        1. 11.7.1. Processing a Single Message
      8. 11.8. Cause Queues to Be Processed
        1. 11.8.1. Periodically with -q
        2. 11.8.2. From the Command Line
          1. 11.8.2.1. Process the queue once: -q
          2. 11.8.2.2. Combine -v with -q
          3. 11.8.2.3. Process by identifier/recipient/sender: -q[ISR]
          4. 11.8.2.4. Process by negated identifier/recipient/sender (V8.12 and above)
          5. 11.8.2.5. Process by queue group with -qG (V8.12 and above)
          6. 11.8.2.6. Process the queue via ESMTP ETRN
        3. 11.8.3. Persistent Queue Runners with -qp
      9. 11.9. Process Alternate Queues
        1. 11.9.1. Handling a Down Site
          1. 11.9.1.1. Move mail with qtool.pl
          2. 11.9.1.2. Move mail with queue groups
      10. 11.10. Pitfalls
      11. 11.11. The qf File Internals
      12. A line
      13. B line
      14. C line
      15. d line
      16. D line
      17. E line
      18. F line
      19. H line
      20. I line
      21. K line
      22. M line
      23. N line
      24. P line
      25. Q line
      26. r line
      27. R line
      28. S line
      29. T line
      30. V line
      31. Z line
      32. ! line
      33. $ line
      34. . line
    7. 12. Maintain Aliases
      1. 12.1. The aliases(5) File
        1. 12.1.1. The aliases(5) File’s Location
        2. 12.1.2. Local Must Be Local
        3. 12.1.3. Alias Nonlocal Addresses
      2. 12.2. Forms of Alias Delivery
        1. 12.2.1. Delivery to Users
        2. 12.2.2. Delivery to Files
        3. 12.2.3. Delivery via Programs
          1. 12.2.3.1. Possible failures
      3. 12.3. Write a Delivery Agent Script
        1. 12.3.1. Duplicates Discarded
        2. 12.3.2. Correct exit(2) Values
        3. 12.3.3. Is It Really EX_OK?
      4. 12.4. Special Aliases
        1. 12.4.1. The Postmaster Alias
        2. 12.4.2. The MAILER-DAEMON Alias
        3. 12.4.3. Other Possible Required Aliases
        4. 12.4.4. Plussed Detail Addressing
        5. 12.4.5. Duplicate Entries and Automation
      5. 12.5. The Aliases Database
        1. 12.5.1. Rebuild the Alias Database
        2. 12.5.2. Check the Right Side of Aliases
        3. 12.5.3. Use Trailing Dots
        4. 12.5.4. Prevent Simultaneous Rebuilds
        5. 12.5.5. No DBM Aliasing
      6. 12.6. Prevent Aliasing with -n
        1. 12.6.1. Is an Alias Bad?
        2. 12.6.2. Filtering Recipients with a Shell Script
      7. 12.7. Pitfalls
    8. 13. Mailing Lists and ~/.forward
      1. 13.1. Internal Mailing Lists
      2. 13.2. :include: Mailing Lists
        1. 13.2.1. Comments in :include: Lists
        2. 13.2.2. Tradeoffs
      3. 13.3. Defining a Mailing List Owner
      4. 13.4. Exploder Mailing Lists
      5. 13.5. Problems with Mailing Lists
        1. 13.5.1. Reply Versus Bounce
        2. 13.5.2. Gateway Lists to News
        3. 13.5.3. A List-Bounced Alias
        4. 13.5.4. Users Ignore list-request
        5. 13.5.5. Precedence: bulk
        6. 13.5.6. X.400 Addresses
      6. 13.6. Packages That Help
        1. 13.6.1. Majordomo
        2. 13.6.2. Mailman
        3. 13.6.3. ListProcessor
        4. 13.6.4. ListManager
      7. 13.7. The User’s ~/.forward File
        1. 13.7.1. Unscrambling Forwards
        2. 13.7.2. Forwarding Loops
        3. 13.7.3. Appending to Files
        4. 13.7.4. Piping Through Programs
        5. 13.7.5. Specialty Programs for Use with ~/.forward
          1. 13.7.5.1. The procmail program
          2. 13.7.5.2. The slocal program
        6. 13.7.6. Force Requeue on Error
      8. 13.8. Pitfalls
    9. 14. Signals, Transactions, and Syslog
      1. 14.1. Signal the Daemon
      2. SIGTERM
      3. SIGINT
      4. SIGKILL
      5. SIGHUP
      6. SIGUSR1
      7. 14.2. Log Transactions with -X
      8. 14.3. Log with syslog
        1. 14.3.1. syslog(3)
        2. 14.3.2. Tuning syslog.conf
        3. 14.3.3. syslog’s Output
        4. 14.3.4. Gathering Statistics from syslog
          1. 14.3.4.1. message_volume.sh
      9. 14.4. Pitfalls
      10. 14.5. Alphabetized syslog Equates
      11. arg1=
      12. bodytype=
      13. class=
      14. ctladdr=
      15. daemon=
      16. delay=
      17. dsn=
      18. from=
      19. intvl=
      20. len=
      21. mailer=
      22. msgid=
      23. nrcpts=
      24. ntries=
      25. pri=
      26. proto=
      27. reject=
      28. relay=
      29. ruleset=
      30. size=
      31. stat=
      32. to=
      33. xdelay=
    10. 15. The sendmail Command Line
      1. 15.1. Alternative argv[0] Names
        1. 15.1.1. hoststat (V8.8 and Above)
        2. 15.1.2. mailq
        3. 15.1.3. newaliases
        4. 15.1.4. purgestat (V8.8 and Above)
        5. 15.1.5. smtpd
      2. 15.2. Command-Line Switches
      3. 15.3. List of Recipient Addresses
      4. 15.4. Processing the Command Line
        1. 15.4.1. First: Prescanning the Command Line
        2. 15.4.2. Second: Processing Prior to the Switches
          1. 15.4.2.1. Initialize the environment
          2. 15.4.2.2. Initialize sendmail macros
        3. 15.4.3. Third: Processing Switches
        4. 15.4.4. Fourth: Reading the Configuration File
        5. 15.4.5. Fifth: Collecting Recipients
      5. 15.5. sendmail’s exit( ) Status
      6. EX_CANTCREAT
      7. EX_CONFIG
      8. EX_IOERR
      9. EX_OK
      10. EX_OSERR
      11. EX_OSFILE
      12. EX_SOFTWARE
      13. EX_TEMPFAIL
      14. EX_UNAVAILABLE
      15. EX_USAGE
      16. 15.6. Pitfalls
      17. 15.7. Alphabetized Command-Line Switches
      18. -A
      19. -B
      20. -b
      21. -ba
      22. -bD
      23. -bd
      24. -bH
      25. -bh
      26. -bi
      27. -bm
      28. -bP
      29. -bp
      30. -bs
      31. -bt
      32. -bv
      33. -bz
      34. -C
      35. -c
      36. -d
      37. -E
      38. -e
      39. -F
      40. -f
      41. -G
      42. -h
      43. -I
      44. -i
      45. -J
      46. -L
      47. -M
      48. -m
      49. -N
      50. -n
      51. -O
      52. -o
      53. -p
      54. -q
      55. -R
      56. -r
      57. -s
      58. -T
      59. -t
      60. -U
      61. -V
      62. -v
      63. -X
      64. -x
    11. 16. Debug sendmail with -d
      1. 16.1. The Syntax of -d
      2. 16.2. The Behavior of -d
      3. 16.3. Interpret the Output
      4. 16.4. Table of All -d Categories
      5. 16.5. Pitfalls
      6. 16.6. Reference for -d in Numerical Order
      7. -d0.1
      8. -d0.4
      9. -d0.10
      10. -d0.12
      11. -d0.13
      12. -d0.15
      13. -d0.20
      14. -d2.1
      15. -d2.9
      16. -d4.80
      17. -d6.1
      18. -d8.1
      19. -d8.2
      20. -d8.3
      21. -d8.5
      22. -d8.7
      23. -d8.8
      24. -d11.1
      25. -d11.2
      26. -d12.1
      27. -d13.1
      28. -d20.1
      29. -d21.1
      30. -d21.2
      31. -d22.1
      32. -d22.11
      33. -d22.12
      34. -d25.1
      35. -d26.1
      36. -d27.1
      37. -d27.2
      38. -d27.3
      39. -d27.4
      40. -d27.5
      41. -d27.8
      42. -d27.9
      43. -d28.1
      44. -d29.1
      45. -d29.4
      46. -d31.2
      47. -d34.1
      48. -d34.11
      49. -d35.9
      50. -d37.1
      51. -d37.8
      52. -d38.2
      53. -d38.3
      54. -d38.4
      55. -d38.9
      56. -d38.10
      57. -d38.12
      58. -d38.19
      59. -d38.20
      60. -d41.1
      61. -d44.4
      62. -d44.5
      63. -d48.2
      64. -d49.1
      65. -d52.1
      66. -d52.100
      67. -d60.1
      68. -d99.100
  6. III. The Configuration File
    1. 17. Configuration File Overview
      1. 17.1. Overall Syntax
      2. 17.2. Comments
      3. 17.3. V8 Comments
      4. 17.4. Continuation Lines
      5. 17.5. The V Configuration Command
        1. 17.5.1. The V Configuration Command’s Level Part
        2. 17.5.2. The V Configuration Command’s Vendor Part
      6. 17.6. Pitfalls
    2. 18. The R (Rules) Configuration Command
      1. 18.1. Why Rules?
      2. 18.2. The R Configuration Command
        1. 18.2.1. Macros in Rules
        2. 18.2.2. Rules are Treated Like Addresses
          1. 18.2.2.1. Backslashes in rules
      3. 18.3. Tokenizing Rules
        1. 18.3.1. $-operators Are Tokens
        2. 18.3.2. The Space Character Is Special
        3. 18.3.3. Pasting Addresses Back Together
      4. 18.4. The Workspace
      5. 18.5. The Behavior of a Rule
      6. 18.6. The LHS
        1. 18.6.1. Minimum Matching
        2. 18.6.2. Backup and Retry
      7. 18.7. The RHS
        1. 18.7.1. Copy by Position: $digit
        2. 18.7.2. Rewrite Once Prefix: $:
        3. 18.7.3. Rewrite-and-Return Prefix: $@
        4. 18.7.4. Rewrite Through Another Rule Set: $>set
        5. 18.7.5. Return a Selection: $#
        6. 18.7.6. Canonicalize Hostname: $[ and $]
          1. 18.7.6.1. An example of canonicalization
          2. 18.7.6.2. Default in canonicalization: $:
        7. 18.7.7. Other Operators
      8. 18.8. Pitfalls
      9. 18.9. Rule Operator Reference
      10. $&
      11. $@
      12. $@
      13. $@
      14. $@
      15. $@
      16. $:
      17. $:
      18. $:
      19. $:
      20. $digit
      21. $=
      22. $>
      23. $[ $]
      24. $( $)
      25. $-
      26. $+
      27. $#
      28. $#
      29. $#
      30. $*
      31. $~
      32. $|
    3. 19. The S (Rule Sets) Configuration Command
      1. 19.1. The S Configuration Command
        1. 19.1.1. Rule-Set Numbers
        2. 19.1.2. Rule-Set Names
        3. 19.1.3. Associate Number with Name
        4. 19.1.4. Macros in Rule-Set Names
        5. 19.1.5. Rule Sets and Lists of Rules
        6. 19.1.6. Odds and Ends
        7. 19.1.7. Rule Sets and m4
      2. 19.2. The Sequence of Rule Sets
        1. 19.2.1. V8 Enhancements
      3. 19.3. The canonify Rule Set 3
        1. 19.3.1. A Special Case: From:<>
        2. 19.3.2. Basic Textual Canonicalization
        3. 19.3.3. Handling Routing Addresses
        4. 19.3.4. Handling Specialty Addresses
        5. 19.3.5. Focusing for @ Syntax
      4. 19.4. The final Rule Set 4
        1. 19.4.1. Stripping Trailing Dots
        2. 19.4.2. Restoring Source Routes
        3. 19.4.3. Removing Focus
        4. 19.4.4. Correcting Tags
      5. 19.5. The parse Rule Set 0
        1. 19.5.1. Further Processing: $:address
        2. 19.5.2. Selecting S= and R=
        3. 19.5.3. Delivering to Local Recipient
        4. 19.5.4. Forwarding to a Knowledgeable Host
        5. 19.5.5. Handling UUCP Locally
        6. 19.5.6. Forwarding over the Network
        7. 19.5.7. Handling Leftover Local Addresses
      6. 19.6. The localaddr Rule Set 5
        1. 19.6.1. The Local_localaddr Hook
      7. 19.7. Rule Sets 1 and 2
        1. 19.7.1. Rule Set 1
        2. 19.7.2. Rule Set 2
      8. 19.8. Pitfalls
      9. 19.9. Policy Rule-Set Reference
      10. check_data
      11. check_etrn
      12. check_vrfy and check_expn
      13. srv_features
    4. 20. The M (Mail Delivery Agent) Configuration Command
      1. 20.1. The M Configuration Command
      2. 20.2. The Symbolic Delivery Agent Name
        1. 20.2.1. Required Symbolic Names
      3. 20.3. The mc Configuration Syntax
        1. 20.3.1. Choose Preferred Agents
          1. 20.3.1.1. confSMTP_MAILER
          2. 20.3.1.2. confUUCP_MAILER
          3. 20.3.1.3. confLOCAL_MAILER
          4. 20.3.1.4. confRELAY_MAILER
        2. 20.3.2. Tuning Without an Appropriate Keyword
        3. 20.3.3. Create a New mc Delivery Agent
          1. 20.3.3.1. MAILER_DEFINITIONS
      4. 20.4. Delivery Agents by Name
      5. cyrus
      6. cyrusv2
      7. discard
      8. error
      9. fax
      10. *file* and *include*
      11. local and prog
      12. mail11
      13. ph
      14. pop
      15. procmail
      16. qpage
      17. smtp, etc.
      18. usenet
      19. uucp
      20. 20.5. Delivery Agent Equates
      21. /= (forward slash)
      22. A=
      23. C=
      24. D=
      25. E=
      26. F=
      27. L=
      28. M=
      29. m=
      30. N=
      31. P=
      32. Q=
      33. R=
      34. r=
      35. S=
      36. T=
      37. U=
      38. W=
      39. 20.6. How a Delivery Agent Is Executed
        1. 20.6.1. The Fork
        2. 20.6.2. The Child
      40. 20.7. Pitfalls
      41. 20.8. Delivery Agent F= Flags
      42. F=%
      43. F=0 (zero)
      44. F=1 (one)
      45. F=2
      46. F=3
      47. F=5
      48. F=6
      49. F=7
      50. F=8
      51. F=9
      52. F=: (colon)
      53. F=| (vertical bar)
      54. F=/ (forward slash)
      55. F=@
      56. F=a
      57. F=A
      58. F=b
      59. F=c
      60. F=C
      61. F=d
      62. F=D
      63. F=e
      64. F=E
      65. F=f
      66. F=F
      67. F=g
      68. F=h
      69. F=i
      70. F=I (uppercase i)
      71. F=j
      72. F=k
      73. F=l (lowercase L)
      74. F=L
      75. F=m
      76. F=M
      77. F=n
      78. F=o
      79. F=p
      80. F=P
      81. F=q
      82. F=r
      83. F=R
      84. F=s
      85. F=S
      86. F=u
      87. F=U
      88. F=w
      89. F=x
      90. F=X
      91. F=z
      92. F=Z
    5. 21. The D (Define a Macro) Configuration Command
      1. 21.1. Preassigned sendmail Macros
        1. 21.1.1. Macros and the System Identity
      2. 21.2. Command-Line Definitions
        1. 21.2.1. Syntax of the Command-Line Macro’s Text
      3. 21.3. Configuration-File Definitions
        1. 21.3.1. Syntax of the Configuration-File Macro’s Text
        2. 21.3.2. Required Macros (V8.6 and Earlier)
      4. 21.4. Macro Names
        1. 21.4.1. Single-Character Names
        2. 21.4.2. Multicharacter Names
      5. 21.5. Macro Expansion: $ and $&
        1. 21.5.1. Macro Expansion Is Recursive
        2. 21.5.2. When Is a Macro Expanded?
        3. 21.5.3. Use Value As Is with $&
      6. 21.6. Macro Conditionals: $?, $|, and $.
        1. 21.6.1. Conditionals Can Nest
        2. 21.6.2. Macro Translations
      7. 21.7. Macros with mc Configuration
      8. 21.8. Pitfalls
      9. 21.9. Alphabetized sendmail Macros
      10. $_
      11. $a
      12. ${addr_type}
      13. ${alg_bits}
      14. ${auth_authen}
      15. ${auth_author}
      16. ${auth_ssf}
      17. ${auth_type}
      18. $b
      19. ${bodytype}
      20. $B
      21. $c
      22. ${cert_issuer}
      23. ${cert_md5}
      24. ${cert_subject}
      25. ${cipher}
      26. ${cipher_bits}
      27. ${client_addr}
      28. ${client_flags}
      29. ${client_name}
      30. ${client_port}
      31. ${client_resolve}
      32. ${cn_issuer}
      33. ${cn_subject}
      34. ${currHeader}
      35. $C
      36. $d
      37. ${daemon_addr}
      38. ${daemon_family}
      39. ${daemon_flags}
      40. ${daemon_info}
      41. ${daemon_name}
      42. ${daemon_port}
      43. ${deliveryMode}
      44. ${dsn_envid}
      45. ${dsn_notify}
      46. ${dsn_ret}
      47. $D
      48. $e
      49. ${envid}
      50. $E
      51. $f
      52. $F
      53. $g
      54. $h
      55. ${hdr_name}
      56. ${hdrlen}
      57. $H
      58. $i
      59. ${if_addr}
      60. ${if_addr_out}
      61. ${if_family}
      62. ${if_family_out}
      63. ${if_name}
      64. ${if_name_out}
      65. $j
      66. $k
      67. $l (lowercase L)
      68. ${load_avg}
      69. $L
      70. $m
      71. ${mail_addr}
      72. ${mail_host}
      73. ${mail_mailer}
      74. ${msg_size}
      75. $M
      76. ${MTAHost}
      77. $n
      78. ${nrcpts}
      79. ${ntries}
      80. $o
      81. ${opMode}
      82. $p
      83. $q
      84. ${queue_interval}
      85. $r
      86. ${rcpt_addr}
      87. ${rcpt_host}
      88. ${rcpt_mailer}
      89. $R
      90. $s
      91. ${sendmailMTACluster}
      92. ${server_addr}
      93. ${server_name}
      94. $S
      95. $t
      96. ${tls_version}
      97. $u
      98. $U
      99. $v
      100. ${verify}
      101. $V
      102. $w
      103. $W
      104. $x
      105. $X
      106. $y
      107. $Y
      108. $z
      109. $Z
    6. 22. The C and F (Class Macro) Configuration Commands
      1. 22.1. Class Configuration Commands
        1. 22.1.1. The C Class Command
          1. 22.1.1.1. Append one class to another
        2. 22.1.2. The F Class Command
          1. 22.1.2.1. scanf(3) variations
        3. 22.1.3. Class Via Database Map Lookups
          1. 22.1.3.1. Class by replacing files with database lookups in mc macros
          2. 22.1.3.2. Class via ldap map lookups
      2. 22.2. Access Classes in Rules
        1. 22.2.1. Matching Any in a Class: $=
        2. 22.2.2. Matching Any Token Not in a Class: $~
        3. 22.2.3. Backup and Retry
        4. 22.2.4. Class Name Hashing Algorithm
      3. 22.3. Classes with mc Configuration
      4. 22.4. Internal Class Macros
      5. 22.5. Pitfalls
      6. 22.6. Alphabetized Class Macros
      7. $=b
      8. $={checkMIMEFieldHeaders}
      9. $={checkMIMEHeaders}
      10. $={checkMIMETextHeaders}
      11. $=e
      12. $=k
      13. $=m
      14. $=n
      15. $={persistentMacros}
      16. $=q
      17. $={ResOk}
      18. $=R
      19. $={tls}
      20. $=s
      21. $=t
      22. $=w
    7. 23. The K (Database-Map) Configuration Command
      1. 23.1. Enable at Compile Time
        1. 23.1.1. Create Files with makemap
      2. 23.2. The K Configuration Command
        1. 23.2.1. The name
        2. 23.2.2. The type
        3. 23.2.3. The args
      3. 23.3. The K Command switches
      4. -A
      5. -a
      6. -D
      7. -f
      8. -k
      9. -l (lowercase L)
      10. -m
      11. -N
      12. -O
      13. -o
      14. -q
      15. -S
      16. -T
      17. -t
      18. -v
      19. -z
      20. 23.4. Use $( and $) in Rules
        1. 23.4.1. Specify a Default with $:
        2. 23.4.2. Specify Numbered Substitution with $@
        3. 23.4.3. $[ and $]: A Special Case
      21. 23.5. Database Maps with mc Configuration
        1. 23.5.1. Set a Default Database-Map Type for Features
      22. 23.6. Pitfalls
      23. 23.7. Alphabetized Database-Map Types
      24. arith
      25. btree
      26. bestmx
      27. dbm
      28. dequote
      29. dns
      30. hash
      31. hesiod
      32. host
      33. implicit
      34. ldap (was ldapx)
      35. macro
      36. netinfo
      37. nis
      38. nisplus
      39. nsd
      40. null
      41. ph
      42. program
      43. regex
      44. sequence
      45. stab
      46. switch
      47. syslog
      48. text
      49. userdb
      50. user
    8. 24. The O (Options) Configuration Command
      1. 24.1. Overview
      2. 24.2. Command-Line Options
        1. 24.2.1. Pre-V8.7 Command-Line Option Declarations
        2. 24.2.2. Multicharacter Command-Line Options
          1. 24.2.2.1. Multicharacter name shorthand
        3. 24.2.3. Appropriateness of Options
        4. 24.2.4. Options That Are Safe
      3. 24.3. Configuration File Options
        1. 24.3.1. Pre-V8.7 Configuration File Declarations
        2. 24.3.2. V8.7 Configuration File Declarations
      4. 24.4. Options in the mc File
      5. 24.5. Alphabetical Table of All Options
      6. 24.6. Option Argument Types
      7. 24.7. Interrelating Options
        1. 24.7.1. File Locations
        2. 24.7.2. The Queue
        3. 24.7.3. Managing Aliases
        4. 24.7.4. Controlling Machine Load
        5. 24.7.5. Connection Caching
        6. 24.7.6. Problem Solving
        7. 24.7.7. Other Options
      8. 24.8. Pitfalls
      9. 24.9. Alphabetized Options
      10. AliasFile
      11. AliasWait
      12. AllowBogusHELO
      13. AuthMaxBits
      14. AuthMechanisms
      15. AuthOptions
      16. AutoRebuildAliases
      17. BadRcptThrottle
      18. BlankSub
      19. CACertFile
      20. CACertPath
      21. CheckAliases
      22. CheckpointInterval
      23. ClassFactor
      24. ClientCertFile
      25. ClientKeyFile
      26. ClientPortOptions
      27. ColonOkInAddr
      28. ConnectionCacheSize
      29. ConnectionCacheTimeout
      30. ConnectionRateThrottle
      31. ConnectOnlyTo
      32. ControlSocketName
      33. DaemonPortOptions
      34. DataFileBufferSize
      35. DeadLetterDrop
      36. DefaultAuthInfo
      37. DefaultCharSet
      38. DefaultUser
      39. DelayLA
      40. DeliverByMin
      41. DeliveryMode
      42. DHParameters
      43. DialDelay
      44. DirectSubmissionModifiers
      45. DontBlameSendmail
      46. DontExpandCnames
      47. DontInitGroups
      48. DontProbeInterfaces
      49. DontPruneRoutes
      50. DoubleBounceAddress
      51. EightBitMode
      52. ErrorHeader
      53. ErrorMode
      54. FallbackMXhost
      55. FastSplit
      56. ForkEachJob
      57. ForwardPath
      58. HelpFile
      59. HoldExpensive
      60. HostsFile
      61. HostStatusDirectory
      62. IgnoreDots
      63. InputMailFilters
      64. LDAPDefaultSpec
      65. LogLevel
      66. MailboxDatabase
      67. MatchGECOS
      68. MaxAliasRecursion
      69. MaxDaemonChildren
      70. MaxHeadersLength
      71. MaxHopCount
      72. MaxMessageSize
      73. MaxMimeHeaderLength
      74. MaxQueueChildren
      75. MaxQueueRunSize
      76. MaxRecipientsPerMessage
      77. MaxRunnersPerQueue
      78. MeToo
      79. Milter
      80. MinFreeBlocks
      81. MinQueueAge
      82. MustQuoteChars
      83. NiceQueueRun
      84. NoRecipientAction
      85. OldStyleHeaders
      86. OperatorChars
      87. PidFile
      88. PostmasterCopy
      89. PrivacyOptions
      90. ProcessTitlePrefix
      91. QueueDirectory
      92. QueueFactor
      93. QueueFileMode
      94. QueueLA
      95. QueueSortOrder
      96. QueueTimeout
      97. RandFile
      98. RecipientFactor
      99. RefuseLA
      100. ResolverOptions
      101. RetryFactor
      102. RrtImpliesDsn
      103. RunAsUser
      104. SafeFileEnvironment
      105. SaveFromLine
      106. SendMimeErrors
      107. ServerCertFile
      108. ServerKeyFile
      109. ServiceSwitchFile
      110. SevenBitInput
      111. SharedMemoryKey
      112. SingleLineFromHeader
      113. SingleThreadDelivery
      114. SmtpGreetingMessage
      115. StatusFile
      116. SuperSafe
      117. TempFileMode
      118. Timeout
      119. TimeZoneSpec
      120. TLSSrvOptions
      121. TrustedUser
      122. TryNullMXList
      123. UnixFromLine
      124. UnsafeGroupWrites
      125. UseErrorsTo
      126. UseMSP
      127. UserDatabaseSpec
      128. Verbose
      129. XscriptFileBufferSize
      130. M
    9. 25. The H (Headers) Configuration Command
      1. 25.1. Overview
      2. 25.2. Header Names
      3. 25.3. Header Field Contents
        1. 25.3.1. Macros in the Header Field
        2. 25.3.2. Escape Character in the Header Field
        3. 25.3.3. Quoted Strings in the Header Field
        4. 25.3.4. Comments in the Header Field
          1. 25.3.4.1. Balancing special characters
      4. 25.4. ?flags? in Header Definitions
        1. 25.4.1. Macros Force Header Inclusion
        2. 25.4.2. Macro-Included Headers Don’t Survive Queueing
      5. 25.5. Rules Check Header Contents
        1. 25.5.1. Use $>+ to Include RFC2822 Comments
          1. 25.5.1.1. Check the header’s length
        2. 25.5.2. H* a Default for All Headers
        3. 25.5.3. The check_eoh Rule Set
          1. 25.5.3.1. Check for missing headers
      6. 25.6. Header Behavior in conf.c
        1. 25.6.1. H_ACHECK Header Flag (V5 and above)
          1. 25.6.1.1. Replace headers with H_ACHECK
        2. 25.6.2. H_BCC Header Flag (V8.7 and above)
        3. 25.6.3. H_BINDLATE Header Flag (V8.10 and above)
        4. 25.6.4. H_CHECK Header Flag (V5 and above)
        5. 25.6.5. H_CTE Header Flag (V8.7 and above)
        6. 25.6.6. H_CTYPE Header Flag (V8.7 and above)
        7. 25.6.7. H_DEFAULT Header Flag (V5 and above)
        8. 25.6.8. H_ENCODABLE Header Flag (V8.8 and above)
        9. 25.6.9. H_EOH Header Flag (V5 and above)
        10. 25.6.10. H_ERRORSTO (Was H_ERRSTO) (V8.7 and above)
        11. 25.6.11. H_FORCE Header Flag (V5 and above)
        12. 25.6.12. H_FROM Header Flag (V5 and above)
        13. 25.6.13. H_RCPT Header Flag (V5 and above)
        14. 25.6.14. H_RECEIPTTO Header Flag (V8.7 and above)
        15. 25.6.15. H_RESENT Header Flag (V5 and above)
        16. 25.6.16. H_STRIPCOMM Header Flag (V8.10 and above)
        17. 25.6.17. H_TRACE Header Flag (V5 and above)
        18. 25.6.18. H_USER Header Flag (V8.11 and above)
        19. 25.6.19. H_VALID Header Flag (V5 and above)
      7. 25.7. Headers and mc Configuration
      8. 25.8. Headers by Category
        1. 25.8.1. Recommended Headers
        2. 25.8.2. Sender Headers
        3. 25.8.3. Recipient Headers
        4. 25.8.4. Identification and Control Headers
        5. 25.8.5. Date and Trace Headers
        6. 25.8.6. Other Headers
        7. 25.8.7. MIME Headers
      9. 25.9. Forwarding with Resent Headers
        1. 25.9.1. Remove and Re-create the From: Header
      10. 25.10. Precedence
        1. 25.10.1. The P Configuration Command
      11. 25.11. Pitfalls
      12. 25.12. Alphabetized Header Reference
      13. Apparently-From:
      14. Apparently-To:
      15. Auto-Submitted:
      16. Bcc:
      17. Cc:
      18. Comments:
      19. Content-Description:
      20. Content-Disposition:
      21. Content-Id:
      22. Content-Length:
      23. Content-Transfer-Encoding:
      24. Content-Type:
      25. Date:
      26. Delivered-To:
      27. Disposition-Notification-To:
      28. Encrypted:
      29. Errors-To:
      30. From:
      31. Full-Name:
      32. In-Reply-To:
      33. Keywords:
      34. Mail-From:
      35. Message-ID:
      36. Message:
      37. MIME-Version:
      38. Posted-Date:
      39. Precedence:
      40. Priority:
      41. Received:
      42. References:
      43. Reply-To:
      44. Return-Path:
      45. Return-Receipt-To:
      46. Sender:
      47. Subject:
      48. Text:
      49. To:
      50. Via:
      51. X-Authentication-Warning:
      52. X400-Received:
  7. IV. Appendixes
    1. A. The mc Configuration Macros and Directives
    2. B. What’s New Since V8.8
      1. B.1. Chapter 1
      2. B.2. Chapter 2
      3. B.3. Chapter 3
      4. B.4. Chapter 4
      5. B.5. Chapter 5
      6. B.6. Chapter 6
      7. B.7. Chapter 7
      8. B.8. Chapter 8
      9. B.9. Chapter 9
      10. B.10. Chapter 10
      11. B.11. Chapter 11
      12. B.12. Chapter 12
      13. B.13. Chapter 13
      14. B.14. Chapter 14
      15. B.15. Chapter 15
      16. B.16. Chapter 16
      17. B.17. Chapter 17
      18. B.18. Chapter 18
      19. B.19. Chapter 19
      20. B.20. Chapter 20
      21. B.21. Chapter 21
      22. B.22. Chapter 22
      23. B.23. Chapter 23
      24. B.24. Chapter 24
      25. B.25. Chapter 25
    3. C. Error Message Reference
      1. C.1. Where Errors Are Printed
      2. C.2. Alphabetized Error Reference
    4. D. The checkcompat( ) Cookbook
      1. D.1. How checkcompat( ) Works
        1. D.1.1. Arguments Passed to checkcompat( )
        2. D.1.2. Global Variables
      2. D.2. Reject Bad Body Lines
      3. D.3. Reject Excess 8-Bit Characters
    5. E. A Map to Tutorial Information
      1. E.1. How to Use This Guide
      2. E.2. The Guide
        1. E.2.1. Tutorial Introduction
        2. E.2.2. Tutorial Guide to Building and Installing sendmail
        3. E.2.3. Tutorial Guide to Rules and Rule Sets
        4. E.2.4. Tutorial Guide to the Configuration File
        5. E.2.5. Tutorial Guide to Configuring with m4
  8. Bibliography
    1. Requests for Comments
    2. Publications and Postings
  9. About the Author
  10. Colophon
  11. Copyright

Product information

  • Title: Sendmail, 3rd Edition
  • Author(s): Bryan Costales
  • Release date: December 2002
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781565928398