Import Debian changes 4.92-8+deb10u3
[hcoop/debian/exim4.git] / doc / spec.txt
index 0592640..b522487 100644 (file)
@@ -2,9 +2,9 @@ Specification of the Exim Mail Transfer Agent
 
 Exim Maintainers
 
-Copyright (c) 2017 University of Cambridge
+Copyright (c) 2018 University of Cambridge
 
-Revision 4.89  07 Mar 2017 EM
+Revision 4.92  10 Feb 2019 EM
 
 -------------------------------------------------------------------------------
 
@@ -13,15 +13,14 @@ TABLE OF CONTENTS
 1. Introduction
 
     1.1. Exim documentation
-    1.2. FTP and web sites
+    1.2. FTP site and websites
     1.3. Mailing lists
-    1.4. Exim training
-    1.5. Bug reports
-    1.6. Where to find the Exim distribution
-    1.7. Limitations
-    1.8. Run time configuration
-    1.9. Calling interface
-    1.10. Terminology
+    1.4. Bug reports
+    1.5. Where to find the Exim distribution
+    1.6. Limitations
+    1.7. Runtime configuration
+    1.8. Calling interface
+    1.9. Terminology
 
 2. Incorporated code
 3. How Exim receives and delivers mail
@@ -75,7 +74,7 @@ TABLE OF CONTENTS
     5.2. Trusted and admin users
     5.3. Command line options
 
-6. The Exim run time configuration file
+6. The Exim runtime configuration file
 
     6.1. Using a different configuration file
     6.2. Configuration file format
@@ -103,13 +102,14 @@ TABLE OF CONTENTS
 
 7. The default configuration file
 
-    7.1. Main configuration settings
-    7.2. ACL configuration
-    7.3. Router configuration
-    7.4. Transport configuration
-    7.5. Default retry rule
-    7.6. Rewriting configuration
-    7.7. Authenticators configuration
+    7.1. Macros
+    7.2. Main configuration settings
+    7.3. ACL configuration
+    7.4. Router configuration
+    7.5. Transport configuration
+    7.6. Default retry rule
+    7.7. Rewriting configuration
+    7.8. Authenticators configuration
 
 8. Regular expressions
 9. File and database lookups
@@ -190,7 +190,7 @@ TABLE OF CONTENTS
     13.1. Starting a listening daemon
     13.2. Special IP listening addresses
     13.3. Overriding local_interfaces and daemon_smtp_ports
-    13.4. Support for the obsolete SSMTP (or SMTPS) protocol
+    13.4. Support for the submissions (aka SSMTP or SMTPS) protocol
     13.5. IPv6 address scopes
     13.6. Disabling IPv6
     13.7. Examples of starting a listening daemon
@@ -373,7 +373,7 @@ TABLE OF CONTENTS
 41. The tls authenticator
 42. Encrypted SMTP connections using TLS/SSL
 
-    42.1. Support for the legacy "ssmtp" (aka "smtps") protocol
+    42.1. Support for the "submissions" (aka "ssmtp" and "smtps") protocol
     42.2. OpenSSL vs GnuTLS
     42.3. GnuTLS parameter computation
     42.4. Requiring specific ciphers in OpenSSL
@@ -387,6 +387,7 @@ TABLE OF CONTENTS
     42.12. Certificates and all that
     42.13. Certificate chains
     42.14. Self-signed certificates
+    42.15. DANE
 
 43. Access control lists
 
@@ -603,11 +604,14 @@ TABLE OF CONTENTS
 56. Format of spool files
 
     56.1. Format of the -H file
+    56.2. Format of the -D file
 
-57. Support for DKIM (DomainKeys Identified Mail)
+57. DKIM and SPF
 
-    57.1. Signing outgoing messages
-    57.2. Verifying DKIM signatures in incoming mail
+    57.1. DKIM (DomainKeys Identified Mail)
+    57.2. Signing outgoing messages
+    57.3. Verifying DKIM signatures in incoming mail
+    57.4. SPF (Sender Policy Framework)
 
 58. Proxies
 
@@ -637,7 +641,7 @@ Configuration files currently exist for the following operating systems: AIX,
 BSD/OS (aka BSDI), Darwin (Mac OS X), DGUX, Dragonfly, FreeBSD, GNU/Hurd, GNU/
 Linux, HI-OSF (Hitachi), HI-UX, HP-UX, IRIX, MIPS RISCOS, NetBSD, OpenBSD,
 OpenUNIX, QNX, SCO, SCO SVR4.2 (aka UNIX-SV), Solaris (aka SunOS5), SunOS4,
-Tru64-Unix (formerly Digital UNIX, formerly DEC-OSF1), Ultrix, and Unixware.
+Tru64-Unix (formerly Digital UNIX, formerly DEC-OSF1), Ultrix, and UnixWare.
 Some of these operating systems are no longer current and cannot easily be
 tested, so the configuration files may no longer work in practice.
 
@@ -649,11 +653,11 @@ The terms and conditions for the use and distribution of Exim are contained in
 the file NOTICE. Exim is distributed under the terms of the GNU General Public
 Licence, a copy of which may be found in the file LICENCE.
 
-The use, supply or promotion of Exim for the purpose of sending bulk,
-unsolicited electronic mail is incompatible with the basic aims of the program,
-which revolve around the free provision of a service that enhances the quality
-of personal communications. The author of Exim regards indiscriminate
-mass-mailing as an antisocial, irresponsible abuse of the Internet.
+The use, supply, or promotion of Exim for the purpose of sending bulk,
+unsolicited electronic mail is incompatible with the basic aims of Exim, which
+revolve around the free provision of a service that enhances the quality of
+personal communications. The author of Exim regards indiscriminate mass-mailing
+as an antisocial, irresponsible abuse of the Internet.
 
 Exim owes a great deal to Smail 3 and its author, Ron Karr. Without the
 experience of running and working on the Smail 3 code, I could never have
@@ -670,8 +674,8 @@ ACKNOWLEDGMENTS, in which I have started recording the names of contributors.
 1.1 Exim documentation
 ----------------------
 
-This edition of the Exim specification applies to version 4.89 of Exim.
-Substantive changes from the 4.88 edition are marked in some renditions of the
+This edition of the Exim specification applies to version 4.92 of Exim.
+Substantive changes from the 4.91 edition are marked in some renditions of this
 document; this paragraph is so marked if the rendition is capable of showing a
 change indicator.
 
@@ -680,16 +684,16 @@ is expected to have some familiarity with the SMTP mail transfer protocol and
 with general Unix system administration. Although there are some discussions
 and examples in places, the information is mostly organized in a way that makes
 it easy to look up, rather than in a natural order for sequential reading.
-Furthermore, the manual aims to cover every aspect of Exim in detail, including
-a number of rarely-used, special-purpose features that are unlikely to be of
-very wide interest.
+Furthermore, this manual aims to cover every aspect of Exim in detail,
+including a number of rarely-used, special-purpose features that are unlikely
+to be of very wide interest.
 
 An "easier" discussion of Exim which provides more in-depth explanatory,
 introductory, and tutorial material can be found in a book entitled The Exim
-SMTP Mail Server (second edition, 2007), published by UIT Cambridge (http://
+SMTP Mail Server (second edition, 2007), published by UIT Cambridge (https://
 www.uit.co.uk/exim-book/).
 
-This book also contains a chapter that gives a general introduction to SMTP and
+The book also contains a chapter that gives a general introduction to SMTP and
 Internet mail. Inevitably, however, the book is unlikely to be fully up-to-date
 with the latest release of Exim. (Note that the earlier book about Exim,
 published by O'Reilly, covers Exim 3, and many things have changed in Exim 4.)
@@ -699,8 +703,8 @@ Debian-specific features in the file /usr/share/doc/exim4-base/README.Debian.
 The command man update-exim.conf is another source of Debian-specific
 information.
 
-As the program develops, there may be features in newer versions that have not
-yet made it into this document, which is updated only when the most significant
+As Exim develops, there may be features in newer versions that have not yet
+made it into this document, which is updated only when the most significant
 digit of the fractional part of the version number changes. Specifications of
 new features that are not yet in this manual are placed in the file doc/
 NewStuff in the Exim distribution.
@@ -710,8 +714,8 @@ incompatibly while they are developing, or even be withdrawn. For this reason,
 they are not documented in this manual. Information about experimental features
 can be found in the file doc/experimental.txt.
 
-All changes to the program (whether new features, bug fixes, or other kinds of
-change) are noted briefly in the file called doc/ChangeLog.
+All changes to Exim (whether new features, bug fixes, or other kinds of change)
+are noted briefly in the file called doc/ChangeLog.
 
 This specification itself is available as an ASCII file in doc/spec.txt so that
 it can easily be searched with a text editor. Other files in the doc directory
@@ -727,29 +731,29 @@ Exim4.upgrade    upgrade notes from release 3 to release 4
 openssl.txt      installing a current OpenSSL release
 
 The main specification and the specification of the filtering language are also
-available in other formats (HTML, PostScript, PDF, and Texinfo). Section 1.6
+available in other formats (HTML, PostScript, PDF, and Texinfo). Section 1.5
 below tells you how to get hold of these.
 
 
-1.2 FTP and web sites
----------------------
+1.2 FTP site and websites
+-------------------------
 
-The primary site for Exim source distributions is currently the University of
-Cambridge's FTP site, whose contents are described in Where to find the Exim
-distribution below. In addition, there is a web site and an FTP site at 
-exim.org. These are now also hosted at the University of Cambridge. The 
-exim.org site was previously hosted for a number of years by Energis Squared,
-formerly Planet Online Ltd, whose support I gratefully acknowledge.
+The primary site for Exim source distributions is the exim.org FTP site,
+available over HTTPS, HTTP and FTP. These services, and the exim.org website,
+are hosted at the University of Cambridge.
 
-As well as Exim distribution tar files, the Exim web site contains a number of
+As well as Exim distribution tar files, the Exim website contains a number of
 differently formatted versions of the documentation. A recent addition to the
-online information is the Exim wiki (http://wiki.exim.org), which contains what
-used to be a separate FAQ, as well as various other examples, tips, and
-know-how that have been contributed by Exim users.
+online information is the Exim wiki (https://wiki.exim.org), which contains
+what used to be a separate FAQ, as well as various other examples, tips, and
+know-how that have been contributed by Exim users. The wiki site should always
+redirect to the correct place, which is currently provided by GitHub, and is
+open to editing by anyone with a GitHub account.
 
-An Exim Bugzilla exists at http://bugs.exim.org. You can use this to report
+An Exim Bugzilla exists at https://bugs.exim.org. You can use this to report
 bugs, and also to add items to the wish list. Please search first to check that
-you are not duplicating a previous entry.
+you are not duplicating a previous entry. Please do not ask for configuration
+help in the bug-tracker.
 
 
 1.3 Mailing lists
@@ -768,83 +772,79 @@ are using a Debian distribution of Exim, you may wish to subscribe to the
 Debian-specific mailing list pkg-exim4-users@lists.alioth.debian.org via this
 web page:
 
-http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users
+https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-exim4-users
 
-Please ask Debian-specific questions on this list and not on the general Exim
+Please ask Debian-specific questions on that list and not on the general Exim
 lists.
 
 
-1.4 Exim training
------------------
-
-Training courses in Cambridge (UK) used to be run annually by the author of
-Exim, before he retired. At the time of writing, there are no plans to run
-further Exim courses in Cambridge. However, if that changes, relevant
-information will be posted at http://www-tus.csx.cam.ac.uk/courses/exim/.
-
-
-1.5 Bug reports
+1.4 Bug reports
 ---------------
 
 Reports of obvious bugs can be emailed to bugs@exim.org or reported via the
-Bugzilla (http://bugs.exim.org). However, if you are unsure whether some
+Bugzilla (https://bugs.exim.org). However, if you are unsure whether some
 behaviour is a bug or not, the best thing to do is to post a message to the 
 exim-dev mailing list and have it discussed.
 
 
-1.6 Where to find the Exim distribution
+1.5 Where to find the Exim distribution
 ---------------------------------------
 
-The master ftp site for the Exim distribution is
+The master distribution site for the Exim distribution is
 
-ftp://ftp.csx.cam.ac.uk/pub/software/email/exim
+https://downloads.exim.org/
 
-This is mirrored by
+The service is available over HTTPS, HTTP and FTP. We encourage people to
+migrate to HTTPS.
 
-ftp://ftp.exim.org/pub/exim
+The content served at https://downloads.exim.org/ is identical to the content
+served at https://ftp.exim.org/pub/exim and ftp://ftp.exim.org/pub/exim.
 
-The file references that follow are relative to the exim directories at these
-sites. There are now quite a number of independent mirror sites around the
-world. Those that I know about are listed in the file called Mirrors.
+If accessing via a hostname containing ftp, then the file references that
+follow are relative to the exim directories at these sites. If accessing via
+the hostname downloads then the subdirectories described here are top-level
+directories.
 
-Within the exim directory there are subdirectories called exim3 (for previous
-Exim 3 distributions), exim4 (for the latest Exim 4 distributions), and Testing
-for testing versions. In the exim4 subdirectory, the current release can always
-be found in files called
+There are now quite a number of independent mirror sites around the world.
+Those that I know about are listed in the file called Mirrors.
 
+Within the top exim directory there are subdirectories called exim3 (for
+previous Exim 3 distributions), exim4 (for the latest Exim 4 distributions),
+and Testing for testing versions. In the exim4 subdirectory, the current
+release can always be found in files called
+
+exim-n.nn.tar.xz
 exim-n.nn.tar.gz
 exim-n.nn.tar.bz2
 
-where n.nn is the highest such version number in the directory. The two files
-contain identical data; the only difference is the type of compression. The
-.bz2 file is usually a lot smaller than the .gz file.
+where n.nn is the highest such version number in the directory. The three files
+contain identical data; the only difference is the type of compression. The .xz
+file is usually the smallest, while the .gz file is the most portable to old
+systems.
 
 The distributions will be PGP signed by an individual key of the Release
 Coordinator. This key will have a uid containing an email address in the 
 exim.org domain and will have signatures from other people, including other
 Exim maintainers. We expect that the key will be in the "strong set" of PGP
-keys. There should be a trust path to that key from Nigel Metheringham's PGP
-key, a version of which can be found in the release directory in the file
-nigel-pubkey.asc. All keys used will be available in public keyserver pools,
-such as pool.sks-keyservers.net.
-
-At time of last update, releases were being made by Phil Pennock and signed
-with key 0x403043153903637F, although that key is expected to be replaced in
-2013. A trust path from Nigel's key to Phil's can be observed at https://
-www.security.spodhuis.org/exim-trustpath.
+keys. There should be a trust path to that key from the Exim Maintainer's PGP
+keys, a version of which can be found in the release directory in the file
+Exim-Maintainers-Keyring.asc. All keys used will be available in public
+keyserver pools, such as pool.sks-keyservers.net.
 
-Releases have also been authorized to be performed by Todd Lyons who signs with
-key 0xC4F4F94804D29EBA. A direct trust path exists between previous RE Phil
-Pennock and Todd Lyons through a common associate.
+At the time of the last update, releases were being made by Jeremy Harris and
+signed with key 0xBCE58C8CE41F32DF. Other recent keys used for signing are
+those of Heiko Schlittermann, 0x26101B62F69376CE, and of Phil Pennock, 
+0x4D1E900E14C1CC04.
 
 The signatures for the tar bundles are in:
 
+exim-n.nn.tar.xz.asc
 exim-n.nn.tar.gz.asc
 exim-n.nn.tar.bz2.asc
 
-For each released version, the log of changes is made separately available in a
-separate file in the directory ChangeLogs so that it is possible to find out
-what has changed without having to download the entire distribution.
+For each released version, the log of changes is made available in a separate
+file in the directory ChangeLogs so that it is possible to find out what has
+changed without having to download the entire distribution.
 
 The main distribution contains ASCII versions of this specification and other
 documentation; other formats of the documents are available in separate files
@@ -856,10 +856,10 @@ exim-postscript-n.nn.tar.gz
 exim-texinfo-n.nn.tar.gz
 
 These tar files contain only the doc directory, not the complete distribution,
-and are also available in .bz2 as well as .gz forms.
+and are also available in .bz2 and .xz forms.
 
 
-1.7 Limitations
+1.6 Limitations
 ---------------
 
   * Exim is designed for use as an Internet MTA, and therefore handles
@@ -895,17 +895,17 @@ and are also available in .bz2 as well as .gz forms.
     straightforward interfaces to a number of common scanners are provided.
 
 
-1.8 Run time configuration
---------------------------
+1.7 Runtime configuration
+-------------------------
 
-Exim's run time configuration is held in a single text file that is divided
-into a number of sections. The entries in this file consist of keywords and
-values, in the style of Smail 3 configuration files. A default configuration
-file which is suitable for simple online installations is provided in the
-distribution, and is described in chapter 7 below.
+Exim's runtime configuration is held in a single text file that is divided into
+a number of sections. The entries in this file consist of keywords and values,
+in the style of Smail 3 configuration files. A default configuration file which
+is suitable for simple online installations is provided in the distribution,
+and is described in chapter 7 below.
 
 
-1.9 Calling interface
+1.8 Calling interface
 ---------------------
 
 Like many MTAs, Exim has adopted the Sendmail command line interface so that it
@@ -913,24 +913,24 @@ can be a straight replacement for /usr/lib/sendmail or /usr/sbin/sendmail when
 sending mail, but you do not need to know anything about Sendmail in order to
 run Exim. For actions other than sending messages, Sendmail-compatible options
 also exist, but those that produce output (for example, -bp, which lists the
-messages on the queue) do so in Exim's own format. There are also some
+messages in the queue) do so in Exim's own format. There are also some
 additional options that are compatible with Smail 3, and some further options
 that are new to Exim. Chapter 5 documents all Exim's command line options. This
 information is automatically made into the man page that forms part of the Exim
 distribution.
 
-Control of messages on the queue can be done via certain privileged command
+Control of messages in the queue can be done via certain privileged command
 line options. There is also an optional monitor program called eximon, which
 displays current information in an X window, and which contains a menu
 interface to Exim's command line administration options.
 
 
-1.10 Terminology
-----------------
+1.9 Terminology
+---------------
 
 The body of a message is the actual data that the sender wants to transmit. It
-is the last part of a message, and is separated from the header (see below) by
-blank line.
+is the last part of a message and is separated from the header (see below) by a
+blank line.
 
 When a message cannot be delivered, it is normally returned to the sender in a
 delivery failure message or a "non-delivery report" (NDR). The term bounce is
@@ -966,9 +966,9 @@ number of lines, each of which has a name such as From:, To:, Subject:, etc.
 Long header lines can be split over several text lines by indenting the
 continuations. The header is separated from the body by a blank line.
 
-The term local part, which is taken from RFC 2822, is used to refer to that
-part of an email address that precedes the @ sign. The part that follows the @
-sign is called the domain or mail domain.
+The term local part, which is taken from RFC 2822, is used to refer to the part
+of an email address that precedes the @ sign. The part that follows the @ sign
+is called the domain or mail domain.
 
 The terms local delivery and remote delivery are used to distinguish delivery
 to a file or a pipe on the local host from delivery by SMTP over TCP/IP to
@@ -978,18 +978,18 @@ running on are remote.
 Return path is another name that is used for the sender address in a message's
 envelope.
 
-The term queue is used to refer to the set of messages awaiting delivery,
+The term queue is used to refer to the set of messages awaiting delivery
 because this term is in widespread use in the context of MTAs. However, in
-Exim's case the reality is more like a pool than a queue, because there is
+Exim's case, the reality is more like a pool than a queue, because there is
 normally no ordering of waiting messages.
 
 The term queue runner is used to describe a process that scans the queue and
 attempts to deliver those messages whose retry times have come. This term is
-used by other MTAs, and also relates to the command runq, but in Exim the
+used by other MTAs and also relates to the command runq, but in Exim the
 waiting messages are normally processed in an unpredictable order.
 
 The term spool directory is used for a directory in which Exim keeps the
-messages on its queue - that is, those that it is in the process of delivering.
+messages in its queue - that is, those that it is in the process of delivering.
 This should not be confused with the directory in which local mailboxes are
 stored, which is called a "spool directory" by some people. In the Exim
 documentation, "spool" is always used in the first sense.
@@ -1021,9 +1021,9 @@ A number of pieces of external code are included in the Exim distribution.
         Free Software Foundation; either version 2 of the License, or (at your
         option) any later version. This code implements Dan Bernstein's
         Constant DataBase (cdb) spec. Information, the spec and sample code for
-        cdb can be obtained from http://www.pobox.com/~djb/cdb.html. This
-        implementation borrows some code from Dan Bernstein's implementation
-        (which has no license restrictions applied to it).
+        cdb can be obtained from https://cr.yp.to/cdb.html. This implementation
+        borrows some code from Dan Bernstein's implementation (which has no
+        license restrictions applied to it).
 
   * Client support for Microsoft's Secure Password Authentication is provided
     by code contributed by Marc Prud'hommeaux. Server support was contributed
@@ -1065,7 +1065,7 @@ A number of pieces of external code are included in the Exim distribution.
             acknowledgment:
 
             "This product includes software developed by Computing Services at
-            Carnegie Mellon University (http://www.cmu.edu/computing/."
+            Carnegie Mellon University (https://www.cmu.edu/computing/."
 
             CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
             THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -1110,7 +1110,7 @@ A number of pieces of external code are included in the Exim distribution.
     the distributed source code.
 
   * Many people have contributed code fragments, some large, some small, that
-    were not covered by any specific licence requirements. It is assumed that
+    were not covered by any specific license requirements. It is assumed that
     the contributors are happy to see their code incorporated into Exim under
     the GPL.
 
@@ -1135,9 +1135,9 @@ has been down, and it also maintains per-host retry information.
 ------------------
 
 Policy controls are now an important feature of MTAs that are connected to the
-Internet. Perhaps their most important job is to stop MTAs being abused as
+Internet. Perhaps their most important job is to stop MTAs from being abused as
 "open relays" by misguided individuals who send out vast amounts of unsolicited
-junk, and want to disguise its source. Exim provides flexible facilities for
+junk and want to disguise its source. Exim provides flexible facilities for
 specifying policy controls on incoming mail:
 
   * Exim 4 (unlike previous versions of Exim) implements policy controls on
@@ -1200,7 +1200,7 @@ long. It is divided into three parts, separated by hyphens, for example
 encoding numbers in base 62. However, in the Darwin operating system (Mac OS X)
 and when Exim is compiled to run under Cygwin, base 36 (avoiding the use of
 lower case letters) is used instead, because the message id is used to
-construct file names, and the names of files in those systems are not always
+construct filenames, and the names of files in those systems are not always
 case-sensitive.
 
 The detail of the contents of the message id have changed as Exim has evolved.
@@ -1251,8 +1251,8 @@ are several possibilities:
   * If the process runs Exim with the -bS option, the message is also read
     non-interactively, but in this case the recipients are listed at the start
     of the message in a series of SMTP RCPT commands, terminated by a DATA
-    command. This is so-called "batch SMTP" format, but it isn't really SMTP.
-    The SMTP commands are just another way of passing envelope addresses in a
+    command. This is called "batch SMTP" format, but it isn't really SMTP. The
+    SMTP commands are just another way of passing envelope addresses in a
     non-interactive submission.
 
   * If the process runs Exim with the -bs option, the message is read
@@ -1271,7 +1271,7 @@ constructed from the login name of the user that called Exim and a default
 qualification domain (which can be set by the qualify_domain configuration
 option). For local or batch SMTP, a sender address that is passed using the
 SMTP MAIL command is ignored. However, the system administrator may allow
-certain users ("trusted users") to specify a different sender address
+certain users ("trusted users") to specify a different sender addresses
 unconditionally, or all users to specify certain forms of different sender
 address. The -f option or the SMTP MAIL command is used to specify these
 different addresses. See section 5.2 for details of trusted users, and the 
@@ -1279,10 +1279,10 @@ untrusted_set_sender option for a way of allowing untrusted users to change
 sender addresses.
 
 Messages received by either of the non-interactive mechanisms are subject to
-checking by the non-SMTP ACL, if one is defined. Messages received using SMTP
-(either over TCP/IP, or interacting with a local process) can be checked by a
+checking by the non-SMTP ACL if one is defined. Messages received using SMTP
+(either over TCP/IP or interacting with a local process) can be checked by a
 number of ACLs that operate at different times during the SMTP session. Either
-individual recipients, or the entire message, can be rejected if local policy
+individual recipients or the entire message can be rejected if local policy
 requirements are not met. The local_scan() function (see chapter 45) is run for
 all incoming messages.
 
@@ -1303,7 +1303,7 @@ the header lines, and the second contains the body of the message. The names of
 the two spool files consist of the message id, followed by "-H" for the file
 containing the envelope and header, and "-D" for the data file.
 
-By default all these message files are held in a single directory called input
+By default, all these message files are held in a single directory called input
 inside the general Exim spool directory. Some operating systems do not perform
 very well if the number of files in a directory gets large; to improve
 performance in such cases, the split_spool_directory option can be used. This
@@ -1337,7 +1337,7 @@ chapters 15 and 24).
 A message remains in the spool directory until it is completely delivered to
 its recipients or to an error address, or until it is deleted by an
 administrator or by the user who originally created it. In cases when delivery
-cannot proceed - for example, when a message can neither be delivered to its
+cannot proceed - for example when a message can neither be delivered to its
 recipients nor returned to its sender, the message is marked "frozen" on the
 spool, and no more deliveries are attempted.
 
@@ -1347,13 +1347,13 @@ administrator can force a delivery error, causing a bounce message to be sent.
 
 There are options called ignore_bounce_errors_after and timeout_frozen_after,
 which discard frozen messages after a certain time. The first applies only to
-frozen bounces, the second to any frozen messages.
+frozen bounces, the second to all frozen messages.
 
 While Exim is working on a message, it writes information about each delivery
 attempt to its main log file. This includes successful, unsuccessful, and
 delayed deliveries for each recipient (see chapter 52). The log lines are also
 written to a separate message log file for each message. These logs are solely
-for the benefit of the administrator, and are normally deleted along with the
+for the benefit of the administrator and are normally deleted along with the
 spool files when processing of a message is complete. The use of individual
 message logs can be disabled by setting no_message_logs; this might give an
 improvement in performance on very busy systems.
@@ -1367,11 +1367,11 @@ updated to indicate which these are, and the journal file is then deleted.
 Updating the spool file is done by writing a new file and renaming it, to
 minimize the possibility of data loss.
 
-Should the system or the program crash after a successful delivery but before
-the spool file has been updated, the journal is left lying around. The next
-time Exim attempts to deliver the message, it reads the journal file and
-updates the spool file before proceeding. This minimizes the chances of double
-deliveries caused by crashes.
+Should the system or Exim crash after a successful delivery but before the
+spool file has been updated, the journal is left lying around. The next time
+Exim attempts to deliver the message, it reads the journal file and updates the
+spool file before proceeding. This minimizes the chances of double deliveries
+caused by crashes.
 
 
 3.8 Processing an address for delivery
@@ -1380,10 +1380,10 @@ deliveries caused by crashes.
 The main delivery processing elements of Exim are called routers and transports
 , and collectively these are known as drivers. Code for a number of them is
 provided in the source distribution, and compile-time options specify which
-ones are included in the binary. Run time options specify which ones are
+ones are included in the binary. Runtime options specify which ones are
 actually used for delivering messages.
 
-Each driver that is specified in the run time configuration is an instance of
+Each driver that is specified in the runtime configuration is an instance of
 that particular driver type. Multiple instances are allowed; for example, you
 can set up several different smtp transports, each with different option values
 that might specify different ports or different timeouts. Each instance has its
@@ -1416,14 +1416,14 @@ routers in many different ways, and there may be any number of routers in a
 configuration.
 
 The first router that is specified in a configuration is often one that handles
-addresses in domains that are not recognized specially by the local host. These
-are typically addresses for arbitrary domains on the Internet. A precondition
-is set up which looks for the special domains known to the host (for example,
-its own domain name), and the router is run for addresses that do not match.
-Typically, this is a router that looks up domains in the DNS in order to find
-the hosts to which this address routes. If it succeeds, the address is assigned
-to a suitable SMTP transport; if it does not succeed, the router is configured
-to fail the address.
+addresses in domains that are not recognized specifically by the local host.
+Typically these are addresses for arbitrary domains on the Internet. A
+precondition is set up which looks for the special domains known to the host
+(for example, its own domain name), and the router is run for addresses that do
+not match. Typically, this is a router that looks up domains in the DNS in
+order to find the hosts to which this address routes. If it succeeds, the
+address is assigned to a suitable SMTP transport; if it does not succeed, the
+router is configured to fail the address.
 
 The second router is reached only when the domain is recognized as one that
 "belongs" to the local host. This router does redirection - also known as
@@ -1453,7 +1453,7 @@ When an address is being verified, the routers are run in "verify mode". This
 does not affect the way the routers work, but it is a state that can be
 detected. By this means, a router can be skipped or made to behave differently
 when verifying. A common example is a configuration in which the first router
-sends all messages to a message-scanning program, unless they have been
+sends all messages to a message-scanning program unless they have been
 previously scanned. Thus, the first router accepts all addresses without any
 checking, making it useless for verifying. Normally, the no_verify option would
 be set for such a router, causing it to be skipped in verify mode.
@@ -1469,12 +1469,12 @@ router is run. What happens next depends on the outcome, which is one of the
 following:
 
   * accept: The router accepts the address, and either assigns it to a
-    transport, or generates one or more "child" addresses. Processing the
-    original address ceases, unless the unseen option is set on the router.
-    This option can be used to set up multiple deliveries with different
-    routing (for example, for keeping archive copies of messages). When unseen
-    is set, the address is passed to the next router. Normally, however, an 
-    accept return marks the end of routing.
+    transport or generates one or more "child" addresses. Processing the
+    original address ceases unless the unseen option is set on the router. This
+    option can be used to set up multiple deliveries with different routing
+    (for example, for keeping archive copies of messages). When unseen is set,
+    the address is passed to the next router. Normally, however, an accept
+    return marks the end of routing.
 
     Any child addresses generated by the router are processed independently,
     starting with the first router by default. It is possible to change this by
@@ -1483,7 +1483,7 @@ following:
     redirect_router may be anywhere in the router configuration.
 
   * pass: The router recognizes the address, but cannot handle it itself. It
-    requests that the address be passed to another router. By default the
+    requests that the address be passed to another router. By default, the
     address is passed to the next router, but this can be changed by setting
     the pass_router option. However, (unlike redirect_router) the named router
     must be below the current router (to avoid loops).
@@ -1523,8 +1523,8 @@ for this purpose.
 ------------------------
 
 Once routing is complete, Exim scans the addresses that are assigned to local
-and remote transports, and discards any duplicates that it finds. During this
-check, local parts are treated as case-sensitive. This happens only when
+and remote transports and discards any duplicates that it finds. During this
+check, local parts are treated case-sensitively. This happens only when
 actually delivering a message; when testing routers with -bt, all the routed
 addresses are shown.
 
@@ -1629,7 +1629,7 @@ When a message is to be delivered, the sequence of events is as follows:
     condition first_delivery can be used to detect the first run of the system
     filter.
 
-  * Each recipient address is offered to each configured router in turn,
+  * Each recipient address is offered to each configured router, in turn,
     subject to its preconditions, until one is able to handle it. If no router
     can handle the address, that is, if they all decline, the address is
     failed. Because routers can be targeted at particular domains, several
@@ -1700,9 +1700,9 @@ When a message is to be delivered, the sequence of events is as follows:
 Exim's mechanism for retrying messages that fail to get delivered at the first
 attempt is the queue runner process. You must either run an Exim daemon that
 uses the -q option with a time interval to start queue runners at regular
-intervals, or use some other means (such as cron) to start them. If you do not
+intervals or use some other means (such as cron) to start them. If you do not
 arrange for queue runners to be run, messages that fail temporarily at the
-first attempt will remain on your queue for ever. A queue runner process works
+first attempt will remain in your queue forever. A queue runner process works
 its way through the queue, one message at a time, trying each delivery that has
 passed its retry time. You can run several queue runners at once.
 
@@ -1764,7 +1764,7 @@ failures of the generated addresses. For a mailing list expansion (see section
 ----------------------------------------
 
 If a bounce message (either locally generated or received from a remote host)
-itself suffers a permanent delivery failure, the message is left on the queue,
+itself suffers a permanent delivery failure, the message is left in the queue,
 but it is frozen, awaiting the attention of an administrator. There are options
 that can be used to make Exim discard such failed messages, or to keep them for
 only a short time (see timeout_frozen_after and ignore_bounce_errors_after).
@@ -1780,7 +1780,7 @@ only a short time (see timeout_frozen_after and ignore_bounce_errors_after).
 
 Exim is distributed as a gzipped or bzipped tar file which, when unpacked,
 creates a directory with the name of the current release (for example,
-exim-4.89) into which the following files are placed:
+exim-4.92) into which the following files are placed:
 
     ACKNOWLEDGMENTS contains some acknowledgments
     CHANGES         contains a reference to where changes are documented
@@ -1800,9 +1800,9 @@ subdirectories are created:
     src          remaining source files
     util         independent utilities
 
-The main utility programs are contained in the src directory, and are built
-with the Exim binary. The util directory contains a few optional scripts that
-may be useful to some sites.
+The main utility programs are contained in the src directory and are built with
+the Exim binary. The util directory contains a few optional scripts that may be
+useful to some sites.
 
 
 4.2 Multiple machine architectures and operating systems
@@ -1815,7 +1815,7 @@ build directory is created for each architecture and operating system. Symbolic
 links to the sources are installed in this directory, which is where the actual
 building takes place. In most cases, Exim can discover the machine architecture
 and operating system for itself, but the defaults can be overridden if
-necessary.
+necessary. A C99-capable compiler will be required for the build.
 
 
 4.3 PCRE library
@@ -1823,14 +1823,14 @@ necessary.
 
 Exim no longer has an embedded PCRE library as the vast majority of modern
 systems include PCRE as a system library, although you may need to install the
-PCRE or PCRE development package for your operating system. If your system has
-a normal PCRE installation the Exim build process will need no further
-configuration. If the library or the headers are in an unusual location you
-will need to either set the PCRE_LIBS and INCLUDE directives appropriately, or
-set PCRE_CONFIG=yes to use the installed pcre-config command. If your operating
-system has no PCRE support then you will need to obtain and build the current
-PCRE from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/. More
-information on PCRE is available at http://www.pcre.org/.
+PCRE package or the PCRE development package for your operating system. If your
+system has a normal PCRE installation the Exim build process will need no
+further configuration. If the library or the headers are in an unusual location
+you will need to either set the PCRE_LIBS and INCLUDE directives appropriately,
+or set PCRE_CONFIG=yes to use the installed pcre-config command. If your
+operating system has no PCRE support then you will need to obtain and build the
+current PCRE from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/. More
+information on PCRE is available at https://www.pcre.org/.
 
 
 4.4 DBM libraries
@@ -1863,8 +1863,8 @@ possibilities:
 
  2. The GNU library, gdbm, operates on a single file. If used via its ndbm
     compatibility interface it makes two different hard links to it with names
-    dbmfile.dir and dbmfile.pag, but if used via its native interface, the file
-    name is used unmodified.
+    dbmfile.dir and dbmfile.pag, but if used via its native interface, the
+    filename is used unmodified.
 
  3. The Berkeley DB package, if called via its ndbm compatibility interface,
     operates on a single file called dbmfile.db, but otherwise looks to the
@@ -1876,13 +1876,18 @@ possibilities:
 
  5. To complicate things further, there are several very different versions of
     the Berkeley DB package. Version 1.85 was stable for a very long time,
-    releases 2.x and 3.x were current for a while, but the latest versions are
-    now numbered 4.x. Maintenance of some of the earlier releases has ceased.
-    All versions of Berkeley DB can be obtained from http://www.sleepycat.com/.
-
- 6. Yet another DBM library, called tdb, is available from http://
-    download.sourceforge.net/tdb. It has its own interface, and also operates
-    on a single file.
+    releases 2.x and 3.x were current for a while, but the latest versions when
+    Exim last revamped support were numbered 4.x. Maintenance of some of the
+    earlier releases has ceased. All versions of Berkeley DB could be obtained
+    from http://www.sleepycat.com/, which is now a redirect to their new
+    owner's page with far newer versions listed. It is probably wise to plan to
+    move your storage configurations away from Berkeley DB format, as today
+    there are smaller and simpler alternatives more suited to Exim's usage
+    model.
+
+ 6. Yet another DBM library, called tdb, is available from https://
+    sourceforge.net/projects/tdb/files/. It has its own interface, and also
+    operates on a single file.
 
 Exim and its utilities can be compiled to use any of these interfaces. In order
 to use any version of the Berkeley DB package in native mode, you must set
@@ -1933,17 +1938,17 @@ first time, the simplest thing to do is to copy src/EDITME to Local/Makefile,
 then read it and edit it appropriately.
 
 There are three settings that you must supply, because Exim will not build
-without them. They are the location of the run time configuration file
+without them. They are the location of the runtime configuration file
 (CONFIGURE_FILE), the directory in which Exim binaries will be installed
 (BIN_DIRECTORY), and the identity of the Exim user (EXIM_USER and maybe
 EXIM_GROUP as well). The value of CONFIGURE_FILE can in fact be a
-colon-separated list of file names; Exim uses the first of them that exists.
+colon-separated list of filenames; Exim uses the first of them that exists.
 
 There are a few other parameters that can be specified either at build time or
-at run time, to enable the same binary to be used on a number of different
+at runtime, to enable the same binary to be used on a number of different
 machines. However, if the locations of Exim's spool directory and log file
 directory (if not within the spool directory) are fixed, it is recommended that
-you specify them in Local/Makefile instead of at run time, so that errors
+you specify them in Local/Makefile instead of at runtime, so that errors
 detected early in Exim's execution (such as a malformed configuration file) can
 be logged.
 
@@ -1965,8 +1970,8 @@ empty, but it must exist.
 This is all the configuration that is needed in straightforward cases for known
 operating systems. However, the building process is set up so that it is easy
 to override options that are set by default or by operating-system-specific
-configuration files, for example to change the name of the C compiler, which
-defaults to gcc. See section 4.13 below for details of how to do this.
+configuration files, for example, to change the C compiler, which defaults to 
+gcc. See section 4.13 below for details of how to do this.
 
 
 4.6 Support for iconv()
@@ -1981,7 +1986,7 @@ mechanism, it decodes them, and translates them into a specified character set
 operating system supports the iconv() function.
 
 However, some of the operating systems that supply iconv() do not support very
-many conversions. The GNU libiconv library (available from http://www.gnu.org/
+many conversions. The GNU libiconv library (available from https://www.gnu.org/
 software/libiconv/) can be installed on such systems to remedy this deficiency,
 as well as on systems that do not supply iconv() at all. After installing 
 libiconv, you should add
@@ -2231,7 +2236,7 @@ need to be installed before compiling Exim. However, there are some optional
 lookup types (such as cdb) for which the code is entirely contained within
 Exim, and no external include files or libraries are required. When a lookup
 type is not included in the binary, attempts to configure Exim to use it cause
-run time configuration errors.
+runtime configuration errors.
 
 Many systems now use a tool called pkg-config to encapsulate information about
 how to compile against a library; Exim has some initial support for being able
@@ -2321,8 +2326,8 @@ As with Exim itself, the final three files need not exist, and in this case the
 OS/eximon.conf-<ostype> file is also optional. The default values in OS/
 eximon.conf-Default can be overridden dynamically by setting environment
 variables of the same name, preceded by EXIMON_. For example, setting
-EXIMON_LOG_DEPTH in the environment overrides the value of LOG_DEPTH at run
-time.
+EXIMON_LOG_DEPTH in the environment overrides the value of LOG_DEPTH at
+runtime.
 
 
 4.16 Installing Exim binaries and scripts
@@ -2339,12 +2344,12 @@ situations (for example, if a host is doing no local deliveries) it may be
 possible to run Exim without making the binary setuid root (see chapter 55 for
 details).
 
-Exim's run time configuration file is named by the CONFIGURE_FILE setting in
+Exim's runtime configuration file is named by the CONFIGURE_FILE setting in
 Local/Makefile. If this names a single file, and the file does not exist, the
 default configuration file src/configure.default is copied there by the
-installation script. If a run time configuration file already exists, it is
-left alone. If CONFIGURE_FILE is a colon-separated list, naming several
-alternative files, no default is installed.
+installation script. If a runtime configuration file already exists, it is left
+alone. If CONFIGURE_FILE is a colon-separated list, naming several alternative
+files, no default is installed.
 
 One change is made to the default configuration file when it is installed: the
 default configuration contains a router that references a system aliases file.
@@ -2385,7 +2390,7 @@ when you have set INFO_DIRECTORY, as described in section 4.17 below.
 For the utility programs, old versions are renamed by adding the suffix .O to
 their names. The Exim binary itself, however, is handled differently. It is
 installed under a name that includes the version number and the compile number,
-for example exim-4.89-1. The script then arranges for a symbolic link called
+for example, exim-4.92-1. The script then arranges for a symbolic link called
 exim to point to the binary. If you are updating a previous version of Exim,
 the script takes care to ensure that the name exim is never absent from the
 directory (as seen by other processes).
@@ -2426,8 +2431,8 @@ make INSTALL_ARG='-no_symlink exim' install
 
 Not all systems use the GNU info system for documentation, and for this reason,
 the Texinfo source of Exim's documentation is not included in the main
-distribution. Instead it is available separately from the ftp site (see section
-1.6).
+distribution. Instead it is available separately from the FTP site (see section
+1.5).
 
 If you have defined INFO_DIRECTORY in Local/Makefile and the Texinfo source of
 the documentation is found in the source tree, running "make install"
@@ -2446,7 +2451,7 @@ necessary.
 4.19 Testing
 ------------
 
-Having installed Exim, you can check that the run time configuration file is
+Having installed Exim, you can check that the runtime configuration file is
 syntactically valid by running the following command, which assumes that the
 Exim binary directory is within your PATH environment variable:
 
@@ -2513,7 +2518,7 @@ can be used to check out policy controls on incoming SMTP mail.
 
 Testing a new version on a system that is already running Exim can most easily
 be done by building a binary with a different CONFIGURE_FILE setting. From
-within the run time configuration, all other file and directory names that Exim
+within the runtime configuration, all other file and directory names that Exim
 uses can be altered, in order to keep it entirely clear of the production
 version.
 
@@ -2773,9 +2778,9 @@ brief message about itself and exits.
     data. A line history is supported.
 
     Long expansion expressions can be split over several lines by using
-    backslash continuations. As in Exim's run time configuration, white space
-    at the start of continuation lines is ignored. Each argument or data line
-    is passed through the string expansion mechanism, and the result is output.
+    backslash continuations. As in Exim's runtime configuration, white space at
+    the start of continuation lines is ignored. Each argument or data line is
+    passed through the string expansion mechanism, and the result is output.
     Variable values from the configuration file (for example, $qualify_domain)
     are available, but no message-specific values (such as $message_exim_id)
     are set, because no message is being processed (but see -bem and -Mset).
@@ -2785,6 +2790,10 @@ brief message about itself and exits.
     trying the same lookup again. Otherwise, because each Exim process caches
     the results of lookups, you will just get the same result as before.
 
+    Macro processing is done on lines before string-expansion: new macros can
+    be defined and macros will be expanded. Because macros in the config file
+    are often used for secrets, those are only available to admin users.
+
 -bem <filename>
 
     This option operates like -be except that it must be followed by the name
@@ -3051,7 +3060,7 @@ brief message about itself and exits.
     If config is given as an argument, the config is output, as it was parsed,
     any include file resolved, any comment removed.
 
-    If config_file is given as an argument, the name of the run time
+    If config_file is given as an argument, the name of the runtime
     configuration file is output. (configure_file works too, for backward
     compatibility.) If a list of configuration files was supplied, the value
     that is output here is the name of the file that was actually used.
@@ -3091,7 +3100,8 @@ brief message about itself and exits.
     If invoked by an admin user, then macro, macro_list and macros are
     available, similarly to the drivers. Because macros are sometimes used for
     storing passwords, this option is restricted. The output format is one item
-    per line.
+    per line. For the "-bP macro <name>" form, if no such macro is found the
+    exit status will be nonzero.
 
 -bp
 
@@ -3101,13 +3111,13 @@ brief message about itself and exits.
     an admin user. However, the queue_list_requires_admin option can be set
     false to allow any user to see the queue.
 
-    Each message on the queue is displayed as in the following example:
+    Each message in the queue is displayed as in the following example:
 
     25m  2.9K 0t5C6f-0000c8-00 <alice@wonderland.fict.example>
               red.king@looking-glass.fict.example
               <other addresses>
 
-    The first line contains the length of time the message has been on the
+    The first line contains the length of time the message has been in the
     queue (in this case 25 minutes), the size of the message (2.9K), the unique
     local identifier for the message, and the message sender, as contained in
     the envelope. For bounce messages, the sender address is empty, and appears
@@ -3134,7 +3144,7 @@ brief message about itself and exits.
 
 -bpc
 
-    This option counts the number of messages on the queue, and writes the
+    This option counts the number of messages in the queue, and writes the
     total to the standard output. It is restricted to admin users, unless 
     queue_list_requires_admin is set false.
 
@@ -3142,7 +3152,7 @@ brief message about itself and exits.
 
     This option operates like -bp, but the output is not sorted into
     chronological order of message arrival. This can speed it up when there are
-    lots of messages on the queue, and is particularly useful if the output is
+    lots of messages in the queue, and is particularly useful if the output is
     going to be post-processed in a way that doesn't need the sorting.
 
 -bpra
@@ -3290,7 +3300,7 @@ brief message about itself and exits.
     number, and compilation date of the exim binary to the standard output. It
     also lists the DBM library that is being used, the optional modules (such
     as specific lookup types), the drivers that are included in the binary, and
-    the name of the run time configuration file that is in use.
+    the name of the runtime configuration file that is in use.
 
     As part of its operation, -bV causes Exim to read and syntax check its
     configuration file. However, this is a static check only. It cannot check
@@ -3369,10 +3379,10 @@ brief message about itself and exits.
 
 -C <filelist>
 
-    This option causes Exim to find the run time configuration file from the
+    This option causes Exim to find the runtime configuration file from the
     given list instead of from the list specified by the CONFIGURE_FILE
-    compile-time setting. Usually, the list will consist of just a single file
-    name, but it can be a colon-separated list of names. In this case, the
+    compile-time setting. Usually, the list will consist of just a single
+    filename, but it can be a colon-separated list of names. In this case, the
     first file that exists is used. Failure to open an existing file stops Exim
     from proceeding any further along the list, and an error is generated.
 
@@ -3392,15 +3402,15 @@ brief message about itself and exits.
     running as the Exim user, so when it re-executes to regain privilege for
     the delivery, the use of -C causes privilege to be lost. However, root can
     test reception and delivery using two separate commands (one to put a
-    message on the queue, using -odq, and another to do the delivery, using -M
+    message in the queue, using -odq, and another to do the delivery, using -M
     ).
 
     If ALT_CONFIG_PREFIX is defined in Local/Makefile, it specifies a prefix
     string with which any file named in a -C command line option must start. In
-    addition, the file name must not contain the sequence "/../". However, if
+    addition, the filename must not contain the sequence "/../". However, if
     the value of the -C option is identical to the value of CONFIGURE_FILE in
     Local/Makefile, Exim ignores -C and proceeds as usual. There is no default
-    setting for ALT_CONFIG_PREFIX; when it is unset, any file name can be used
+    setting for ALT_CONFIG_PREFIX; when it is unset, any filename can be used
     with -C.
 
     ALT_CONFIG_PREFIX can be used to confine alternative configuration files to
@@ -3482,7 +3492,8 @@ brief message about itself and exits.
     local_scan      can be used by local_scan() (see chapter 45)
     lookup          general lookup code and all lookups
     memory          memory handling
-    pid             add pid to debug output lines
+    noutf8          modifier: avoid UTF-8 line-drawing
+    pid             modifier: add pid to debug output lines
     process_info    setting info for the process log
     queue_run       queue runs
     receive         general message reception logic
@@ -3490,7 +3501,7 @@ brief message about itself and exits.
     retry           retry handling
     rewrite         address rewriting
     route           address routing
-    timestamp       add timestamp to debug output lines
+    timestamp       modifier: add timestamp to debug output lines
     tls             TLS logic
     transport       transports
     uid             changes of uid/gid and looking up uid/gid
@@ -3519,6 +3530,10 @@ brief message about itself and exits.
     start of all debug output lines. This can be useful when trying to track
     down delays in processing.
 
+    The "noutf8" selector disables the use of UTF-8 line-drawing characters to
+    group related information. When disabled. ascii-art is used instead. Using
+    the "+all" option does not set this modifier,
+
     If the debug_print option is set in any driver, it produces output whenever
     any debugging is selected, or if -v is used.
 
@@ -3681,11 +3696,17 @@ brief message about itself and exits.
     internally by Exim in conjunction with the -MC option. It signifies that
     the remote host supports the ESMTP DSN extension.
 
--MCG
+-MCG <queue name>
 
     This option is not intended for use by external callers. It is used
     internally by Exim in conjunction with the -MC option. It signifies that an
-    alternate queue is used, named by the following option.
+    alternate queue is used, named by the following argument.
+
+-MCK
+
+    This option is not intended for use by external callers. It is used
+    internally by Exim in conjunction with the -MC option. It signifies that a
+    remote host supports the ESMTP CHUNKING extension.
 
 -MCP
 
@@ -3715,9 +3736,17 @@ brief message about itself and exits.
     internally by Exim in conjunction with the -MC option, and passes on the
     fact that the host to which Exim is connected supports TLS encryption.
 
+-MCt <IP address> <port> <cipher>
+
+    This option is not intended for use by external callers. It is used
+    internally by Exim in conjunction with the -MC option, and passes on the
+    fact that the connection is being proxied by a parent process for handling
+    TLS encryption. The arguments give the local address and port being
+    proxied, and the TLS cipher.
+
 -Mc <message id> <message id> ...
 
-    This option requests Exim to run a delivery attempt on each message in
+    This option requests Exim to run a delivery attempt on each message, in
     turn, but unlike the -M option, it does check for retry hints, and respects
     any that are found. This option is not very useful to external callers. It
     is provided mainly for internal use by Exim when it needs to re-invoke
@@ -3778,7 +3807,7 @@ brief message about itself and exits.
     bounce messages are sent; each message is simply forgotten. However, if any
     of the messages are active, their status is not altered. This option can be
     used only by an admin user or by the user who originally caused the message
-    to be placed on the queue.
+    to be placed in the queue.
 
 -Mset <message id>
 
@@ -3858,7 +3887,7 @@ brief message about itself and exits.
 -oA <file name>
 
     This option is used by Sendmail in conjunction with -bi to specify an
-    alternative alias file name. Exim handles -bi differently; see the
+    alternative alias filename. Exim handles -bi differently; see the
     description above.
 
 -oB <n>
@@ -3901,7 +3930,7 @@ brief message about itself and exits.
     effect.
 
     If there is a temporary delivery error during foreground delivery, the
-    message is left on the queue for later delivery, and the original reception
+    message is left in the queue for later delivery, and the original reception
     process exits. See chapter 51 for a way of setting up a restricted
     configuration that never queues messages.
 
@@ -3915,7 +3944,7 @@ brief message about itself and exits.
     This option applies to all modes in which Exim accepts incoming messages,
     including the listening daemon. It specifies that the accepting process
     should not automatically start a delivery process for each message
-    received. Messages are placed on the queue, and remain there until a
+    received. Messages are placed in the queue, and remain there until a
     subsequent queue runner process encounters them. There are several
     configuration options (such as queue_only) that can be used to queue
     incoming messages under certain conditions. This option overrides all of
@@ -3931,7 +3960,7 @@ brief message about itself and exits.
     message, in the background by default, but in the foreground if -odi is
     also present. The recipient addresses are routed, and local deliveries are
     done in the normal way. However, if any SMTP deliveries are required, they
-    are not done at this time, so the message remains on the queue until a
+    are not done at this time, so the message remains in the queue until a
     subsequent queue runner process encounters it. Because routing was done,
     Exim knows which messages are waiting for which hosts, and so a number of
     messages for the same host can be sent in a single SMTP connection. The 
@@ -4060,7 +4089,8 @@ brief message about itself and exits.
     -bh, the protocol is forced to one of the standard SMTP protocol names (see
     the description of $received_protocol in section 11.9). For -bs, the
     protocol is always "local-" followed by one of those same names. For -bS
-    (batched SMTP) however, the protocol can be set by -oMr.
+    (batched SMTP) however, the protocol can be set by -oMr. Repeated use of
+    this option is not supported.
 
 -oMs <host name>
 
@@ -4119,7 +4149,7 @@ brief message about itself and exits.
     is also given. It controls which ports and interfaces the daemon uses.
     Details of the syntax, and how it interacts with configuration file
     options, are given in chapter 13. When -oX is used to start a daemon, no
-    pid file is written unless -oP is also present to specify a pid file name.
+    pid file is written unless -oP is also present to specify a pid filename.
 
 -pd
 
@@ -4144,7 +4174,8 @@ brief message about itself and exits.
     name and its colon can be omitted when only the protocol is to be set. Note
     the Exim already has two private options, -pd and -ps, that refer to
     embedded Perl. It is therefore impossible to set a protocol value of "d" or
-    "s" using this option (but that does not seem a real limitation).
+    "s" using this option (but that does not seem a real limitation). Repeated
+    use of this option is not supported.
 
 -q
 
@@ -4204,7 +4235,7 @@ brief message about itself and exits.
 
     If the i flag is present, the queue runner runs delivery processes only for
     those messages that haven't previously been tried. (i stands for "initial
-    delivery".) This can be helpful if you are putting messages on the queue
+    delivery".) This can be helpful if you are putting messages in the queue
     using -odq and want a queue runner just to process the new messages.
 
 -q[q][i]f...
@@ -4221,7 +4252,7 @@ brief message about itself and exits.
 -q[q][i][f[f]]l
 
     The l (the letter "ell") flag specifies that only local deliveries are to
-    be done. If a message requires any remote deliveries, it remains on the
+    be done. If a message requires any remote deliveries, it remains in the
     queue for later delivery.
 
 -q[q][i][f[f]][l][G<name>[/<time>]]]
@@ -4432,9 +4463,9 @@ brief message about itself and exits.
 
 
 ===============================================================================
-6. THE EXIM RUN TIME CONFIGURATION FILE
+6. THE EXIM RUNTIME CONFIGURATION FILE
 
-Exim uses a single run time configuration file that is read whenever an Exim
+Exim uses a single runtime configuration file that is read whenever an Exim
 binary is executed. Note that in normal operation, this happens frequently,
 because Exim is designed to operate in a distributed manner, without central
 control.
@@ -4449,29 +4480,29 @@ the string.
 The name of the configuration file is compiled into the binary for security
 reasons, and is specified by the CONFIGURE_FILE compilation option. In most
 configurations, this specifies a single file. However, it is permitted to give
-a colon-separated list of file names, in which case Exim uses the first
-existing file in the list.
+a colon-separated list of filenames, in which case Exim uses the first existing
+file in the list.
 
-The run time configuration file must be owned by root or by the user that is
+The runtime configuration file must be owned by root or by the user that is
 specified at compile time by the CONFIGURE_OWNER option (if set). The
 configuration file must not be world-writeable, or group-writeable unless its
 group is the root group or the one specified at compile time by the
 CONFIGURE_GROUP option.
 
 Warning: In a conventional configuration, where the Exim binary is setuid to
-root, anybody who is able to edit the run time configuration file has an easy
+root, anybody who is able to edit the runtime configuration file has an easy
 way to run commands as root. If you specify a user or group in the
 CONFIGURE_OWNER or CONFIGURE_GROUP options, then that user and/or any users who
 are members of that group will trivially be able to obtain root privileges.
 
-Up to Exim version 4.72, the run time configuration file was also permitted to
+Up to Exim version 4.72, the runtime configuration file was also permitted to
 be writeable by the Exim user and/or group. That has been changed in Exim 4.73
 since it offered a simple privilege escalation for any attacker who managed to
 compromise the Exim user account.
 
 A default configuration file, which will work correctly in simple situations,
 is provided in the file src/configure.default. If CONFIGURE_FILE defines just
-one file name, the installation process copies the default configuration to a
+one filename, the installation process copies the default configuration to a
 new file of that name if it did not previously exist. If CONFIGURE_FILE is a
 list, no default is automatically installed. Chapter 7 is a "walk-through"
 discussion of the default configuration.
@@ -4497,13 +4528,13 @@ configuration using -C right through message reception and delivery, even if
 the caller is root. The reception works, but by that time, Exim is running as
 the Exim user, so when it re-execs to regain privilege for the delivery, the
 use of -C causes privilege to be lost. However, root can test reception and
-delivery using two separate commands (one to put a message on the queue, using 
+delivery using two separate commands (one to put a message in the queue, using 
 -odq, and another to do the delivery, using -M).
 
 If ALT_CONFIG_PREFIX is defined in Local/Makefile, it specifies a prefix string
 with which any file named in a -C command line option must start. In addition,
-the file name must not contain the sequence "/../". There is no default setting
-for ALT_CONFIG_PREFIX; when it is unset, any file name can be used with -C.
+the filename must not contain the sequence "/../". There is no default setting
+for ALT_CONFIG_PREFIX; when it is unset, any filename can be used with -C.
 
 One-off changes to a configuration can be specified by the -D command line
 option, which defines and overrides values for macros used inside the
@@ -4524,10 +4555,10 @@ Acceptable values for the macros satisfy the regexp: "^[A-Za-z0-9_/.-]*$"
 Some sites may wish to use the same Exim binary on different machines that
 share a file system, but to use different configuration files on each machine.
 If CONFIGURE_FILE_USE_NODE is defined in Local/Makefile, Exim first looks for a
-file whose name is the configuration file name followed by a dot and the
+file whose name is the configuration filename followed by a dot and the
 machine's node name, as obtained from the uname() function. If this file does
-not exist, the standard name is tried. This processing occurs for each file
-name in the list given by CONFIGURE_FILE or -C.
+not exist, the standard name is tried. This processing occurs for each filename
+in the list given by CONFIGURE_FILE or -C.
 
 In some esoteric situations different versions of Exim may be run under
 different effective uids and the CONFIGURE_FILE_USE_EUID is defined to help
@@ -4602,18 +4633,17 @@ conditional facilities are described.
 6.3 File inclusions in the configuration file
 ---------------------------------------------
 
-You can include other files inside Exim's run time configuration file by using
+You can include other files inside Exim's runtime configuration file by using
 this syntax:
 
-.include <file name>
-.include_if_exists <file name>
+.include <filename>
+.include_if_exists <filename>
 
-on a line by itself. Double quotes round the file name are optional. If you use
+on a line by itself. Double quotes round the filename are optional. If you use
 the first form, a configuration error occurs if the file does not exist; the
-second form does nothing for non-existent files.
-
-The first form allows a relative name. It is resolved relative to the directory
-of the including file. For the second form an absolute file name is required.
+second form does nothing for non-existent files. The first form allows a
+relative name. It is resolved relative to the directory of the including file.
+For the second form an absolute filename is required.
 
 Includes may be nested to any depth, but remember that Exim reads its
 configuration file often, so it is a good idea to keep them to a minimum. If
@@ -4657,7 +4687,7 @@ ACL, or in the local_scan, retry, or rewrite sections of the configuration.
 
 Once a macro is defined, all subsequent lines in the file (and any included
 files) are scanned for the macro name; if there are several macros, the line is
-scanned for each in turn, in the order in which the macros are defined. The
+scanned for each, in turn, in the order in which the macros are defined. The
 replacement text is not re-scanned for the current macro, though it is scanned
 for subsequently defined macros. For this reason, a macro name may not contain
 the name of a previously defined macro as a substring. You could, for example,
@@ -4741,6 +4771,7 @@ The following classes of macros are defined:
  _DRIVER_ROUTER_*             router drivers
  _DRIVER_TRANSPORT_*          transport drivers
  _DRIVER_AUTHENTICATOR_*      authenticator drivers
+ _LOG_*                       log_selector values
  _OPT_MAIN_*                  main config options
  _OPT_ROUTERS_*               generic router options
  _OPT_TRANSPORTS_*            generic transport options
@@ -5128,12 +5159,31 @@ settings. However, note that there are many options that are not mentioned at
 all in the default configuration.
 
 
-7.1 Main configuration settings
+7.1 Macros
+----------
+
+All macros should be defined before any options.
+
+One macro is specified, but commented out, in the default configuration:
+
+# ROUTER_SMARTHOST=MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
+
+If all off-site mail is expected to be delivered to a "smarthost", then set the
+hostname here and uncomment the macro. This will affect which router is used
+later on. If this is left commented out, then Exim will perform direct-to-MX
+deliveries using a dnslookup router.
+
+In addition to macros defined here, Exim includes a number of built-in macros
+to enable configuration to be guarded by a binary built with support for a
+given feature. See section 6.9 for more details.
+
+
+7.2 Main configuration settings
 -------------------------------
 
-The main (global) configuration option settings must always come first in the
-file. The first thing you'll see in the file, after some initial comments, is
-the line
+The main (global) configuration option settings section must always come first
+in the file, after the macros. The first thing you'll see in the file, after
+some initial comments, is the line
 
 # primary_hostname =
 
@@ -5213,7 +5263,7 @@ Three more commented-out option settings follow:
 These are example settings that can be used when Exim is compiled with support
 for TLS (aka SSL) as described in section 4.7. The first one specifies the list
 of clients that are allowed to use TLS when connecting to this server; in this
-case the wildcard means all clients. The other options specify where Exim
+case, the wildcard means all clients. The other options specify where Exim
 should find its TLS certificate and private key, which together prove the
 server's identity to any clients that connect. More details are given in
 chapter 42.
@@ -5226,11 +5276,15 @@ Another two commented-out option settings follow:
 These options provide better support for roaming users who wish to use this
 server for message submission. They are not much use unless you have turned on
 TLS (as described in the previous paragraph) and authentication (about which
-more in section 7.7). The usual SMTP port 25 is often blocked on end-user
-networks, so RFC 4409 specifies that message submission should use port 587
-instead. However some software (notably Microsoft Outlook) cannot be configured
-to use port 587 correctly, so these settings also enable the non-standard
-"smtps" (aka "ssmtp") port 465 (see section 13.4).
+more in section 7.8). Mail submission from mail clients (MUAs) should be
+separate from inbound mail to your domain (MX delivery) for various good
+reasons (eg, ability to impose much saner TLS protocol and ciphersuite
+requirements without unintended consequences). RFC 6409 (previously 4409)
+specifies use of port 587 for SMTP Submission, which uses STARTTLS, so this is
+the "submission" port. RFC 8314 specifies use of port 465 as the "submissions"
+protocol, which should be used in preference to 587. You should also consider
+deploying SRV records to help clients find these ports. Older names for
+"submissions" are "smtps" and "ssmtp".
 
 Two more commented-out options settings follow:
 
@@ -5337,7 +5391,7 @@ ignore_bounce_errors_after = 2d
 timeout_frozen_after = 7d
 
 The first of these options specifies that failing bounce messages are to be
-discarded after 2 days on the queue. The second specifies that any frozen
+discarded after 2 days in the queue. The second specifies that any frozen
 message (whether a bounce message or not) is to be timed out (and discarded)
 after a week. In this configuration, the first setting ensures that no failing
 bounce message ever lasts a week.
@@ -5376,7 +5430,7 @@ runtime option and by the TIMEZONE_DEFAULT buildtime option.
 # add_environment = PATH=/usr/bin::/bin
 
 
-7.2 ACL configuration
+7.3 ACL configuration
 ---------------------
 
 In the default configuration, the ACL section follows the main configuration.
@@ -5453,10 +5507,10 @@ them because they have been encountered in practice. (Consider the common
 convention of local parts constructed as "
 first-initial.second-initial.family-name" when applied to someone like the
 author of Exim, who has no second initial.) However, a local part starting with
-a dot or containing "/../" can cause trouble if it is used as part of a file
-name (for example, for a mailing list). This is also true for local parts that
-contain slashes. A pipe symbol can also be troublesome if the local part is
-incorporated unthinkingly into a shell command line.
+a dot or containing "/../" can cause trouble if it is used as part of a
+filename (for example, for a mailing list). This is also true for local parts
+that contain slashes. A pipe symbol can also be troublesome if the local part
+is incorporated unthinkingly into a shell command line.
 
 The second rule above applies to all other domains, and is less strict. This
 allows your own users to send outgoing messages to sites that use slashes and
@@ -5509,7 +5563,7 @@ This statement accepts the address if the client host has authenticated itself.
 Submission mode is again specified, on the grounds that such messages are most
 likely to come from MUAs. The default configuration does not define any
 authenticators, though it does include some nearly complete commented-out
-examples described in 7.7. This means that no client can in fact authenticate
+examples described in 7.8. This means that no client can in fact authenticate
 until you complete the authenticator definitions.
 
 require message = relay not permitted
@@ -5580,7 +5634,7 @@ accept
 This final line in the DATA ACL accepts the message unconditionally.
 
 
-7.3 Router configuration
+7.4 Router configuration
 ------------------------
 
 The router configuration comes next in the default configuration, introduced by
@@ -5589,7 +5643,7 @@ the line
 begin routers
 
 Routers are the modules in Exim that make decisions about where to send
-messages. An address is passed to each router in turn, until it is either
+messages. An address is passed to each router, in turn, until it is either
 accepted, or failed. This means that the order in which you define the routers
 matters. Each router is fully described in its own chapter later in this
 manual. Here we give only brief overviews.
@@ -5604,15 +5658,32 @@ support domain literal addresses (those of the form user@[10.9.8.7]). If you
 uncomment this router, you also need to uncomment the setting of 
 allow_domain_literals in the main part of the configuration.
 
+Which router is used next depends upon whether or not the ROUTER_SMARTHOST
+macro has been defined, per
+
+.ifdef ROUTER_SMARTHOST
+smarthost:
+#...
+.else
 dnslookup:
-  driver = dnslookup
+#...
+.endif
+
+If ROUTER_SMARTHOST has been defined, either at the top of the file or on the
+command-line, then we route all non-local mail to that smarthost; otherwise,
+we'll perform DNS lookups for direct-to-MX lookup. Any mail which is to a local
+domain will skip these routers because of the domains option.
+
+smarthost:
+  driver = manualroute
   domains = ! +local_domains
-  transport = remote_smtp
-  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+  transport = smarthost_smtp
+  route_data = ROUTER_SMARTHOST
+  ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
   no_more
 
-The first uncommented router handles addresses that do not involve any local
-domains. This is specified by the line
+This router only handles mail which is not to any local domains; this is
+specified by the line
 
 domains = ! +local_domains
 
@@ -5623,6 +5694,28 @@ start of the configuration). The plus sign before local_domains indicates that
 it is referring to a named list. Addresses in other domains are passed on to
 the following routers.
 
+The name of the router driver is manualroute because we are manually specifying
+how mail should be routed onwards, instead of using DNS MX. While the name of
+this router instance is arbitrary, the driver option must be one of the driver
+modules that is in the Exim binary.
+
+With no pre-conditions other than domains, all mail for non-local domains will
+be handled by this router, and the no_more setting will ensure that no other
+routers will be used for messages matching the pre-conditions. See 3.12 for
+more on how the pre-conditions apply. For messages which are handled by this
+router, we provide a hostname to deliver to in route_data and the macro
+supplies the value; the address is then queued for the smarthost_smtp
+transport.
+
+dnslookup:
+  driver = dnslookup
+  domains = ! +local_domains
+  transport = remote_smtp
+  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+  no_more
+
+The domains option behaves as per smarthost, above.
+
 The name of the router driver is dnslookup, and is specified by the driver
 option. Do not be confused by the fact that the name of this router instance is
 the same as the name of the driver. The instance name is arbitrary, but the
@@ -5749,7 +5842,7 @@ routers, so the address is bounced. The commented suffix settings fulfil the
 same purpose as they do for the userforward router.
 
 
-7.4 Transport configuration
+7.5 Transport configuration
 ---------------------------
 
 Transports define mechanisms for actually delivering messages. They operate
@@ -5758,17 +5851,87 @@ not matter. The transports section of the configuration starts with
 
 begin transports
 
-One remote transport and four local transports are defined.
+Two remote transports and four local transports are defined.
 
 remote_smtp:
   driver = smtp
+  message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
+.ifdef _HAVE_DANE
+  dnssec_request_domains = *
+  hosts_try_dane = *
+.endif
+.ifdef _HAVE_PRDR
   hosts_try_prdr = *
+.endif
 
 This transport is used for delivering messages over SMTP connections. The list
-of remote hosts comes from the router. The hosts_try_prdr option enables an
-efficiency SMTP option. It is negotiated between client and server and not
-expected to cause problems but can be disabled if needed. All other options are
-defaulted.
+of remote hosts comes from the router. The message_size_limit usage is a hack
+to avoid sending on messages with over-long lines. The built-in macro
+_HAVE_DANE guards configuration to try to use DNSSEC for all queries and to use
+DANE for delivery; see section 42.15 for more details.
+
+The hosts_try_prdr option enables an efficiency SMTP option. It is negotiated
+between client and server and not expected to cause problems but can be
+disabled if needed. The built-in macro _HAVE_PRDR guards the use of the 
+hosts_try_prdr configuration option.
+
+The other remote transport is used when delivering to a specific smarthost with
+whom there must be some kind of existing relationship, instead of the usual
+federated system.
+
+smarthost_smtp:
+  driver = smtp
+  message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
+  multi_domain
+  #
+.ifdef _HAVE_TLS
+  # Comment out any of these which you have to, then file a Support
+  # request with your smarthost provider to get things fixed:
+  hosts_require_tls = *
+  tls_verify_hosts = *
+  # As long as tls_verify_hosts is enabled, this won't matter, but if you
+  # have to comment it out then this will at least log whether you succeed
+  # or not:
+  tls_try_verify_hosts = *
+  #
+  # The SNI name should match the name which we'll expect to verify;
+  # many mail systems don't use SNI and this doesn't matter, but if it does,
+  # we need to send a name which the remote site will recognize.
+  # This _should_ be the name which the smarthost operators specified as
+  # the hostname for sending your mail to.
+  tls_sni = ROUTER_SMARTHOST
+  #
+.ifdef _HAVE_OPENSSL
+  tls_require_ciphers = HIGH:!aNULL:@STRENGTH
+.endif
+.ifdef _HAVE_GNUTLS
+  tls_require_ciphers = SECURE192:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1
+.endif
+.endif
+.ifdef _HAVE_PRDR
+  hosts_try_prdr = *
+.endif
+
+After the same message_size_limit hack, we then specify that this Transport can
+handle messages to multiple domains in one run. The assumption here is that
+you're routing all non-local mail to the same place and that place is happy to
+take all messages from you as quickly as possible. All other options depend
+upon built-in macros; if Exim was built without TLS support then no other
+options are defined. If TLS is available, then we configure "stronger than
+default" TLS ciphersuites and versions using the tls_require_ciphers option,
+where the value to be used depends upon the library providing TLS. Beyond that,
+the options adopt the stance that you should have TLS support available from
+your smarthost on today's Internet, so we turn on requiring TLS for the mail to
+be delivered, and requiring that the certificate be valid, and match the
+expected hostname. The tls_sni option can be used by service providers to
+select an appropriate certificate to present to you and here we re-use the
+ROUTER_SMARTHOST macro, because that is unaffected by CNAMEs present in DNS.
+You want to specify the hostname which you'll expect to validate for, and that
+should not be subject to insecure tampering via DNS results.
+
+For the hosts_try_prdr option see the previous transport.
+
+All other options are defaulted.
 
 local_delivery:
   driver = appendfile
@@ -5816,7 +5979,7 @@ This transport is used for handling automatic replies generated by users'
 filter files.
 
 
-7.5 Default retry rule
+7.6 Default retry rule
 ----------------------
 
 The retry section of the configuration file contains rules which affect the way
@@ -5841,7 +6004,7 @@ if no retry rules are defined), Exim will not retry deliveries. This turns
 temporary errors into permanent errors.
 
 
-7.6 Rewriting configuration
+7.7 Rewriting configuration
 ---------------------------
 
 The rewriting section of the configuration, introduced by
@@ -5852,7 +6015,7 @@ contains rules for rewriting addresses in messages as they arrive. There are no
 rewriting rules in the default configuration file.
 
 
-7.7 Authenticators configuration
+7.8 Authenticators configuration
 --------------------------------
 
 The authenticators section of the configuration, introduced by
@@ -5890,7 +6053,7 @@ implements the details of the specific authentication mechanism, i.e. PLAIN or
 LOGIN. The server_advertise_condition setting controls when Exim offers
 authentication to clients; in the examples, this is only when TLS or SSL has
 been started, so to enable the authenticators you also need to add support for
-TLS as described in section 7.1.
+TLS as described in section 7.2.
 
 The server_condition setting defines how to verify that the username and
 password are correct. In the examples it just produces an error message. To
@@ -6065,11 +6228,12 @@ The following single-key lookup types are implemented:
     indexed files that are read frequently and never updated, except by total
     re-creation. As such, it is particularly suitable for large files
     containing aliases or other indexed data referenced by an MTA. Information
-    about cdb can be found in several places:
+    about cdb and tools for building the files can be found in several places:
 
-    http://www.pobox.com/~djb/cdb.html
-    ftp://ftp.corpit.ru/pub/tinycdb/
-    http://packages.debian.org/stable/utils/freecdb.html
+    https://cr.yp.to/cdb.html
+    http://www.corpit.ru/mjt/tinycdb.html
+    https://packages.debian.org/stable/utils/freecdb
+    https://github.com/philpennock/cdbtools (in Go)
 
     A cdb distribution is not needed in order to build Exim with cdb support,
     because the code for reading cdb files is included directly in Exim itself.
@@ -6233,6 +6397,9 @@ The following single-key lookup types are implemented:
     wildlsearch can not be turned into a DBM or cdb file, because those lookup
     types support only literal keys.
 
+  * If Exim is built with SPF support, manual lookups can be done (as opposed
+    to the standard ACL condition method. For details see section 57.4.
+
 
 9.4 Query-style lookup types
 ----------------------------
@@ -6275,7 +6442,7 @@ many of them are given in later sections.
   * redis: The format of the query is either a simple get or simple set, passed
     to a Redis database. See section 9.21.
 
-  * sqlite: The format of the query is a file name followed by an SQL statement
+  * sqlite: The format of the query is a filename followed by an SQL statement
     that is passed to an SQLite database. See section 9.26.
 
   * testdb: This is a lookup type that is used for testing Exim. It is not
@@ -7221,7 +7388,7 @@ affected.
 9.26 More about SQLite
 ----------------------
 
-SQLite is different to the other SQL lookups because a file name is required in
+SQLite is different to the other SQL lookups because a filename is required in
 addition to the SQL query. An SQLite database is a single file, and there is no
 daemon as in the other SQL databases. The interface to Exim requires the name
 of the file, as an absolute path, to be given at the start of the query. It is
@@ -7255,6 +7422,17 @@ Redis is a non-SQL database. Commands are simple get and set. Examples:
 ${lookup redis{set keyname ${quote_redis:objvalue plus}}}
 ${lookup redis{get keyname}}
 
+As of release 4.91, "lightweight" support for Redis Cluster is available.
+Requires redis_servers list to contain all the servers in the cluster, all of
+which must be reachable from the running exim instance. If the cluster has
+master/slave replication, the list must contain all the master and slave
+servers.
+
+When the Redis Cluster returns a "MOVED" response to a query, Exim does not
+immediately follow the redirection but treats the response as a DEFER, moving
+on to the next server in the redis_servers list until the correct server is
+reached.
+
 
 
 ===============================================================================
@@ -7341,10 +7519,10 @@ the connector as "or" after a positive item and as "and" after a negative item.
 10.3 File names in lists
 ------------------------
 
-If an item in a domain, host, address, or local part list is an absolute file
-name (beginning with a slash character), each line of the file is read and
+If an item in a domain, host, address, or local part list is an absolute
+filename (beginning with a slash character), each line of the file is read and
 processed as if it were an independent item in the list, except that further
-file names are not allowed, and no expansion of the data from the file takes
+filenames are not allowed, and no expansion of the data from the file takes
 place. Empty lines in the file are ignored, and the file may also contain
 comment lines:
 
@@ -7357,13 +7535,13 @@ comment lines:
 
     not#comment@x.y.z   # but this is a comment
 
-Putting a file name in a list has the same effect as inserting each line of the
+Putting a filename in a list has the same effect as inserting each line of the
 file as an item in the list (blank lines and comments excepted). However, there
 is one important difference: the file is read each time the list is processed,
 so if its contents vary over time, Exim's behaviour changes.
 
-If a file name is preceded by an exclamation mark, the sense of any match
-within the file is inverted. For example, if
+If a filename is preceded by an exclamation mark, the sense of any match within
+the file is inverted. For example, if
 
 hold_domains = !/etc/nohold-domains
 
@@ -7388,9 +7566,9 @@ This is not the case. The keys in an lsearch file are always fixed strings,
 just as for any other single-key lookup type.
 
 If you want to use a file to contain wild-card patterns that form part of a
-list, just give the file name on its own, without a search type, as described
-in the previous section. You could also use the wildlsearch or nwildlsearch,
-but there is no advantage in doing this.
+list, just give the filename on its own, without a search type, as described in
+the previous section. You could also use the wildlsearch or nwildlsearch, but
+there is no advantage in doing this.
 
 
 10.5 Named lists
@@ -7606,7 +7784,7 @@ following types of item may appear in domain lists:
 
   * If a pattern starts with the name of a single-key lookup type followed by a
     semicolon (for example, "dbm;" or "lsearch;"), the remainder of the pattern
-    must be a file name in a suitable format for the lookup type. For example,
+    must be a filename in a suitable format for the lookup type. For example,
     for "cdb;" it must be an absolute path:
 
     domains = cdb;/etc/mail/local_domains.cdb
@@ -8227,7 +8405,7 @@ Exim are used for this kind of control, Exim attempts to do this by default.
 The domain portion of an address is always lowercased before matching it to an
 address list. The local part is lowercased by default, and any string
 comparisons that take place are done caselessly. This means that the data in
-the address list itself, in files included as plain file names, and in any file
+the address list itself, in files included as plain filenames, and in any file
 that is looked up using the "@@" mechanism, can be in any case. However, the
 keys in files that are looked up by a search type other than lsearch (which
 works caselessly) must be in lower case, because these lookups are not
@@ -8267,7 +8445,7 @@ other available item types.
 ===============================================================================
 11. STRING EXPANSIONS
 
-Many strings in Exim's run time configuration are expanded before use. Some of
+Many strings in Exim's runtime configuration are expanded before use. Some of
 them are expanded every time they are used; others are expanded only once.
 
 When a string is being expanded it is copied verbatim from left to right except
@@ -8335,7 +8513,7 @@ using -be for reading files to which they do not have access.
 
 If you want to test expansions that include variables whose values are taken
 from a message, there are two other options that can be used. The -bem option
-is like -be except that it is followed by a file name. The file is read as a
+is like -be except that it is followed by a filename. The file is read as a
 message before doing the test expansions. For example:
 
 exim -bem /tmp/test.message '$h_subject:'
@@ -8417,6 +8595,26 @@ ${acl{<name>}{<arg>}...}
     is an empty string. If the ACL returns defer the result is a forced-fail.
     Otherwise the expansion fails.
 
+${authresults{<authserv-id>}}
+
+    This item returns a string suitable for insertion as an 
+    Authentication-Results" header line. The given <authserv-id> is included in
+    the result; typically this will be a domain name identifying the system
+    performing the authentications. Methods that might be present in the result
+    include:
+
+    none
+    iprev
+    auth
+    spf
+    dkim
+
+    Example use (as an ACL modifier):
+
+          add_header = :at_start:${authresults {$primary_hostname}}
+
+    This is safe even if no authentication results are available.
+
 ${certextract{<field>}{<certificate>}{<string2>}{<string3>}}
 
     The <certificate> must be a variable of type certificate. The field name is
@@ -8566,6 +8764,21 @@ ${extract{<key>}{<string1>}{<string2>}{<string3>}}
     This forces an expansion failure (see section 11.4); {<string2>} must be
     present for "fail" to be recognized.
 
+${extract json{<key>}{<string1>}{<string2>}{<string3>}}
+
+    The key and <string1> are first expanded separately. Leading and trailing
+    white space is removed from the key (but not from any of the strings). The
+    key must not be empty and must not consist entirely of digits. The expanded
+    <string1> must be of the form:
+
+    { <"key1"> : <value1> ,  <"key2"> , <value2> ... }
+
+    The braces, commas and colons, and the quoting of the member name are
+    required; the spaces are optional. Matching of the key against the member
+    names is done case-sensitively.
+
+    The results of matching are handled as above.
+
 ${extract{<number>}{<separators>}{<string1>}{<string2>}{<string3>}}
 
     The <number> argument must consist entirely of decimal digits, apart from
@@ -8593,17 +8806,25 @@ ${extract{<number>}{<separators>}{<string1>}{<string2>}{<string3>}}
     yields "99". Two successive separators mean that the field between them is
     empty (for example, the fifth field above).
 
+${extract json{<number>}}{<string1>}{<string2>}{<string3>}}
+
+    The <number> argument must consist entirely of decimal digits, apart from
+    leading and trailing white space, which is ignored.
+
+    Field selection and result handling is as above; there is no choice of
+    field separator.
+
 ${filter{<string>}{<condition>}}
 
     After expansion, <string> is interpreted as a list, colon-separated by
-    default, but the separator can be changed in the usual way. For each item
-    in this list, its value is place in $item, and then the condition is
+    default, but the separator can be changed in the usual way (6.21). For each
+    item in this list, its value is place in $item, and then the condition is
     evaluated. If the condition is true, $item is added to the output as an
     item in a new list; if the condition is false, the item is discarded. The
     separator used for the output list is the same as the one used for the
     input, but a separator setting is not included in the output. For example:
 
-    ${filter{a:b:c}{!eq{$item}{b}}
+    ${filter{a:b:c}{!eq{$item}{b}}}
 
     yields "a:c". At the end of the expansion, the value of $item is restored
     to what it was before. See also the map and reduce expansion items.
@@ -8637,9 +8858,10 @@ ${hash{<string1>}{<string2>}{<string3>}}
     $hash{4}{62}{monty python}}   yields  fbWx
 
 $header_<header name>: or $h_<header name>:, $bheader_<header name>: or $bh_<
-    header name>:, $rheader_<header name>: or $rh_<header name>:
+    header name>:, $lheader_<header name>: or $lh_<header name>:
 
-    Substitute the contents of the named message header line, for example
+    "$rheader_<header name>: or $rh_<header name>:" Substitute the contents of
+    the named message header line, for example
 
     $header_reply-to:
 
@@ -8647,13 +8869,19 @@ $header_<header name>: or $h_<header name>:, $bheader_<header name>: or $bh_<
     but internal newlines (caused by splitting the header line over several
     physical lines) may be present.
 
-    The difference between rheader, bheader, and header is in the way the data
+    The difference between the four pairs of expansions is in the way the data
     in the header line is interpreted.
 
       + rheader gives the original "raw" content of the header line, with no
         processing at all, and without the removal of leading and trailing
         white space.
 
+      + lheader gives a colon-separated list, one element per header when there
+        are multiple headers with a given name. Any embedded colon characters
+        within an element are doubled, so normal Exim list-processing
+        facilities can be used. The terminating newline of each element is
+        removed; in other respects the content is "raw".
+
       + bheader removes leading and trailing white space, and then decodes
         base64 or quoted-printable MIME "words" within the header text, but
         does no character set translation. If decoding of what looks
@@ -8693,18 +8921,13 @@ $header_<header name>: or $h_<header name>:, $bheader_<header name>: or $bh_<
     filter. Header lines that are added to a particular copy of a message by a
     router or transport are not accessible.
 
-    For incoming SMTP messages, no header lines are visible in
-
-    ACLs that are obeyed before the data phase completes,
-
-    because the header structure is not set up until the message is received.
-    They are visible in DKIM, PRDR and DATA ACLs. Header lines that are added
-    in a RCPT ACL (for example) are saved until the message's incoming header
-    lines are available, at which point they are added.
-
-    When any of the above ACLs ar
-
-    running, however, header lines added by earlier ACLs are visible.
+    For incoming SMTP messages, no header lines are visible in ACLs that are
+    obeyed before the data phase completes, because the header structure is not
+    set up until the message is received. They are visible in DKIM, PRDR and
+    DATA ACLs. Header lines that are added in a RCPT ACL (for example) are
+    saved until the message's incoming header lines are available, at which
+    point they are added. When any of the above ACLs ar running, however,
+    header lines added by earlier ACLs are visible.
 
     Upper case and lower case letters are synonymous in header names. If the
     following character is white space, the terminating colon may be omitted,
@@ -8758,7 +8981,7 @@ ${hmac{<hashname>}{<secret>}{<string>}}
     X-Spam-Scanned: header line. If you know the secret, you can check that
     this header line is authentic by recomputing the authentication code from
     the host name, message ID and the Message-id: header line. This can be done
-    using Exim's -be option, or by other means, for example by using the 
+    using Exim's -be option, or by other means, for example, by using the 
     hmac_md5_hex() function in Perl.
 
 ${if <condition> {<string1>}{<string2>}}
@@ -8802,9 +9025,10 @@ ${length{<string1>}{<string2>}}
 
     ${length_<n>:<string>}
 
-    The result of this item is either the first <n> characters or the whole of
-    <string2>, whichever is the shorter. Do not confuse length with strlen,
-    which gives the length of a string.
+    The result of this item is either the first <n> bytes or the whole of <
+    string2>, whichever is the shorter. Do not confuse length with strlen,
+    which gives the length of a string. All measurement is done in bytes and is
+    not UTF-8 aware.
 
 ${listextract{<number>}{<string1>}{<string2>}{<string3>}}
 
@@ -8813,7 +9037,7 @@ ${listextract{<number>}{<string1>}{<string2>}{<string3>}}
     ignored).
 
     After expansion, <string1> is interpreted as a list, colon-separated by
-    default, but the separator can be changed in the usual way.
+    default, but the separator can be changed in the usual way (6.21).
 
     The first field of the list is numbered one. If the number is negative, the
     fields are counted from the end of the list, with the rightmost one
@@ -8896,11 +9120,11 @@ ${lookup <search type> {<query>} {<string1>} {<string2>}}
 ${map{<string1>}{<string2>}}
 
     After expansion, <string1> is interpreted as a list, colon-separated by
-    default, but the separator can be changed in the usual way. For each item
-    in this list, its value is place in $item, and then <string2> is expanded
-    and added to the output as an item in a new list. The separator used for
-    the output list is the same as the one used for the input, but a separator
-    setting is not included in the output. For example:
+    default, but the separator can be changed in the usual way (6.21). For each
+    item in this list, its value is place in $item, and then <string2> is
+    expanded and added to the output as an item in a new list. The separator
+    used for the output list is the same as the one used for the input, but a
+    separator setting is not included in the output. For example:
 
     ${map{a:b:c}{[$item]}} ${map{<- x-y-z}{($item)}}
 
@@ -8986,8 +9210,8 @@ ${prvscheck{<address>}{<secret>}{<string>}}
 
 ${readfile{<file name>}{<eol string>}}
 
-    The file name and end-of-line string are first expanded separately. The
-    file is then read, and its contents replace the entire item. All newline
+    The filename and end-of-line string are first expanded separately. The file
+    is then read, and its contents replace the entire item. All newline
     characters in the file are replaced by the end-of-line string if it is
     present. Otherwise, newlines are left in the string. String expansion is
     not applied to the contents of the file. If you want this, you must wrap
@@ -8997,7 +9221,7 @@ ${readfile{<file name>}{<eol string>}}
     The redirect router has an option called forbid_filter_readfile which locks
     out the use of this expansion item in filter files.
 
-${readsocket{<name>}{<request>}{<timeout>}{<eol string>}{<fail string>}}
+${readsocket{<name>}{<request>}{<options>}{<eol string>}{<fail string>}}
 
     This item inserts data from a Unix domain or TCP socket into the expanded
     string. The minimal way of using it uses just two arguments, as in these
@@ -9025,6 +9249,22 @@ ${readsocket{<name>}{<request>}{<timeout>}{<eol string>}{<fail string>}}
 
     ${readsocket{/socket/name}{request string}{3s}}
 
+    The third argument is a list of options, of which the first element is the
+    timeout and must be present if the argument is given. Further elements are
+    options of form name=value. Two option types is currently recognised:
+    shutdown and tls. The first defines whether (the default) or not a shutdown
+    is done on the connection after sending the request. Example, to not do so
+    (preferred, eg. by some webservers):
+
+    ${readsocket{/socket/name}{request string}{3s:shutdown=no}}
+
+    The second, tls, controls the use of TLS on the connection. Example:
+
+    ${readsocket{/socket/name}{request string}{3s:tls=yes}}
+
+    The default is to not use TLS. If it is enabled, a shutdown as descripbed
+    above is never done.
+
     A fourth argument allows you to change any newlines that are in the data
     that is read, in the same way as for readfile (see above). This example
     turns them into spaces:
@@ -9064,13 +9304,13 @@ ${reduce{<string1>}{<string2>}{<string3>}}
 
     This operation reduces a list to a single, scalar string. After expansion,
     <string1> is interpreted as a list, colon-separated by default, but the
-    separator can be changed in the usual way. Then <string2> is expanded and
-    assigned to the $value variable. After this, each item in the <string1>
-    list is assigned to $item in turn, and <string3> is expanded for each of
-    them. The result of that expansion is assigned to $value before the next
-    iteration. When the end of the list is reached, the final value of $value
-    is added to the expansion output. The reduce expansion item can be used in
-    a number of ways. For example, to add up a list of numbers:
+    separator can be changed in the usual way (6.21). Then <string2> is
+    expanded and assigned to the $value variable. After this, each item in the
+    <string1> list is assigned to $item, in turn, and <string3> is expanded for
+    each of them. The result of that expansion is assigned to $value before the
+    next iteration. When the end of the list is reached, the final value of
+    $value is added to the expansion output. The reduce expansion item can be
+    used in a number of ways. For example, to add up a list of numbers:
 
     ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
 
@@ -9086,7 +9326,7 @@ ${reduce{<string1>}{<string2>}{<string3>}}
 $rheader_<header name>: or $rh_<header name>:
 
     This item inserts "raw" header lines. It is described with the header
-    expansion item above.
+    expansion item in section 11.5 above.
 
 ${run{<command> <args>}{<string1>}{<string2>}}
 
@@ -9164,8 +9404,8 @@ ${sg{<subject>}{<regex>}{<replacement>}}
     ${sg{abcdefabcdef}{abc}{xyz}}
 
     yields "xyzdefxyzdef". Because all three arguments are expanded before use,
-    if any $ or \ characters are required in the regular expression or in the
-    substitution string, they have to be escaped. For example:
+    if any $, } or \ characters are required in the regular expression or in
+    the substitution string, they have to be escaped. For example:
 
     ${sg{abcdef}{^(...)(...)\$}{\$2\$1}}
 
@@ -9176,16 +9416,19 @@ ${sg{<subject>}{<regex>}{<replacement>}}
     yields "K1=A K4=D K3=C". Note the use of "\N" to protect the contents of
     the regular expression from string expansion.
 
+    The regular expression is compiled in 8-bit mode, working against bytes
+    rather than any Unicode-aware character handling.
+
 ${sort{<string>}{<comparator>}{<extractor>}}
 
     After expansion, <string> is interpreted as a list, colon-separated by
-    default, but the separator can be changed in the usual way. The <comparator
-    > argument is interpreted as the operator of a two-argument expansion
-    condition. The numeric operators plus ge, gt, le, lt (and ~i variants) are
-    supported. The comparison should return true when applied to two values if
-    the first value should sort before the second value. The <extractor>
-    expansion is applied repeatedly to elements of the list, the element being
-    placed in $item, to give values for comparison.
+    default, but the separator can be changed in the usual way (6.21). The <
+    comparator> argument is interpreted as the operator of a two-argument
+    expansion condition. The numeric operators plus ge, gt, le, lt (and ~i
+    variants) are supported. The comparison should return true when applied to
+    two values if the first value should sort before the second value. The <
+    extractor> expansion is applied repeatedly to elements of the list, the
+    element being placed in $item, to give values for comparison.
 
     The item result is a sorted list, with the original list separator, of the
     list elements (in full) of the original.
@@ -9221,10 +9464,10 @@ ${substr{<string1>}{<string2>}{<string3>}}
     If the starting offset is greater than the string length the result is the
     null string; if the length plus starting offset is greater than the string
     length, the result is the right-hand part of the string, starting from the
-    given offset. The first character in the string has offset zero.
+    given offset. The first byte (character) in the string has offset zero.
 
     The substr expansion item can take negative offset values to count from the
-    right-hand end of its operand. The last character is offset -1, the
+    right-hand end of its operand. The last byte (character) is offset -1, the
     second-last is offset -2, and so on. Thus, for example,
 
     ${substr{-5}{2}{1234567}}
@@ -9242,21 +9485,24 @@ ${substr{<string1>}{<string2>}{<string3>}}
     yields "1".
 
     When the second number is omitted from substr, the remainder of the string
-    is taken if the offset is positive. If it is negative, all characters in
-    the string preceding the offset point are taken. For example, an offset of
-    -1 and no length, as in these semantically identical examples:
+    is taken if the offset is positive. If it is negative, all bytes
+    (characters) in the string preceding the offset point are taken. For
+    example, an offset of -1 and no length, as in these semantically identical
+    examples:
 
     ${substr_-1:abcde}
     ${substr{-1}{abcde}}
 
     yields all but the last character of the string, that is, "abcd".
 
+    All measurement is done in bytes and is not UTF-8 aware.
+
 ${tr{<subject>}{<characters>}{<replacements>}}
 
-    This item does single-character translation on its subject string. The
-    second argument is a list of characters to be translated in the subject
-    string. Each matching character is replaced by the corresponding character
-    from the replacement list. For example
+    This item does single-character (in bytes) translation on its subject
+    string. The second argument is a list of characters to be translated in the
+    subject string. Each matching character is replaced by the corresponding
+    character from the replacement list. For example
 
     ${tr{abcdea}{ac}{13}}
 
@@ -9265,6 +9511,8 @@ ${tr{<subject>}{<characters>}{<replacements>}}
     second, its last character is replicated. However, if it is empty, no
     translation takes place.
 
+    All character handling is done in bytes and is not UTF-8 aware.
+
 
 11.6 Expansion operators
 ------------------------
@@ -9280,6 +9528,8 @@ ${address:<string>}
     header line, and the effective address is extracted from it. If the string
     does not parse successfully, the result is empty.
 
+    The parsing correctly handles SMTPUTF8 Unicode in the string.
+
 ${addresses:<string>}
 
     The string (after expansion) is interpreted as a list of addresses in RFC
@@ -9295,10 +9545,16 @@ ${addresses:<string>}
 
     ${addresses:>& Chief <ceo@up.stairs>, sec@base.ment (dogsbody)}
 
-    expands to "ceo@up.stairs&sec@base.ment". Compare the address (singular)
-    expansion item, which extracts the working address from a single RFC2822
-    address. See the filter, map, and reduce items for ways of processing
-    lists.
+    expands to "ceo@up.stairs&sec@base.ment". The string is expanded first, so
+    if the expanded string starts with >, it may change the output separator
+    unintentionally. This can be avoided by setting the output separator
+    explicitly:
+
+    ${addresses:>:$h_from:}
+
+    Compare the address (singular) expansion item, which extracts the working
+    address from a single RFC2822 address. See the filter, map, and reduce
+    items for ways of processing lists.
 
     To clarify "list of addresses in RFC 2822 format" mentioned above, Exim
     follows a strict interpretation of header line formatting. Exim parses the
@@ -9313,7 +9569,7 @@ ${addresses:<string>}
     "=2C". The second example below is passed the contents of "$header_from:",
     meaning it gets de-mimed. Exim sees the decoded "," so it treats it as two
     email addresses. The third example shows that the presence of a comma is
-    skipped when it is quoted.
+    skipped when it is quoted. The fourth example shows SMTPUTF8 handling.
 
     # exim -be '${addresses:From: \
     =?iso-8859-2?Q?Last=2C_First?= <user@example.com>}'
@@ -9322,6 +9578,8 @@ ${addresses:<string>}
     Last:user@example.com
     # exim -be '${addresses:From: "Last, First" <user@example.com>}'
     user@example.com
+    # exim -be '${addresses:?????? <??????????@example.jp>}'
+    ??????????@example.jp
 
 ${base32:<digits>}
 
@@ -9340,7 +9598,7 @@ ${base62:<digits>}
     to base 62 and output as a string of six characters, including leading
     zeros. In the few operating environments where Exim uses base 36 instead of
     base 62 for its message identifiers (because those systems do not have
-    case-sensitive file names), base 36 is used by this operator, despite its
+    case-sensitive filenames), base 36 is used by this operator, despite its
     name. Note: Just to be absolutely clear: this is not base64 encoding.
 
 ${base62d:<base-62 digits>}
@@ -9480,15 +9738,14 @@ ${hash_<n>_<m>:<string>}
 ${hex2b64:<hexstring>}
 
     This operator converts a hex string into one that is base64 encoded. This
-    can be useful for processing the output of the MD5 and SHA-1 hashing
-    functions.
+    can be useful for processing the output of the various hashing functions.
 
 ${hexquote:<string>}
 
     This operator converts non-printable characters in a string into a hex
     escape form. Byte values between 33 (!) and 126 (~) inclusive are left as
-    is, and other byte values are converted to "\xNN", for example a byte value
-    127 is converted to "\x7f".
+    is, and other byte values are converted to "\xNN", for example, a byte
+    value 127 is converted to "\x7f".
 
 ${ipv6denorm:<string>}
 
@@ -9510,6 +9767,8 @@ ${lc:<string>}
 
     ${lc:$local_part}
 
+    Case is defined per the system C locale.
+
 ${length_<number>:<string>}
 
     The length operator is a simpler interface to the length function that can
@@ -9520,7 +9779,8 @@ ${length_<number>:<string>}
 
     See the description of the general length item above for details. Note that
     length is not the same as strlen. The abbreviation l can be used when 
-    length is used as an operator.
+    length is used as an operator. All measurement is done in bytes and is not
+    UTF-8 aware.
 
 ${listcount:<string>}
 
@@ -9539,7 +9799,7 @@ ${local_part:<string>}
 
     The string is interpreted as an RFC 2822 address and the local part is
     extracted from it. If the string does not parse successfully, the result is
-    empty.
+    empty. The parsing correctly handles SMTPUTF8 Unicode in the string.
 
 ${mask:<IP address>/<bit count>}
 
@@ -9607,6 +9867,10 @@ ${quote_local_part:<string>}
     you are creating a new email address from the contents of $local_part (or
     any other unknown data), you should always use this operator.
 
+    This quoting determination is not SMTPUTF8-aware, thus quoting non-ASCII
+    data will likely use the quoting form. Thus ${quote_local_part:??????} will
+    always become "??????".
+
 ${quote_<lookup-type>:<string>}
 
     This operator applies lookup-specific quoting rules to the string. Each
@@ -9709,7 +9973,8 @@ ${sha3:<string>}, ${sha3_<n>:<string>}
     default.
 
     The sha3 expansion item is only supported if Exim has been compiled with
-    GnuTLS 3.5.0 or later.
+    GnuTLS 3.5.0 or later, or OpenSSL 1.1.1 or later. The macro
+    "_CRYPTO_HASH_SHA3" will be defined if it is supported.
 
 ${stat:<string>}
 
@@ -9734,7 +9999,8 @@ ${str2b64:<string>}
 ${strlen:<string>}
 
     The item is replace by the length of the expanded string, expressed as a
-    decimal number. Note: Do not confuse strlen with length.
+    decimal number. Note: Do not confuse strlen with length. All measurement is
+    done in bytes and is not UTF-8 aware.
 
 ${substr_<start>_<length>:<string>}
 
@@ -9745,7 +10011,8 @@ ${substr_<start>_<length>:<string>}
     ${substr{<start>}{<length>}{<string>}}
 
     See the description of the general substr item above for details. The
-    abbreviation s can be used when substr is used as an operator.
+    abbreviation s can be used when substr is used as an operator. All
+    measurement is done in bytes and is not UTF-8 aware.
 
 ${time_eval:<string>}
 
@@ -9761,13 +10028,27 @@ ${time_interval:<string>}
 
 ${uc:<string>}
 
-    This forces the letters in the string into upper-case.
+    This forces the letters in the string into upper-case. Case is defined per
+    the system C locale.
 
 ${utf8clean:<string>}
 
     This replaces any invalid utf-8 sequence in the string by the character "?
     ".
 
+    In versions of Exim before 4.92, this did not correctly do so for a
+    truncated final codepoint's encoding, and the character would be silently
+    dropped. If you must handle detection of this scenario across both sets of
+    Exim behavior, the complexity will depend upon the task. For instance, to
+    detect if the first character is multibyte and a 1-byte extraction can be
+    successfully used as a path component (as is common for dividing up
+    delivery folders), you might use:
+
+    condition = ${if inlist{${utf8clean:${length_1:$local_part}}}{:?}{yes}{no}}
+
+    (which will false-positive if the first character of the local part is a
+    literal question mark).
+
 ${utf8_domain_to_alabel:<string>}, ${utf8_domain_from_alabel:<string>}, $
     {utf8_localpart_to_alabel:<string>}, ${utf8_localpart_from_alabel:<string>}
 
@@ -9947,7 +10228,8 @@ eq {<string1>}{<string2>}, eqi {<string1>}{<string2>}
 
     The two substrings are first expanded. The condition is true if the two
     resulting strings are identical. For eq the comparison includes the case of
-    letters, whereas for eqi the comparison is case-independent.
+    letters, whereas for eqi the comparison is case-independent, where case is
+    defined per the system C locale.
 
 exists {<file name>}
 
@@ -9966,8 +10248,8 @@ forall{<a list>}{<a condition>}, forany{<a list>}{<a condition>}
 
     These conditions iterate over a list. The first argument is expanded to
     form the list. By default, the list separator is a colon, but it can be
-    changed by the normal method. The second argument is interpreted as a
-    condition that is to be applied to each item in the list in turn. During
+    changed by the normal method (6.21). The second argument is interpreted as
+    condition that is to be applied to each item in the list in turn. During
     the interpretation of the condition, the current list item is placed in a
     variable called $item.
 
@@ -9996,20 +10278,23 @@ ge {<string1>}{<string2>}, gei {<string1>}{<string2>}
     The two substrings are first expanded. The condition is true if the first
     string is lexically greater than or equal to the second string. For ge the
     comparison includes the case of letters, whereas for gei the comparison is
-    case-independent.
+    case-independent. Case and collation order are defined per the system C
+    locale.
 
 gt {<string1>}{<string2>}, gti {<string1>}{<string2>}
 
     The two substrings are first expanded. The condition is true if the first
     string is lexically greater than the second string. For gt the comparison
     includes the case of letters, whereas for gti the comparison is
-    case-independent.
+    case-independent. Case and collation order are defined per the system C
+    locale.
 
 inlist {<string1>}{<string2>}, inlisti {<string1>}{<string2>}
 
     Both strings are expanded; the second string is treated as a list of simple
     strings; if the first string is a member of the second, then the condition
-    is true.
+    is true. For the case-independent inlisti condition, case is defined per
+    the system C locale.
 
     These are simpler to use versions of the more powerful forany condition.
     Examples, and the forany equivalents:
@@ -10032,11 +10317,12 @@ isip {<string>}, isip4 {<string>}, isip6 {<string>}
     empty component (adjacent colons) is present. Only one empty component is
     permitted.
 
-    Note: The checks are just on the form of the address; actual numerical
-    values are not considered. Thus, for example, 999.999.999.999 passes the
-    IPv4 check. The main use of these tests is to distinguish between IP
-    addresses and host names, or between IPv4 and IPv6 addresses. For example,
-    you could use
+    Note: The checks used to be just on the form of the address; actual
+    numerical values were not considered. Thus, for example, 999.999.999.999
+    passed the IPv4 check. This is no longer the case.
+
+    The main use of these tests is to distinguish between IP addresses and host
+    names, or between IPv4 and IPv6 addresses. For example, you could use
 
     ${if isip4{$sender_host_address}...
 
@@ -10059,14 +10345,16 @@ le {<string1>}{<string2>}, lei {<string1>}{<string2>}
     The two substrings are first expanded. The condition is true if the first
     string is lexically less than or equal to the second string. For le the
     comparison includes the case of letters, whereas for lei the comparison is
-    case-independent.
+    case-independent. Case and collation order are defined per the system C
+    locale.
 
 lt {<string1>}{<string2>}, lti {<string1>}{<string2>}
 
     The two substrings are first expanded. The condition is true if the first
     string is lexically less than the second string. For lt the comparison
     includes the case of letters, whereas for lti the comparison is
-    case-independent.
+    case-independent. Case and collation order are defined per the system C
+    locale.
 
 match {<string1>}{<string2>}
 
@@ -10089,7 +10377,8 @@ match {<string1>}{<string2>}
     there is no circumflex, the expression is not anchored, and it may match
     anywhere in the subject, not just at the start. If you want the pattern to
     match at the end of the subject, you must include the "$" metacharacter at
-    an appropriate point.
+    an appropriate point. All character handling is done in bytes and is not
+    UTF-8 aware, but we might change this in a future Exim release.
 
     At the start of an if expansion the values of the numeric variable
     substitutions $1 etc. are remembered. Obeying a match condition that
@@ -10168,9 +10457,9 @@ match_local_part {<string1>}{<string2>}
     ${if match_domain{a.b.c}{x.y.z:a.b.c:p.q.r}{yes}{no}}
 
     In each case, the second argument may contain any of the allowable items
-    for a list of the appropriate type. Also, because the second argument
-    (after expansion) is a standard form of list, it is possible to refer to a
-    named list. Thus, you can use conditions like this:
+    for a list of the appropriate type. Also, because the second argument is a
+    standard form of list, it is possible to refer to a named list. Thus, you
+    can use conditions like this:
 
     ${if match_domain{$domain}{+local_domains}{...
 
@@ -10189,11 +10478,11 @@ match_local_part {<string1>}{<string2>}
 
 pam {<string1>:<string2>:...}
 
-    Pluggable Authentication Modules (http://www.kernel.org/pub/linux/libs/pam/
-    ) are a facility that is available in the latest releases of Solaris and in
-    some GNU/Linux distributions. The Exim support, which is intended for use
-    in conjunction with the SMTP AUTH command, is available only if Exim is
-    compiled with
+    Pluggable Authentication Modules (https://mirrors.edge.kernel.org/pub/linux
+    /libs/pam/) are a facility that is available in the latest releases of
+    Solaris and in some GNU/Linux distributions. The Exim support, which is
+    intended for use in conjunction with the SMTP AUTH command, is available
+    only if Exim is compiled with
 
     SUPPORT_PAM=yes
 
@@ -10224,11 +10513,7 @@ pam {<string1>:<string2>:...}
     In some operating systems, PAM authentication can be done only from a
     process running as root. Since Exim is running as the Exim user when
     receiving messages, this means that PAM cannot be used directly in those
-    systems. A patched version of the pam_unix module that comes with the Linux
-    PAM package is available from http://www.e-admin.de/pam_exim/. The patched
-    module allows one special uid/gid combination, in addition to root, to
-    authenticate. If you build the patched module to allow the Exim user and
-    group, PAM can then be used from an Exim authenticator.
+    systems.
 
 pwcheck {<string1>:<string2>}
 
@@ -10471,10 +10756,13 @@ $authenticated_id
     $authenticated_id (see chapter 33). For example, a user/password
     authenticator configuration might preserve the user name for use in the
     routers. Note that this is not the same information that is saved in
-    $sender_host_authenticated. When a message is submitted locally (that is,
-    not over a TCP connection) the value of $authenticated_id is normally the
-    login name of the calling process. However, a trusted user can override
-    this by means of the -oMai command line option.
+    $sender_host_authenticated.
+
+    When a message is submitted locally (that is, not over a TCP connection)
+    the value of $authenticated_id is normally the login name of the calling
+    process. However, a trusted user can override this by means of the -oMai
+    command line option. This second case also sets up information used by the
+    $authresults expansion item.
 
 $authenticated_fail_id
 
@@ -10564,7 +10852,7 @@ $compile_number
 
     The building process for Exim keeps a count of the number of times it has
     been compiled. This serves to distinguish different compilations of the
-    same version of the program.
+    same version of Exim.
 
 $config_dir
 
@@ -10577,21 +10865,24 @@ $config_file
 
     The name of the main configuration file Exim is using.
 
-$dkim_cur_signer, $dkim_verify_status, $dkim_verify_reason, $dkim_domain, 
-    $dkim_identity, $dkim_selector, $dkim_algo, $dkim_canon_body, 
-    $dkim_canon_headers, $dkim_copiedheaders, $dkim_bodylength, $dkim_created, 
-    $dkim_expires, $dkim_headernames, $dkim_key_testing, $dkim_key_nosubdomains
-    , $dkim_key_srvtype, $dkim_key_granularity, $dkim_key_notes, 
-    $dkim_key_length
+$dkim_verify_status
+
+    Results of DKIM verification. For details see section 57.3.
+
+$dkim_cur_signer, $dkim_verify_reason, $dkim_domain, $dkim_identity, 
+    $dkim_selector, $dkim_algo, $dkim_canon_body, $dkim_canon_headers, 
+    $dkim_copiedheaders, $dkim_bodylength, $dkim_created, $dkim_expires, 
+    $dkim_headernames, $dkim_key_testing, $dkim_key_nosubdomains, 
+    $dkim_key_srvtype, $dkim_key_granularity, $dkim_key_notes, $dkim_key_length
 
     These variables are only available within the DKIM ACL. For details see
-    chapter 57.
+    section 57.3.
 
 $dkim_signers
 
     When a message has been received this variable contains a colon-separated
     list of signer domains and identities for the message. For details see
-    chapter 57.
+    section 57.3.
 
 $dnslist_domain, $dnslist_matched, $dnslist_text, $dnslist_value
 
@@ -10684,7 +10975,8 @@ $header_<name>
     This is not strictly an expansion variable. It is expansion syntax for
     inserting the message header line with the given name. Note that the name
     must be terminated by colon or white space, because it may contain a wide
-    variety of characters. Note also that braces must not be used.
+    variety of characters. Note also that braces must not be used. See the full
+    description in section 11.5 above.
 
 $headers_added
 
@@ -10762,6 +11054,9 @@ $host_lookup_deferred
     checking the result, the name is not accepted, and $host_lookup_deferred is
     set to "1". See also $sender_host_name.
 
+    Performing these checks sets up information used by the $authresults
+    expansion item.
+
 $host_lookup_failed
 
     See $host_lookup_deferred.
@@ -10832,7 +11127,7 @@ $local_part
 
     When a message is being delivered to a file, pipe, or autoreply transport
     as a result of aliasing or forwarding, $local_part is set to the local part
-    of the parent address, not to the file name or command (see $address_file
+    of the parent address, not to the filename or command (see $address_file
     and $address_pipe).
 
     When an ACL is running for a RCPT command, $local_part contains the local
@@ -10953,7 +11248,7 @@ $max_received_linelength
 
     This variable contains the number of bytes in the longest line that was
     received as part of the message, not counting the line termination
-    character(s).
+    character(s). It is not valid if the spool_files_wireformat option is used.
 
 $message_age
 
@@ -10985,6 +11280,9 @@ $message_body_size
     that separates the body from the header. Newlines are included in the
     count. See also $message_size, $body_linecount, and $body_zerocount.
 
+    If the spool file is wireformat (see the spool_files_wireformat main
+    option) the CRLF line-terminators are included in the count.
+
 $message_exim_id
 
     When a message is being received or delivered, this variable contains the
@@ -11037,6 +11335,8 @@ $message_linecount
     In the MAIL and RCPT ACLs, the value is zero because at that stage the
     message has not yet been received.
 
+    This variable is not valid if the spool_files_wireformat option is used.
+
 $message_size
 
     When a message is being processed, this variable contains its size in
@@ -11221,7 +11521,7 @@ $received_ip_address
     line option.
 
     As well as being useful in ACLs (including the "connect" ACL), these
-    variable could be used, for example, to make the file name for a TLS
+    variable could be used, for example, to make the filename for a TLS
     certificate depend on which interface and/or port is being used for the
     incoming connection. The values of $received_ip_address and $received_port
     are saved with any messages that are received, thus making these variables
@@ -11610,6 +11910,12 @@ $smtp_command_argument
     variable is somewhat redundant, but is retained for backwards
     compatibility.
 
+$smtp_command_history
+
+    A comma-separated list (with no whitespace) of the most-recent SMTP
+    commands received, in time-order left to right. Only a limited number of
+    commands are remembered.
+
 $smtp_count_at_connection_start
 
     This variable is set greater than zero only in processes spawned by the
@@ -11637,6 +11943,12 @@ $spam_xxx
     is compiled with the content-scanning extension. For details, see section
     44.2.
 
+$spf_header_comment, $spf_received, $spf_result, $spf_result_guessed, 
+    $spf_smtp_comment
+
+    These variables are only available if Exim is built with SPF support. For
+    details see section 57.4.
+
 $spool_directory
 
     The name of Exim's spool directory.
@@ -11693,6 +12005,9 @@ $tls_in_ourcert
     of a certextract expansion item, md5, sha1 or sha256 operator, or a def
     condition.
 
+    Note: Under versions of OpenSSL preceding 1.1.1, when a list of more than
+    one file is used for tls_certificate, this variable is not reliable.
+
 $tls_in_peercert
 
     This variable refers to the certificate presented by the peer of an inbound
@@ -11749,6 +12064,10 @@ $tls_out_cipher
     for details of TLS support and chapter 30 for details of the smtp
     transport.
 
+$tls_out_dane
+
+    DANE active status. See section 42.15.
+
 $tls_in_ocsp
 
     When a message is received from a remote client connection the result of
@@ -11805,6 +12124,10 @@ $tls_out_sni
     During outbound SMTP deliveries, this variable reflects the value of the 
     tls_sni option on the transport.
 
+$tls_out_tlsa_usage
+
+    Bitfield of TLSA record types found. See section 42.15.
+
 $tod_bsdinbox
 
     The time of day and the date, in the format required for BSD-style mailbox
@@ -12066,7 +12389,7 @@ options:
     listen. Each item may optionally also specify a port.
 
 The default list separator in both cases is a colon, but this can be changed as
-described in section 6.20. When IPv6 addresses are involved, it is usually best
+described in section 6.21. When IPv6 addresses are involved, it is usually best
 to change the separator to avoid having to double all the colons. For example:
 
 local_interfaces = <; 127.0.0.1 ; \
@@ -12129,9 +12452,9 @@ Another way of doing this would be to use macros and the -D option. However,
 configuration by -D is allowed only when the caller is root or exim.
 
 The value of -oX is a list of items. The default colon separator can be changed
-in the usual way if required. If there are any items that do not contain dots
-or colons (that is, are not IP addresses), the value of daemon_smtp_ports is
-replaced by the list of those items. If there are any items that do contain
+in the usual way (6.21) if required. If there are any items that do not contain
+dots or colons (that is, are not IP addresses), the value of daemon_smtp_ports
+is replaced by the list of those items. If there are any items that do contain
 dots or colons, the value of local_interfaces is replaced by those items. Thus,
 for example,
 
@@ -12146,20 +12469,27 @@ since local_interfaces now contains no items without ports, the value of
 daemon_smtp_ports is no longer relevant in this example.)
 
 
-13.4 Support for the obsolete SSMTP (or SMTPS) protocol
--------------------------------------------------------
+13.4 Support for the submissions (aka SSMTP or SMTPS) protocol
+--------------------------------------------------------------
 
-Exim supports the obsolete SSMTP protocol (also known as SMTPS) that was used
-before the STARTTLS command was standardized for SMTP. Some legacy clients
-still use this protocol. If the tls_on_connect_ports option is set to a list of
-port numbers or service names, connections to those ports must use SSMTP. The
-most common use of this option is expected to be
+Exim supports the use of TLS-on-connect, used by mail clients in the
+"submissions" protocol, historically also known as SMTPS or SSMTP. For some
+years, IETF Standards Track documents only blessed the STARTTLS-based
+Submission service (port 587) while common practice was to support the same
+feature set on port 465, but using TLS-on-connect. If your installation needs
+to provide service to mail clients (Mail User Agents, MUAs) then you should
+provide service on both the 587 and the 465 TCP ports.
+
+If the tls_on_connect_ports option is set to a list of port numbers or service
+names, connections to those ports must first establish TLS, before proceeding
+to the application layer use of the SMTP protocol.
+
+The common use of this option is expected to be
 
 tls_on_connect_ports = 465
 
-because 465 is the usual port number used by the legacy clients. There is also
-a command line option -tls-on-connect, which forces all ports to behave in this
-way when a daemon is started.
+per RFC 8314. There is also a command line option -tls-on-connect, which forces
+all ports to behave in this way when a daemon is started.
 
 Warning: Setting tls_on_connect_ports does not of itself cause the daemon to
 listen on those ports. You must still specify them in daemon_smtp_ports, 
@@ -12303,7 +12633,7 @@ the smtp transport in chapter 30 for more details.
 ===============================================================================
 14. MAIN CONFIGURATION
 
-The first part of the run time configuration file contains three types of item:
+The first part of the runtime configuration file contains three types of item:
 
   * Macro definitions: These lines start with an upper case letter. See section
     6.4 for details of macro processing.
@@ -12337,6 +12667,7 @@ message_body_newlines retain newlines in $message_body
 message_body_visible  how much to show in $message_body
 mua_wrapper           run in "MUA wrapper" mode
 print_topbitchars     top-bit characters are printing
+spool_wireformat      use wire-format spool data files when possible
 timezone              force time zone
 
 
@@ -12354,17 +12685,18 @@ spool_directory       override compiled-in value
 14.3 Privilege controls
 -----------------------
 
-admin_groups              groups that are Exim admin users
-deliver_drop_privilege    drop root for delivery processes
-local_from_check          insert Sender: if necessary
-local_from_prefix         for testing From: for local sender
-local_from_suffix         for testing From: for local sender
-local_sender_retain       keep Sender: from untrusted user
-never_users               do not run deliveries as these
-prod_requires_admin       forced delivery requires admin user
-queue_list_requires_admin queue listing requires admin user
-trusted_groups            groups that are trusted
-trusted_users             users that are trusted
+admin_groups                     groups that are Exim admin users
+commandline_checks_require_admin require admin for various checks
+deliver_drop_privilege           drop root for delivery processes
+local_from_check                 insert Sender: if necessary
+local_from_prefix                for testing From: for local sender
+local_from_suffix                for testing From: for local sender
+local_sender_retain              keep Sender: from untrusted user
+never_users                      do not run deliveries as these
+prod_requires_admin              forced delivery requires admin user
+queue_list_requires_admin        queue listing requires admin user
+trusted_groups                   groups that are trusted
+trusted_users                    users that are trusted
 
 
 14.4 Logging
@@ -12494,6 +12826,7 @@ acl_smtp_starttls      ACL for STARTTLS
 acl_smtp_vrfy          ACL for VRFY
 av_scanner             specify virus scanner
 check_rfc2047_length   check length of RFC 2047 "encoded words"
+dns_cname_loops        follow CNAMEs returned by resolver
 dns_csa_search_limit   control CSA parent search depth
 dns_csa_use_reverse    en/disable CSA IP reverse search
 header_maxsize         total size of message header
@@ -12731,7 +13064,7 @@ that in today's Internet, this causes more problems than it solves. It now
 defaults to true. A more detailed analysis of the issues is provided by Dan
 Bernstein:
 
-http://cr.yp.to/smtp/8bitmime.html
+https://cr.yp.to/smtp/8bitmime.html
 
 To log received 8BITMIME status use
 
@@ -12796,7 +13129,7 @@ chapter 43 for further details.
 
 This option defines the ACL that is run for each DKIM signature (by default, or
 as specified in the dkim_verify_signers option) of a received message. See
-chapter 57 for further details.
+section 57.3 for further details.
 
 +----------------------------------------------------+
 |acl_smtp_etrn|Use: main|Type: string*|Default: unset|
@@ -13229,6 +13562,13 @@ they will never run out of resources may wish to deliberately disable them.
 The CHUNKING extension (RFC3030) will be advertised in the EHLO message to
 these hosts. Hosts may use the BDAT command as an alternate to DATA.
 
++-------------------------------------------------------------------------+
+|commandline_checks_require_admin|Use: main|Type: boolean|Default: "false"|
++-------------------------------------------------------------------------+
+
+This option restricts various basic checking features to require an
+administrative user. This affects most of the -b* options, such as -be.
+
 +----------------------------------------------------+
 |debug_store|Use: main|Type: boolean|Default: "false"|
 +----------------------------------------------------+
@@ -13269,7 +13609,7 @@ When a message is delayed, Exim sends a warning message to the sender at
 intervals specified by this option. The data is a colon-separated list of times
 after which to send warning messages. If the value of the option is an empty
 string or a zero time, no warnings are sent. Up to 10 times may be given. If a
-message has been on the queue for longer than the last time, the last interval
+message has been in the queue for longer than the last time, the last interval
 between the times is used to compute subsequent warning times. For example,
 with
 
@@ -13375,7 +13715,7 @@ IPv6 literal addresses.
 
 This option gives a list of DKIM domains for which the DKIM ACL is run. It is
 expanded after the message is received; by default it runs the ACL once for
-each signature in the message. See chapter 57.
+each signature in the message. See section 57.3.
 
 +--------------------------------------------------------------------+
 |dns_again_means_nonexist|Use: main|Type: domain list*|Default: unset|
@@ -13435,6 +13775,17 @@ This option controls whether or not an IP address, given as a CSA domain, is
 reversed and looked up in the reverse DNS, as described in more detail in
 section 43.50.
 
++--------------------------------------------------+
+|dns_cname_loops|Use: main|Type: integer|Default: 1|
++--------------------------------------------------+
+
+This option controls the following of CNAME chains, needed if the resolver does
+not do it internally. As of 2018 most should, and the default can be left. If
+you have an ancient one, a value of 10 is likely needed.
+
+The default value of one CNAME-follow is needed thanks to the observed return
+for an MX request, given no MX presence but a CNAME to an A, of the CNAME.
+
 +-------------------------------------------------+
 |dns_dnssec_ok|Use: main|Type: integer|Default: -1|
 +-------------------------------------------------+
@@ -13745,11 +14096,14 @@ This option controls whether GnuTLS is used in compatibility mode in an Exim
 server. This reduces security slightly, but improves interworking with older
 implementations of TLS.
 
-option gnutls_allow_auto_pkcs11 main boolean unset This option will let GnuTLS
-(2.12.0 or later) autoload PKCS11 modules with the p11-kit configuration files
-in /etc/pkcs11/modules/.
++---------------------------------------------------------------+
+|gnutls_allow_auto_pkcs11|Use: main|Type: boolean|Default: unset|
++---------------------------------------------------------------+
 
-See http://www.gnutls.org/manual/gnutls.html#Smart-cards-and-HSMs for
+This option will let GnuTLS (2.12.0 or later) autoload PKCS11 modules with the
+p11-kit configuration files in /etc/pkcs11/modules/.
+
+See https://www.gnutls.org/manual/gnutls.html#Smart-cards-and-HSMs for
 documentation.
 
 +---------------------------------------------------------+
@@ -13858,7 +14212,7 @@ before EHLO or HELO, it is rejected with a 503 error.
 |hold_domains|Use: main|Type: domain list*|Default: unset|
 +--------------------------------------------------------+
 
-This option allows mail for particular domains to be held on the queue
+This option allows mail for particular domains to be held in the queue
 manually. The option is overridden if a message delivery is forced with the -M,
 -qf, -Rf or -Sf options, and also while testing or verifying addresses using 
 -bt or -bv. Otherwise, if a domain matches an item in hold_domains, no routing
@@ -13988,7 +14342,7 @@ suffer temporary delivery failures are of course retried in the usual way.)
 
 After a permanent delivery failure, bounce messages are frozen, because there
 is no sender to whom they can be returned. When a frozen bounce message has
-been on the queue for more than the given time, it is unfrozen at the next
+been in the queue for more than the given time, it is unfrozen at the next
 queue run, and a further delivery is attempted. If delivery fails again, the
 bounce message is discarded. This makes it possible to keep failed bounce
 messages around for a shorter time than the normal maximum retry time for
@@ -14126,9 +14480,7 @@ If set, Exim will attempt to negotiate TLS with the LDAP server when connecting
 on a regular LDAP port. This is the LDAP equivalent of SMTP's "STARTTLS". This
 is distinct from using "ldaps", which is the LDAP form of SSL-on-connect. In
 the event of failure to negotiate TLS, the action taken is controlled by 
-ldap_require_cert.
-
-This option is ignored for "ldapi" connections.
+ldap_require_cert. This option is ignored for "ldapi" connections.
 
 +---------------------------------------------------+
 |ldap_version|Use: main|Type: integer|Default: unset|
@@ -14257,16 +14609,15 @@ computed from the time and the local host number as described in section 3.4.
 This option sets the path which is used to determine the names of Exim's log
 files, or indicates that logging is to be to syslog, or both. It is expanded
 when Exim is entered, so it can, for example, contain a reference to the host
-name. If no specific path is set for the log files at compile or run time, or
-if the option is unset at run time (i.e. "log_file_path = ") they are written
-in a sub-directory called log in Exim's spool directory. Chapter 52 contains
-further details about Exim's logging, and section 52.1 describes how the
-contents of log_file_path are used. If this string is fixed at your
-installation (contains no expansion variables) it is recommended that you do
-not set this option in the configuration file, but instead supply the path
-using LOG_FILE_PATH in Local/Makefile so that it is available to Exim for
-logging errors detected early on - in particular, failure to read the
-configuration file.
+name. If no specific path is set for the log files at compile or runtime, or if
+the option is unset at runtime (i.e. "log_file_path = ") they are written in a
+sub-directory called log in Exim's spool directory. Chapter 52 contains further
+details about Exim's logging, and section 52.1 describes how the contents of 
+log_file_path are used. If this string is fixed at your installation (contains
+no expansion variables) it is recommended that you do not set this option in
+the configuration file, but instead supply the path using LOG_FILE_PATH in
+Local/Makefile so that it is available to Exim for logging errors detected
+early on - in particular, failure to read the configuration file.
 
 +--------------------------------------------------+
 |log_selector|Use: main|Type: string|Default: unset|
@@ -14463,7 +14814,8 @@ harm. This option overrides the pipe_as_creator option of the pipe transport
 driver.
 
 +-----------------------------------------------------------------------------+
-|openssl_options|Use: main|Type: string list|Default: +no_sslv2 +single_dh_use|
+|openssl_options| Use:   | Type: string |    Default: +no_sslv2 +single_dh_use|
+|               |  main  |     list     |                           +no_ticket|
 +-----------------------------------------------------------------------------+
 
 This option allows an administrator to adjust the SSL options applied by
@@ -14715,7 +15067,8 @@ spool directories.
 +---------------------------------------------------------+
 
 The -M, -R, and -q command-line options require the caller to be an admin user
-unless prod_requires_admin is set false. See also queue_list_requires_admin.
+unless prod_requires_admin is set false. See also queue_list_requires_admin and
+commandline_checks_require_admin.
 
 +--------------------------------------------------------+
 |qualify_domain|Use: main|Type: string|Default: see below|
@@ -14757,14 +15110,14 @@ next queue run. See also hold_domains and queue_smtp_domains.
 
 The -bp command-line option, which lists the messages that are on the queue,
 requires the caller to be an admin user unless queue_list_requires_admin is set
-false. See also prod_requires_admin.
+false. See also prod_requires_admin and commandline_checks_require_admin.
 
 +-------------------------------------------------+
 |queue_only|Use: main|Type: boolean|Default: false|
 +-------------------------------------------------+
 
 If queue_only is set, a delivery process is not automatically started whenever
-a message is received. Instead, the message waits on the queue for the next
+a message is received. Instead, the message waits in the queue for the next
 queue run. Even if queue_only is false, incoming messages may not get delivered
 immediately when certain conditions (such as heavy load) occur.
 
@@ -14870,7 +15223,7 @@ $queue_name variable.
 When this option is set, a delivery process is started whenever a message is
 received, routing is performed, and local deliveries take place. However, if
 any SMTP deliveries are required for domains that match queue_smtp_domains,
-they are not immediately delivered, but instead the message waits on the queue
+they are not immediately delivered, but instead the message waits in the queue
 for the next queue run. Since routing of the message has taken place, Exim
 knows to which remote hosts it must be delivered, and so when the queue run
 happens, multiple messages for the same host are delivered over a single SMTP
@@ -14884,7 +15237,7 @@ also hold_domains and queue_domains.
 
 This option sets the timeout for accepting a non-SMTP message, that is, the
 maximum time that Exim waits when reading a message on the standard input. If
-the value is zero, it will wait for ever. This setting is overridden by the -or
+the value is zero, it will wait forever. This setting is overridden by the -or
 command line option. The timeout for incoming SMTP messages is controlled by 
 smtp_receive_timeout.
 
@@ -15201,7 +15554,7 @@ doing this processing, it cannot accept any other incoming connections.
 
 If the number of simultaneous incoming SMTP connections being handled via the
 listening daemon exceeds this value, messages received by SMTP are just placed
-on the queue; no delivery processes are started automatically. The count is
+in the queue; no delivery processes are started automatically. The count is
 fixed at the start of an SMTP connection. It cannot be updated in the
 subprocess that receives messages, and so the queueing or not queueing applies
 to all messages received in the same connection.
@@ -15219,7 +15572,7 @@ This option limits the number of delivery processes that Exim starts
 automatically when receiving messages via SMTP, whether via the daemon or by
 the use of -bs or -bS. If the value of the option is greater than zero, and the
 number of messages received in a single SMTP session exceeds this number,
-subsequent messages are placed on the queue, but no delivery processes are
+subsequent messages are placed in the queue, but no delivery processes are
 started. This helps to limit the number of Exim processes when a server
 restarts after downtime and there is a lot of mail waiting for it on other
 systems. On large systems, the default should probably be increased, and on
@@ -15508,17 +15861,20 @@ availability thereof is advertised in response to EHLO only to those client
 hosts that match this option. See chapter 59 for details of Exim's support for
 internationalisation.
 
-+-------------------------------------------------------+
-|spamd_address|Use: main|Type: string|Default: see below|
-+-------------------------------------------------------+
++-----------------------------------------------------------+
+|spamd_address|Use: main|Type: string|Default: 127.0.0.1 783|
++-----------------------------------------------------------+
 
 This option is available when Exim is compiled with the content-scanning
-extension. It specifies how Exim connects to SpamAssassin's spamd daemon. The
-default value is
+extension. It specifies how Exim connects to SpamAssassin's spamd daemon. See
+section 44.2 for more details.
 
-127.0.0.1 783
++--------------------------------------------------------------------+
+|spf_guess|Use: main|Type: string|Default: v=spf1 a/24 mx/24 ptr ?all|
++--------------------------------------------------------------------+
 
-See section 44.2 for more details.
+This option is available when Exim is compiled with SPF support. See section
+57.4 for more details.
 
 +------------------------------------------------------------+
 |split_spool_directory|Use: main|Type: boolean|Default: false|
@@ -15544,11 +15900,11 @@ automatically deleted.
 
 When split_spool_directory is set, the behaviour of queue runner processes
 changes. Instead of creating a list of all messages in the queue, and then
-trying to deliver each one in turn, it constructs a list of those in one
+trying to deliver each one, in turn, it constructs a list of those in one
 sub-directory and tries to deliver them, before moving on to the next
 sub-directory. The sub-directories are processed in a random order. This
 spreads out the scanning of the input directories, and uses less memory. It is
-particularly beneficial when there are lots of messages on the queue. However,
+particularly beneficial when there are lots of messages in the queue. However,
 if queue_run_in_order is set, none of this new processing happens. The entire
 queue has to be scanned and sorted before any deliveries can start.
 
@@ -15571,6 +15927,30 @@ as failures in the configuration file.
 By using this option to override the compiled-in path, it is possible to run
 tests of Exim without using the standard spool.
 
++-------------------------------------------------------+
+|spool_wireformat|Use: main|Type: boolean|Default: false|
++-------------------------------------------------------+
+
+If this option is set, Exim may for some messages use an alternative format for
+data-files in the spool which matches the wire format. Doing this permits more
+efficient message reception and transmission. Currently it is only done for
+messages received using the ESMTP CHUNKING option.
+
+The following variables will not have useful values:
+
+$max_received_linelength
+$body_linecount
+$body_zerocount
+
+Users of the local_scan() API (see 45), and any external programs which are
+passed a reference to a message data file (except via the "regex", "malware" or
+"spam") ACL conditions) will need to be aware of the different formats
+potentially available.
+
+Using any of the ACL conditions noted will negate the reception benefit (as a
+Unix-mbox-format file is constructed for them). The transmission benefit is
+maintained.
+
 +----------------------------------------------------+
 |sqlite_lock_timeout|Use: main|Type: time|Default: 5s|
 +----------------------------------------------------+
@@ -15665,9 +16045,8 @@ the start of each delivery attempt, before any routing is done. System filters
 must be Exim filters; they cannot be Sieve filters. If the system filter
 generates any deliveries to files or pipes, or any new mail messages, the
 appropriate system_filter_..._transport option(s) must be set, to define which
-transports are to be used. Details of this facility are given in chapter 46.
-
-A forced expansion failure results in no filter operation.
+transports are to be used. Details of this facility are given in chapter 46. A
+forced expansion failure results in no filter operation.
 
 +------------------------------------------------------------------------+
 |system_filter_directory_transport|Use: main|Type: string*|Default: unset|
@@ -15743,7 +16122,7 @@ by the smtp transport for delivering mail always set TCP_NODELAY.
 +-----------------------------------------------------+
 
 If timeout_frozen_after is set to a time greater than zero, a frozen message of
-any kind that has been on the queue for longer than the given time is
+any kind that has been in the queue for longer than the given time is
 automatically cancelled at the next queue run. If the frozen message is a
 bounce message, it is just discarded; otherwise, a bounce is sent to the
 sender, in a similar manner to cancellation by the -Mg command line option. If
@@ -15751,7 +16130,7 @@ you want to timeout frozen bounce messages earlier than other kinds of frozen
 message, see ignore_bounce_errors_after.
 
 Note: the default value of zero means no timeouts; with this setting, frozen
-messages remain on the queue forever (except for any frozen bounce messages
+messages remain in the queue forever (except for any frozen bounce messages
 that are released by ignore_bounce_errors_after).
 
 +----------------------------------------------+
@@ -15784,20 +16163,29 @@ that a certificate be supplied using the tls_certificate option. If TLS support
 for incoming connections is not required the tls_advertise_hosts option should
 be set empty.
 
-+------------------------------------------------------+
-|tls_certificate|Use: main|Type: string*|Default: unset|
-+------------------------------------------------------+
++-----------------------------------------------------+
+|tls_certificate|Use: main|Type: string|Default: list*|
++-----------------------------------------------------+
 
-The value of this option is expanded, and must then be the absolute path to a
-file which contains the server's certificates. The server's private key is also
-assumed to be in this file if tls_privatekey is unset. See chapter 42 for
-further details.
+The value of this option is expanded, and must then be a list of absolute paths
+to files which contains the server's certificates. Commonly only one file is
+needed. The server's private key is also assumed to be in this file if 
+tls_privatekey is unset. See chapter 42 for further details.
 
 Note: The certificates defined by this option are used only when Exim is
 receiving incoming messages as a server. If you want to supply certificates for
 use when sending messages as a client, you must set the tls_certificate option
 in the relevant smtp transport.
 
+Note: If you use filenames based on IP addresses, change the list separator in
+the usual way (6.21) >to avoid confusion under IPv6.
+
+Note: Under versions of OpenSSL preceding 1.1.1, when a list of more than one
+file is used, the $tls_in_ourcert variable is unreliable.
+
+Note: OCSP stapling is not usable under OpenSSL when a list of more than one
+file is used.
+
 If the option contains $tls_out_sni and Exim is built against OpenSSL, then if
 the OpenSSL build supports TLS extensions and the TLS client sends the Server
 Name Indication extension, then this option and others documented in 42.10 will
@@ -15811,7 +16199,13 @@ generated for every connection.
 +----------------------------------------------+
 
 This option specifies a certificate revocation list. The expanded value must be
-the name of a file that contains a CRL in PEM format.
+the name of a file that contains CRLs in PEM format.
+
+Under OpenSSL the option can specify a directory with CRL files.
+
+Note: Under OpenSSL the option must, if given, supply a CRL for each signing
+element of the certificate chain (i.e. all but the leaf). For the file variant
+this can be multiple PEM blocks in the one file.
 
 See 42.10 for discussion of when this option might be re-expanded.
 
@@ -15914,7 +16308,8 @@ acceptable bound from 1024 to 2048.
 |tls_eccurve|Use: main|Type: string*|Default: "auto"|
 +---------------------------------------------------+
 
-This option selects a EC curve for use by Exim.
+This option selects a EC curve for use by Exim when used with OpenSSL. It has
+no effect when Exim is used with GnuTLS.
 
 After expansion it must contain a valid EC curve parameter, such as
 "prime256v1", "secp384r1", or "P-512". Consult your OpenSSL manual for valid
@@ -15936,24 +16331,28 @@ Certificate Authority.
 
 Usable for GnuTLS 3.4.4 or 3.3.17 or OpenSSL 1.1.0 (or later).
 
+For GnuTLS 3.5.6 or later the expanded value of this option can be a list of
+files, to match a list given for the tls_certificate option. The ordering of
+the two lists must match.
+
 +---------------------------------------------------------------+
 |tls_on_connect_ports|Use: main|Type: string list|Default: unset|
 +---------------------------------------------------------------+
 
 This option specifies a list of incoming SSMTP (aka SMTPS) ports that should
-operate the obsolete SSMTP (SMTPS) protocol, where a TLS session is immediately
-set up without waiting for the client to issue a STARTTLS command. For further
+operate the SSMTP (SMTPS) protocol, where a TLS session is immediately set up
+without waiting for the client to issue a STARTTLS command. For further
 details, see section 13.4.
 
-+-----------------------------------------------------+
-|tls_privatekey|Use: main|Type: string*|Default: unset|
-+-----------------------------------------------------+
++----------------------------------------------------+
+|tls_privatekey|Use: main|Type: string|Default: list*|
++----------------------------------------------------+
 
-The value of this option is expanded, and must then be the absolute path to a
-file which contains the server's private key. If this option is unset, or if
-the expansion is forced to fail, or the result is an empty string, the private
-key is assumed to be in the same file as the server's certificates. See chapter
-42 for further details.
+The value of this option is expanded, and must then be a list of absolute paths
+to files which contains the server's private keys. If this option is unset, or
+if the expansion is forced to fail, or the result is an empty string, the
+private key is assumed to be in the same file as the server's certificates. See
+chapter 42 for further details.
 
 See 42.10 for discussion of when this option might be re-expanded.
 
@@ -16162,7 +16561,7 @@ See uucp_from_pattern above.
 
 This option defines a template file containing paragraphs of text to be used
 for constructing the warning message which is sent by Exim when a message has
-been on the queue for a specified amount of time, as specified by delay_warning
+been in the queue for a specified amount of time, as specified by delay_warning
 . Details of the file's contents are given in chapter 49. See also 
 bounce_message_file.
 
@@ -16539,7 +16938,7 @@ a sender, verification fails.
 
 String expansion is not applied to this option. The argument must be a
 colon-separated list of host names or IP addresses. The list separator can be
-changed (see section 6.20), and a port can be specified with each name or
+changed (see section 6.21), and a port can be specified with each name or
 address. In fact, the format of each item is exactly the same as defined for
 the list of hosts in a manualroute router (see section 20.5).
 
@@ -16565,8 +16964,8 @@ information. See also initgroups and user and the discussion in chapter 23.
 +---------------------------------------------------+
 
 This option specifies a list of text headers, newline-separated (by default,
-changeable in the usual way), that is associated with any addresses that are
-accepted by the router. Each item is separately expanded, at routing time.
+changeable in the usual way 6.21), that is associated with any addresses that
+are accepted by the router. Each item is separately expanded, at routing time.
 However, this option has no effect when an address is just being verified. The
 way in which the text is used to add header lines at transport time is
 described in section 47.17. New header lines are not actually added until the
@@ -16599,8 +16998,8 @@ redirect router may be of help.
 +------------------------------------------------------+
 
 This option specifies a list of text headers, colon-separated (by default,
-changeable in the usual way), that is associated with any addresses that are
-accepted by the router. Each item is separately expanded, at routing time.
+changeable in the usual way 6.21), that is associated with any addresses that
+are accepted by the router. Each item is separately expanded, at routing time.
 However, this option has no effect when an address is just being verified. The
 way in which the text is used to remove header lines at transport time is
 described in section 47.17. Header lines are not actually removed until the
@@ -16863,8 +17262,8 @@ Before running a router, as one of its precondition tests, Exim works its way
 through the require_files list, expanding each item separately.
 
 Because the list is split before expansion, any colons in expansion items must
-be doubled, or the facility for using a different list separator must be used.
-If any expansion is forced to fail, the item is ignored. Other expansion
+be doubled, or the facility for using a different list separator must be used (
+6.21). If any expansion is forced to fail, the item is ignored. Other expansion
 failures cause routing of the address to be deferred.
 
 If any expanded string is empty, it is ignored. Otherwise, except as described
@@ -16883,8 +17282,8 @@ domain, local part, or sender. (See section 3.12 for a full list of the order
 in which preconditions are evaluated.) However, as these options are all
 expanded, you can use the exists expansion condition to make such tests. The 
 require_files option is intended for checking files that the router may be
-going to use internally, or which are needed by a transport (for example
-.procmailrc).
+going to use internally, or which are needed by a transport (e.g., .procmailrc
+).
 
 During delivery, the stat() function is run as root, but there is a facility
 for some checking of the accessibility of a file by another user. This is not a
@@ -16923,9 +17322,9 @@ The default action for handling an unresolved EACCES is to consider it to be
 caused by a configuration error, and routing is deferred because the existence
 or non-existence of the file cannot be determined. However, in some
 circumstances it may be desirable to treat this condition as if the file did
-not exist. If the file name (or the exclamation mark that precedes the file
-name for non-existence) is preceded by a plus sign, the EACCES error is treated
-as if the file did not exist. For example:
+not exist. If the filename (or the exclamation mark that precedes the filename
+for non-existence) is preceded by a plus sign, the EACCES error is treated as
+if the file did not exist. For example:
 
 require_files = +/some/file
 
@@ -17283,9 +17682,9 @@ mx_domains can be set to disable the direct use of address records.
 MX records of equal priority are sorted by Exim into a random order. Exim then
 looks for address records for the host names obtained from MX or SRV records.
 When a host has more than one IP address, they are sorted into a random order,
-except that IPv6 addresses are always sorted before IPv4 addresses. If all the
-IP addresses found are discarded by a setting of the ignore_target_hosts
-generic option, the router declines.
+except that IPv6 addresses are sorted before IPv4 addresses. If all the IP
+addresses found are discarded by a setting of the ignore_target_hosts generic
+option, the router declines.
 
 Unless they have the highest priority (lowest MX value), MX records that point
 to the local host, or to any host name that matches hosts_treat_as_local, are
@@ -17411,6 +17810,23 @@ decline. This maybe be useful for queueing messages for a newly created domain
 while the DNS configuration is not ready. However, it will result in any
 message with mistyped domains also being queued.
 
++-------------------------------------------+
+|ipv4_only|Use: string*|Type: unset|Default:|
++-------------------------------------------+
+
+The string is expanded, and if the result is anything but a forced failure, or
+an empty string, or one of the strings ?0? or ?no? or ?false? (checked without
+regard to the case of the letters), only A records are used.
+
++---------------------------------------------+
+|ipv4_prefer|Use: string*|Type: unset|Default:|
++---------------------------------------------+
+
+The string is expanded, and if the result is anything but a forced failure, or
+an empty string, or one of the strings ?0? or ?no? or ?false? (checked without
+regard to the case of the letters), A records are sorted before AAAA records
+(inverting the default).
+
 +-----------------------------------------------------------+
 |mx_domains|Use: dnslookup|Type: domain list*|Default: unset|
 +-----------------------------------------------------------+
@@ -17892,9 +18308,10 @@ be enclosed in quotes if it contains white space.
 A list of hosts, whether obtained via route_data or route_list, is always
 separately expanded before use. If the expansion fails, the router declines.
 The result of the expansion must be a colon-separated list of names and/or IP
-addresses, optionally also including ports. The format of each item in the list
-is described in the next section. The list separator can be changed as
-described in section 6.20.
+addresses, optionally also including ports. If the list is written with spaces,
+it must be protected with quotes. The format of each item in the list is
+described in the next section. The list separator can be changed as described
+in section 6.21.
 
 If the list of hosts was obtained from a route_list item, the following
 variables are set during its expansion:
@@ -17998,12 +18415,12 @@ whether obtained from an MX lookup or not.
 20.7 How the options are used
 -----------------------------
 
-The options are a sequence of words; in practice no more than three are ever
-present. One of the words can be the name of a transport; this overrides the 
-transport option on the router for this particular routing rule only. The other
-words (if present) control randomization of the list of hosts on a per-rule
-basis, and how the IP addresses of the hosts are to be found when routing to a
-remote transport. These options are as follows:
+The options are a sequence of words, space-separated. One of the words can be
+the name of a transport; this overrides the transport option on the router for
+this particular routing rule only. The other words (if present) control
+randomization of the list of hosts on a per-rule basis, and how the IP
+addresses of the hosts are to be found when routing to a remote transport.
+These options are as follows:
 
   * randomize: randomize the order of the hosts in this list, overriding the
     setting of hosts_randomize for this routing rule only.
@@ -18019,6 +18436,10 @@ remote transport. These options are as follows:
     no address records are found. If there is a temporary DNS error (such as a
     timeout), delivery is deferred.
 
+  * ipv4_only: in direct DNS lookups, look up only A records.
+
+  * ipv4_prefer: in direct DNS lookups, sort A records before AAAA records.
+
 For example:
 
 route_list = domain1  host1:host2:host3  randomize bydns;\
@@ -18034,6 +18455,10 @@ via getipnodebyname() times out, HOST_NOT_FOUND is returned instead of
 TRY_AGAIN. That is why the default action is to try a DNS lookup first. Only if
 that gives a definite "no such host" is the local function called.
 
+Compatibility: From Exim 4.85 until fixed for 4.90, there was an inadvertent
+constraint that a transport name as an option had to be the last option
+specified.
+
 If no IP address for a host can be found, what happens is controlled by the 
 host_find_failed option.
 
@@ -18395,8 +18820,8 @@ interpreted in two different ways:
   * Otherwise, the data must be a comma-separated list of redirection items, as
     described in the next section.
 
-When a message is redirected to a file (a "mail folder"), the file name given
-in a non-filter redirection list must always be an absolute path. A filter may
+When a message is redirected to a file (a "mail folder"), the filename given in
+a non-filter redirection list must always be an absolute path. A filter may
 generate a relative path - how this is handled depends on the transport's
 configuration. See section 26.1 for a discussion of this issue for the 
 appendfile transport.
@@ -18407,9 +18832,9 @@ appendfile transport.
 
 When the redirection data is not an Exim or Sieve filter, for example, if it
 comes from a conventional alias or forward file, it consists of a list of
-addresses, file names, pipe commands, or certain special items (see section
-22.6 below). The special items can be individually enabled or disabled by means
-of options whose names begin with allow_ or forbid_, depending on their default
+addresses, filenames, pipe commands, or certain special items (see section 22.6
+below). The special items can be individually enabled or disabled by means of
+options whose names begin with allow_ or forbid_, depending on their default
 values. The items in the list are separated by commas or newlines. If a comma
 is required in an item, the entire item must be enclosed in double quotes.
 
@@ -18525,14 +18950,14 @@ lists (that is, in non-filter redirection data):
 
     /home/world/minbari
 
-    is treated as a file name, but
+    is treated as a filename, but
 
     /s=molari/o=babylon/@x400gate.way
 
-    is treated as an address. For a file name, a transport must be specified
+    is treated as an address. For a filename, a transport must be specified
     using the file_transport option. However, if the generated path name ends
     with a forward slash character, it is interpreted as a directory name
-    rather than a file name, and directory_transport is used instead.
+    rather than a filename, and directory_transport is used instead.
 
     Normally, either the router or the transport specifies a user and a group
     under which to run the delivery. The default is to use the Exim user and
@@ -18616,7 +19041,7 @@ lists (that is, in non-filter redirection data):
 
     During routing for message delivery (as opposed to verification), a
     redirection containing :fail: causes an immediate failure of the incoming
-    address, whereas :defer: causes the message to remain on the queue so that
+    address, whereas :defer: causes the message to remain in the queue so that
     a subsequent delivery attempt can happen at a later time. If an address is
     deferred for too long, it will ultimately fail, because the normal retry
     rules still apply.
@@ -18826,7 +19251,7 @@ A redirect router sets up a direct delivery to a file when a path name not
 ending in a slash is specified as a new "address". The transport used is
 specified by this option, which, after expansion, must be the name of a
 configured transport. This should normally be an appendfile transport. When it
-is running, the file name is in $address_file.
+is running, the filename is in $address_file.
 
 +-------------------------------------------------------------+
 |filter_prepend_home|Use: redirect|Type: boolean|Default: true|
@@ -19488,10 +19913,10 @@ user (see below).
 +------------------------------------------------------+
 
 This option specifies a list of text headers, newline-separated (by default,
-changeable in the usual way), which are (separately) expanded and added to the
-header portion of a message as it is transported, as described in section 47.17
-. Additional header lines can also be specified by routers. If the result of
-the expansion is an empty string, or if the expansion is forced to fail, no
+changeable in the usual way 6.21), which are (separately) expanded and added to
+the header portion of a message as it is transported, as described in section
+47.17. Additional header lines can also be specified by routers. If the result
+of the expansion is an empty string, or if the expansion is forced to fail, no
 action is taken. Other expansion failures are treated as errors and cause the
 delivery to be deferred.
 
@@ -19512,8 +19937,8 @@ option does not automatically suppress them.
 +---------------------------------------------------------+
 
 This option specifies a list of header names, colon-separated (by default,
-changeable in the usual way); these headers are omitted from the message as it
-is transported, as described in section 47.17. Header removal can also be
+changeable in the usual way 6.21); these headers are omitted from the message
+as it is transported, as described in section 47.17. Header removal can also be
 specified by routers. Each list item is separately expanded. If the result of
 the expansion is an empty string, or if the expansion is forced to fail, no
 action is taken. Other expansion failures are treated as errors and cause the
@@ -20023,7 +20448,7 @@ require "fileinto";
 fileinto "folder23";
 
 In this situation, the expansion of file or directory in the transport must
-transform the relative path into an appropriate absolute file name. In the case
+transform the relative path into an appropriate absolute filename. In the case
 of Sieve filters, the name inbox must be handled. It is the name that is used
 as a result of a "keep" action in the filter. This example shows one way of
 handling this requirement:
@@ -20152,9 +20577,9 @@ it applies to the top level directory, not the maildir directories beneath.
 
 The option must be set to one of the words "anywhere", "inhome", or
 "belowhome". In the second and third cases, a home directory must have been set
-for the transport. This option is not useful when an explicit file name is
-given for normal mailbox deliveries. It is intended for the case when file
-names are generated from users' .forward files. These are usually handled by an
+for the transport. This option is not useful when an explicit filename is given
+for normal mailbox deliveries. It is intended for the case when filenames are
+generated from users' .forward files. These are usually handled by an 
 appendfile transport called address_file. See also file_must_exist.
 
 +------------------------------------------------------+
@@ -20550,9 +20975,12 @@ obvious value which users understand most easily.
 
 The value of the option is expanded, and must then be a numerical value
 (decimal point allowed), optionally followed by one of the letters K, M, or G,
-for kilobytes, megabytes, or gigabytes. If Exim is running on a system with
-large file support (Linux and FreeBSD have this), mailboxes larger than 2G can
-be handled.
+for kilobytes, megabytes, or gigabytes, optionally followed by a slash and
+further option modifiers. If Exim is running on a system with large file
+support (Linux and FreeBSD have this), mailboxes larger than 2G can be handled.
+
+The option modifier no_check can be used to force delivery even if the over
+quota condition is met. The quota gets updated as usual.
 
 Note: A value of zero is interpreted as "no quota".
 
@@ -20592,6 +21020,9 @@ can only be used if quota is also set. The value is expanded; an expansion
 failure causes delivery to be deferred. A value of zero is interpreted as "no
 quota".
 
+The option modifier no_check can be used to force delivery even if the over
+quota condition is met. The quota gets updated as usual.
+
 +--------------------------------------------------------------+
 |quota_is_inclusive|Use: appendfile|Type: boolean|Default: true|
 +--------------------------------------------------------------+
@@ -20605,14 +21036,14 @@ See quota above.
 This option applies when one of the delivery modes that writes a separate file
 for each message is being used. When Exim wants to find the size of one of
 these files in order to test the quota, it first checks quota_size_regex. If
-this is set to a regular expression that matches the file name, and it captures
+this is set to a regular expression that matches the filename, and it captures
 one string, that string is interpreted as a representation of the file's size.
 The value of quota_size_regex is not expanded.
 
 This feature is useful only when users have no shell access to their mailboxes
 - otherwise they could defeat the quota simply by renaming the files. This
 facility can be used with maildir deliveries, by setting maildir_tag to add the
-file length to the file name. For example:
+file length to the filename. For example:
 
 maildir_tag = ,S=$message_size
 quota_size_regex = ,S=(\d+)
@@ -20621,8 +21052,8 @@ An alternative to $message_size is $message_linecount, which contains the
 number of lines in the message.
 
 The regular expression should not assume that the length is at the end of the
-file name (even though maildir_tag puts it there) because maildir MUAs
-sometimes add other information onto the ends of message file names.
+filename (even though maildir_tag puts it there) because maildir MUAs sometimes
+add other information onto the ends of message filenames.
 
 Section 26.7 contains further information.
 
@@ -20793,7 +21224,7 @@ Before appending to a file, the following preparations are made:
         for writing as a new file. If this fails with an access error, delivery
         is deferred.
 
-     2. Close the hitching post file, and hard link it to the lock file name.
+     2. Close the hitching post file, and hard link it to the lock filename.
 
      3. If the call to link() succeeds, creation of the lock file has
         succeeded. Unlink the hitching post name.
@@ -20940,10 +21371,10 @@ to a file whose name is tmp/<stime>.H<mtime>P<pid>.<host> in the directory that
 is defined by the directory option (the "delivery directory"). If the delivery
 is successful, the file is renamed into the new subdirectory.
 
-In the file name, <stime> is the current time of day in seconds, and <mtime> is
+In the filename, <stime> is the current time of day in seconds, and <mtime> is
 the microsecond fraction of the time. After a maildir delivery, Exim checks
 that the time-of-day clock has moved on by at least one microsecond before
-terminating the delivery process. This guarantees uniqueness for the file name.
+terminating the delivery process. This guarantees uniqueness for the filename.
 However, as a precaution, Exim calls stat() for the file before opening it. If
 any response other than ENOENT (does not exist) is given, Exim waits 2 seconds
 and tries again, up to maildir_retries times.
@@ -21251,7 +21682,7 @@ recipient is kept when the message is specified by the transport. Note: This
 does not apply to Cc: or Bcc: recipients.
 
 If once is unset, or is set to an empty string, the message is always sent. By
-default, if once is set to a non-empty file name, the message is not sent if a
+default, if once is set to a non-empty filename, the message is not sent if a
 potential recipient is already listed in the database. However, if the 
 once_repeat option specifies a time greater than zero, the message is sent if
 that much time has elapsed since a message was last sent to this recipient. A
@@ -21529,12 +21960,12 @@ example:
 command = /bin/sh -c ${lookup{$local_part}lsearch{/some/file}}
 
 Special handling takes place when an argument consists of precisely the text
-"$pipe_addresses". This is not a general expansion variable; the only place
-this string is recognized is when it appears as an argument for a pipe or
-transport filter command. It causes each address that is being handled to be
-inserted in the argument list at that point as a separate argument. This avoids
-any problems with spaces or shell metacharacters, and is of use when a pipe
-transport is handling groups of addresses in a batch.
+"$pipe_addresses" (no quotes). This is not a general expansion variable; the
+only place this string is recognized is when it appears as an argument for a
+pipe or transport filter command. It causes each address that is being handled
+to be inserted in the argument list at that point as a separate argument. This
+avoids any problems with spaces or shell metacharacters, and is of use when a 
+pipe transport is handling groups of addresses in a batch.
 
 If force_command is enabled on the transport, Special handling takes place for
 an argument that consists of precisely the text "$address_pipe". It is handled
@@ -21805,12 +22236,10 @@ n" in message_suffix.
 |path|Use: pipe|Type: string*|Default: /bin:/usr/bin|
 +---------------------------------------------------+
 
-This option is expanded and
-
-specifies the string that is set up in the PATH environment variable of the
-subprocess. If the command option does not yield an absolute path name, the
-command is sought in the PATH directories, in the usual way. Warning: This does
-not apply to a command specified as a transport filter.
+This option is expanded and specifies the string that is set up in the PATH
+environment variable of the subprocess. If the command option does not yield an
+absolute path name, the command is sought in the PATH directories, in the usual
+way. Warning: This does not apply to a command specified as a transport filter.
 
 +------------------------------------------------------+
 |permit_coredump|Use: pipe|Type: boolean|Default: false|
@@ -22183,6 +22612,20 @@ This controls the maximum number of separate message deliveries that are sent
 over a single TCP/IP connection. If the value is zero, there is no limit. For
 testing purposes, this value can be overridden by the -oB command line option.
 
++---------------------------------------------------------------+
+|dane_require_tls_ciphers|Use: smtp|Type: string*|Default: unset|
++---------------------------------------------------------------+
+
+This option may be used to override tls_require_ciphers for connections where
+DANE has been determined to be in effect. If not set, then tls_require_ciphers
+will be used. Normal SMTP delivery is not able to make strong demands of TLS
+cipher configuration, because delivery will fall back to plaintext. Once DANE
+has been determined to be in effect, there is no plaintext fallback and making
+the TLS cipherlist configuration stronger will increase security, rather than
+counter-intuitively decreasing it. If the option expands to be empty or is
+forced to fail, then it will be treated as unset and tls_require_ciphers will
+be used instead.
+
 +---------------------------------------------+
 |data_timeout|Use: smtp|Type: time|Default: 5m|
 +---------------------------------------------+
@@ -22191,31 +22634,43 @@ This sets a timeout for the transmission of each block in the data portion of
 the message. As a result, the overall timeout for a message depends on the size
 of the message. Its value must not be zero. See also final_timeout.
 
-+--------------------------------------------------+
-|dkim_domain|Use: smtp|Type: string*|Default: unset|
-+--------------------------------------------------+
++-------------------------------------------------+
+|dkim_canon|Use: smtp|Type: string*|Default: unset|
++-------------------------------------------------+
+
++-------------------------------------------------+
+|dkim_domain|Use: smtp|Type: string|Default: list*|
++-------------------------------------------------+
+
++-------------------------------------------------+
+|dkim_hash|Use: smtp|Type: string*|Default: sha256|
++-------------------------------------------------+
 
 +----------------------------------------------------+
-|dkim_selector|Use: smtp|Type: string*|Default: unset|
+|dkim_identity|Use: smtp|Type: string*|Default: unset|
 +----------------------------------------------------+
 
 +-------------------------------------------------------+
 |dkim_private_key|Use: smtp|Type: string*|Default: unset|
 +-------------------------------------------------------+
 
-+-------------------------------------------------+
-|dkim_canon|Use: smtp|Type: string*|Default: unset|
-+-------------------------------------------------+
++----------------------------------------------------+
+|dkim_selector|Use: smtp|Type: string*|Default: unset|
++----------------------------------------------------+
 
 +--------------------------------------------------+
 |dkim_strict|Use: smtp|Type: string*|Default: unset|
 +--------------------------------------------------+
 
-+--------------------------------------------------------+
-|dkim_sign_headers|Use: smtp|Type: string*|Default: unset|
-+--------------------------------------------------------+
++----------------------------------------------------------+
+|dkim_sign_headers|Use: smtp|Type: string*|Default: per RFC|
++----------------------------------------------------------+
+
++------------------------------------------------------+
+|dkim_timestamps|Use: smtp|Type: string*|Default: unset|
++------------------------------------------------------+
 
-DKIM signing options. For details see section 57.1.
+DKIM signing options. For details see section 57.2.
 
 +--------------------------------------------------------+
 |delay_after_cutoff|Use: smtp|Type: boolean|Default: true|
@@ -22460,6 +22915,21 @@ been started will not be passed to a new delivery process for sending another
 message on the same connection. See section 42.11 for an explanation of when
 this might be needed.
 
++-------------------------------------------------------+
+|hosts_noproxy_tls|Use: smtp|Type: host list*|Default: *|
++-------------------------------------------------------+
+
+For any host that matches this list, a TLS session which has been started will
+not be passed to a new delivery process for sending another message on the same
+session.
+
+The traditional implementation closes down TLS and re-starts it in the new
+process, on the same open TCP connection, for each successive message sent. If
+permitted by this option a pipe to to the new process is set up instead, and
+the original process maintains the TLS connection and proxies the SMTP
+connection from and to the new process and any subsequents. The new process has
+no access to TLS information, so cannot include it in logging.
+
 +-----------------------------------------------------+
 |hosts_override|Use: smtp|Type: boolean|Default: false|
 +-----------------------------------------------------+
@@ -22510,6 +22980,15 @@ Exim will request a Certificate Status on a TLS session for any host that
 matches this list. tls_verify_certificates should also be set for the
 transport.
 
++------------------------------------------------------------+
+|hosts_require_dane|Use: smtp|Type: host list*|Default: unset|
++------------------------------------------------------------+
+
+If built with DANE support, Exim will require that a DNSSEC-validated TLSA
+record is present for any host matching the list, and that a DANE-verified TLS
+connection is made. There will be no fallback to in-clear communication. See
+section 42.15.
+
 +------------------------------------------------------------+
 |hosts_require_ocsp|Use: smtp|Type: host list*|Default: unset|
 +------------------------------------------------------------+
@@ -22545,9 +23024,18 @@ This option provides a list of servers to which, provided they announce
 CHUNKING support, Exim will attempt to use BDAT commands rather than DATA. BDAT
 will not be used in conjunction with a transport filter.
 
-+-------------------------------------------------------------+
-|hosts_try_fastopen|Use: smtp|Type: host list!!|Default: unset|
-+-------------------------------------------------------------+
++--------------------------------------------------------+
+|hosts_try_dane|Use: smtp|Type: host list*|Default: unset|
++--------------------------------------------------------+
+
+If built with DANE support, Exim will lookup a TLSA record for any host
+matching the list. If found and verified by DNSSEC, a DANE-verified TLS
+connection is made to that host; there will be no fallback to in-clear
+communication. See section 42.15.
+
++------------------------------------------------------------+
+|hosts_try_fastopen|Use: smtp|Type: host list*|Default: unset|
++------------------------------------------------------------+
 
 This option provides a list of servers to which, provided the facility is
 supported by this system, Exim will attempt to perform a TCP Fast Open. No data
@@ -22559,7 +23047,10 @@ The facility is only active for previously-contacted servers, as the initiator
 must present a cookie in the SYN segment.
 
 On (at least some) current Linux distributions the facility must be enabled in
-the kernel by the sysadmin before the support is usable.
+the kernel by the sysadmin before the support is usable. There is no option for
+control of the server side; if the system supports it it is always enabled.
+Note that lengthy operations in the connect ACL, such as DNSBL lookups, will
+still delay the emission of the SMTP banner.
 
 +----------------------------------------------------+
 |hosts_try_prdr|Use: smtp|Type: host list*|Default: *|
@@ -22587,7 +23078,7 @@ $host_address refer to the host to which a connection is about to be made
 during the expansion of the string. Forced expansion failure, or an empty
 string result causes the option to be ignored. Otherwise, after expansion, the
 string must be a list of IP addresses, colon-separated by default, but the
-separator can be changed in the usual way. For example:
+separator can be changed in the usual way (6.21). For example:
 
 interface = <; 192.168.123.123 ; 3ffe:ffff:836f::fe86:a061
 
@@ -22653,8 +23144,12 @@ variable that contains an outgoing port.
 
 If the value of this option begins with a digit it is taken as a port number;
 otherwise it is looked up using getservbyname(). The default value is normally
-"smtp", but if protocol is set to "lmtp", the default is "lmtp". If the
-expansion fails, or if a port number cannot be found, delivery is deferred.
+"smtp", but if protocol is set to "lmtp" the default is "lmtp" and if protocol
+is set to "smtps" the default is "smtps". If the expansion fails, or if a port
+number cannot be found, delivery is deferred.
+
+Note that at least one Linux distribution has been seen failing to put "smtps"
+in its "/etc/services" file, resulting is such deferrals.
 
 +---------------------------------------------+
 |protocol|Use: smtp|Type: string|Default: smtp|
@@ -22668,8 +23163,11 @@ over a pipe to a local process - see chapter 28.
 
 If this option is set to "smtps", the default value for the port option changes
 to "smtps", and the transport initiates TLS immediately after connecting, as an
-outbound SSL-on-connect, instead of using STARTTLS to upgrade. The Internet
-standards bodies strongly discourage use of this mode.
+outbound SSL-on-connect, instead of using STARTTLS to upgrade.
+
+The Internet standards bodies used to strongly discourage use of this mode, but
+as of RFC 8314 it is perferred over STARTTLS for message submission (as
+distinct from MTA-MTA communication).
 
 +---------------------------------------------------------------+
 |retry_include_ip_address|Use: smtp|Type: boolean*|Default: true|
@@ -22875,6 +23373,13 @@ certificate verification must succeed. The tls_verify_certificates option must
 also be set. If both this option and tls_try_verify_hosts are unset operation
 is as if this option selected all hosts.
 
++---------------------------------------------------------+
+|utf8_downconvert|Use: smtp|Type: integer!!|Default: unset|
++---------------------------------------------------------+
+
+If built with internationalization support, this option controls conversion of
+UTF-8 in message addresses to a-label form. For details see section 59.1.
+
 
 30.5 How the limits for the number of hosts to try are used
 -----------------------------------------------------------
@@ -23064,7 +23569,7 @@ transport time.
 31.3 Testing the rewriting rules that apply on input
 ----------------------------------------------------
 
-Exim's input rewriting configuration appears in a part of the run time
+Exim's input rewriting configuration appears in a part of the runtime
 configuration file headed by "begin rewrite". It can be tested by the -brw
 command line option. This takes an address (which can be a full RFC 2822
 address) as its argument. The output is a list of how the address would be
@@ -23382,7 +23887,7 @@ rules that control how often Exim tries to deliver messages that cannot be
 delivered at the first attempt. If there are no retry rules (the section is
 empty or not present), there are no retries. In this situation, temporary
 errors are treated as permanent. The default configuration contains a single,
-general-purpose retry rule (see section 7.5). The -brt command line option can
+general-purpose retry rule (see section 7.6). The -brt command line option can
 be used to test which retry rule will be used for a given address, domain and
 error.
 
@@ -23854,11 +24359,12 @@ post-cutoff retry time is not used.
 
 If the delivery is remote, there are two possibilities, controlled by the 
 delay_after_cutoff option of the smtp transport. The option is true by default.
-Until the post-cutoff retry time for one of the IP addresses is reached, the
-failing email address is bounced immediately, without a delivery attempt taking
-place. After that time, one new delivery attempt is made to those IP addresses
-that are past their retry times, and if that still fails, the address is
-bounced and new retry times are computed.
+Until the post-cutoff retry time for one of the IP addresses, as set by the 
+retry_data_expire option, is reached, the failing email address is bounced
+immediately, without a delivery attempt taking place. After that time, one new
+delivery attempt is made to those IP addresses that are past their retry times,
+and if that still fails, the address is bounced and new retry times are
+computed.
 
 In other words, when all the hosts for a given email address have been failing
 for a long time, Exim bounces rather then defers until one of the hosts' retry
@@ -23886,7 +24392,7 @@ intermittently available, or when a message has some attribute that prevents
 its delivery when others to the same address get through. In this situation,
 because some messages are successfully delivered, the "retry clock" for the
 host or address keeps getting reset by the successful deliveries, and so
-failing messages remain on the queue for ever because the cutoff time is never
+failing messages remain in the queue for ever because the cutoff time is never
 reached.
 
 Two exceptional actions are applied to prevent this happening. The first
@@ -23909,7 +24415,7 @@ considered immediately.
 ===============================================================================
 33. SMTP AUTHENTICATION
 
-The "authenticators" section of Exim's run time configuration is concerned with
+The "authenticators" section of Exim's runtime configuration is concerned with
 SMTP authentication. This facility is an extension to the SMTP protocol,
 described in RFC 2554, which allows a client SMTP host to authenticate itself
 to a server. This is a common way for a server to recognize clients that are
@@ -24129,8 +24635,9 @@ expanded using data from the authentication, and preserved for any incoming
 messages in the variable $authenticated_id. It is also included in the log
 lines for incoming messages. For example, a user/password authenticator
 configuration might preserve the user name that was used to authenticate, and
-refer to it subsequently during delivery of the message. If expansion fails,
-the option is ignored.
+refer to it subsequently during delivery of the message. On a failing
+authentication the expansion result is instead saved in the
+$authenticated_fail_id variable. If expansion fails, the option is ignored.
 
 +---------------------------------------------------------------------------+
 |server_mail_auth_condition|Use: authenticators|Type: string*|Default: unset|
@@ -24252,6 +24759,9 @@ name) of the authenticator driver that successfully authenticated the client
 from which the message was received. This variable is empty if there was no
 successful authentication.
 
+Successful authentication sets up information used by the $authresults
+expansion item.
+
 
 33.4 Testing server authentication
 ----------------------------------
@@ -24335,12 +24845,13 @@ authentication, and the host matches an entry in either of these options, Exim
     second case, Exim tries to deliver the message unauthenticated.
 
 Note that the hostlist test for whether to do authentication can be confused if
-name-IP lookups change between the time the peer is decided on and the
-transport running. For example, with a manualroute router given a host name,
-and DNS "round-robin" use by that name: if the local resolver cache times out
-between the router and the transport running, the transport may get an IP for
-the name for its authentication check which does not match the connection peer
-IP. No authentication will then be done, despite the names being identical.
+name-IP lookups change between the time the peer is decided upon and the time
+that the transport runs. For example, with a manualroute router given a host
+name, and with DNS "round-robin" used by that name: if the local resolver cache
+times out between the router and the transport running, the transport may get
+an IP for the name for its authentication check which does not match the
+connection peer IP. No authentication will then be done, despite the names
+being identical.
 
 For such cases use a separate transport which always authenticates.
 
@@ -24417,7 +24928,7 @@ result of a successful expansion is an empty string, "0", "no", or "false",
 authentication fails. If the result of the expansion is "1", "yes", or "true",
 authentication succeeds and the generic server_set_id option is expanded and
 saved in $authenticated_id. For any other result, a temporary error code is
-returned, with the expanded string as the error text
+returned, with the expanded string as the error text.
 
 Warning: If you use a lookup in the expansion to find the user's password, be
 sure to make the authentication fail if the user is unknown. There are good and
@@ -24734,8 +25245,8 @@ fixed_cram:
 ===============================================================================
 36. THE CYRUS_SASL AUTHENTICATOR
 
-The code for this authenticator was provided by Matthew Byng-Maddick of A L
-Digital Ltd (http://www.aldigital.co.uk).
+The code for this authenticator was provided by Matthew Byng-Maddick while at A
+L Digital Ltd.
 
 The cyrus_sasl authenticator provides server support for the Cyrus SASL library
 implementation of the RFC 2222 ("Simple Authentication and Security Layer").
@@ -24748,7 +25259,7 @@ Cyrus interface, so if your Cyrus library can do, for example, CRAM-MD5, then
 so can the cyrus_sasl authenticator. By default it uses the public name of the
 driver to determine which mechanism to support.
 
-Where access to some kind of secret file is required, for example in GSSAPI or
+Where access to some kind of secret file is required, for example, in GSSAPI or
 CRAM-MD5, it is worth noting that the authenticator runs as the Exim user, and
 that the Cyrus SASL library has no way of escalating privileges by default. You
 may also find you need to set environment variables, depending on the driver
@@ -24848,7 +25359,7 @@ only. There is only one option:
 |server_socket|Use: dovecot|Type: string|Default: unset|
 +------------------------------------------------------+
 
-This option must specify the socket that is the interface to Dovecot
+This option must specify the UNIX socket that is the interface to Dovecot
 authentication. The public_name option must specify an authentication mechanism
 that Dovecot is configured to support. You can have several authenticators for
 different mechanisms. For example:
@@ -24884,27 +25395,36 @@ future authentication mechanisms, so no guarantee can be made that any
 particular new authentication mechanism will be supported without code changes
 in Exim.
 
+Exim's gsasl authenticator does not have client-side support at this time; only
+the server-side support is implemented. Patches welcome.
+
 +-------------------------------------------------------------+
 |server_channelbinding|Use: gsasl|Type: boolean|Default: false|
 +-------------------------------------------------------------+
 
+Do not set this true without consulting a cryptographic engineer.
+
 Some authentication mechanisms are able to use external context at both ends of
 the session to bind the authentication to that context, and fail the
 authentication process if that context differs. Specifically, some TLS
 ciphersuites can provide identifying information about the cryptographic
 context.
 
-This means that certificate identity and verification becomes a non-issue, as a
-man-in-the-middle attack will cause the correct client and server to see
-different identifiers and authentication will fail.
+This should have meant that certificate identity and verification becomes a
+non-issue, as a man-in-the-middle attack will cause the correct client and
+server to see different identifiers and authentication will fail.
 
 This is currently only supported when using the GnuTLS library. This is only
 usable by mechanisms which support "channel binding"; at time of writing,
 that's the SCRAM family.
 
 This defaults off to ensure smooth upgrade across Exim releases, in case this
-option causes some clients to start failing. Some future release of Exim may
-switch the default to be true.
+option causes some clients to start failing. Some future release of Exim might
+have switched the default to be true.
+
+However, Channel Binding in TLS has proven to be broken in current versions. Do
+not plan to rely upon this feature for security, ever, without consulting with
+a subject matter expert (a cryptographic engineer).
 
 +-----------------------------------------------------------+
 |server_hostname|Use: gsasl|Type: string*|Default: see below|
@@ -25076,8 +25596,8 @@ For instance, "joe/admin@EXAMPLE.ORG".
 The spa authenticator provides client support for Microsoft's Secure Password
 Authentication mechanism, which is also sometimes known as NTLM (NT LanMan).
 The code for client side of this authenticator was contributed by Marc
-Prud'hommeaux, and much of it is taken from the Samba project (http://
-www.samba.org). The code for the server side was subsequently contributed by
+Prud'hommeaux, and much of it is taken from the Samba project (https://
+www.samba.org/). The code for the server side was subsequently contributed by
 Tom Kistner. The mechanism works as follows:
 
   * After the AUTH command has been accepted, the client sends an SPA
@@ -25199,19 +25719,23 @@ tls:
   driver = tls
   server_param1 =     ${certextract {subj_altname,mail,>:} \
                                     {$tls_in_peercert}}
-  server_condition =  ${if forany {$auth1} \
+  server_condition =  ${if and { {eq{$tls_in_certificate_verified}{1}} \
+                                 {forany {$auth1} \
                             {!= {0} \
                                 {${lookup ldap{ldap:///\
                          mailname=${quote_ldap_dn:${lc:$item}},\
                          ou=users,LDAP_DC?mailid} {$value}{0} \
-                       }    }   } }
+                       }    }  } }}}
   server_set_id =     ${if = {1}{${listcount:$auth1}} {$auth1}{}}
 
 This accepts a client certificate that is verifiable against any of your
 configured trust-anchors (which usually means the full set of public CAs) and
-which has a SAN with a good account name. Note that the client cert is on the
-wire in-clear, including the SAN, whereas a plaintext SMTP AUTH done inside TLS
-is not.
+which has a SAN with a good account name.
+
+Note that, up to TLS1.2, the client cert is on the wire in-clear, including the
+SAN, The account name is therefore guessable by an opponent. TLS 1.3 protects
+both server and client certificates, and is not vulnerable in this way.
+Likewise, a traditional plaintext SMTP AUTH done inside TLS is not.
 
 Note that because authentication is traditionally an SMTP operation, the 
 authenticated ACL condition cannot be used in a connect- or helo-ACL.
@@ -25247,19 +25771,29 @@ TLS connections. You need to turn off SMTP scanning for these products in order
 to get TLS to work.
 
 
-42.1 Support for the legacy "ssmtp" (aka "smtps") protocol
-----------------------------------------------------------
+42.1 Support for the "submissions" (aka "ssmtp" and "smtps") protocol
+---------------------------------------------------------------------
+
+The history of port numbers for TLS in SMTP is a little messy and has been
+contentious. As of RFC 8314, the common practice of using the historically
+allocated port 465 for "email submission but with TLS immediately upon connect
+instead of using STARTTLS" is officially blessed by the IETF, and recommended
+by them in preference to STARTTLS.
 
-Early implementations of encrypted SMTP used a different TCP port from normal
-SMTP, and expected an encryption negotiation to start immediately, instead of
-waiting for a STARTTLS command from the client using the standard SMTP port.
-The protocol was called "ssmtp" or "smtps", and port 465 was allocated for this
-purpose.
+The name originally assigned to the port was "ssmtp" or "smtps", but as clarity
+emerged over the dual roles of SMTP, for MX delivery and Email Submission,
+nomenclature has shifted. The modern name is now "submissions".
 
-This approach was abandoned when encrypted SMTP was standardized, but there are
-still some legacy clients that use it. Exim supports these clients by means of
-the tls_on_connect_ports global option. Its value must be a list of port
-numbers; the most common use is expected to be:
+This approach was, for a while, officially abandoned when encrypted SMTP was
+standardized, but many clients kept using it, even as the TCP port number was
+reassigned for other use. Thus you may encounter guidance claiming that you
+shouldn't enable use of this port. In practice, a number of mail-clients have
+only ever supported submissions, not submission with STARTTLS upgrade. Ideally,
+offer both submission (587) and submissions (465) service.
+
+Exim supports TLS-on-connect by means of the tls_on_connect_ports global
+option. Its value must be a list of port numbers; the most common use is
+expected to be:
 
 tls_on_connect_ports = 465
 
@@ -25270,7 +25804,7 @@ command line option) because tls_on_connect_ports does not add an extra port -
 rather, it specifies different behaviour on a port that is defined elsewhere.
 
 There is also a -tls-on-connect command line option. This overrides 
-tls_on_connect_ports; it forces the legacy behaviour for all ports.
+tls_on_connect_ports; it forces the TLS-only behaviour for all ports.
 
 
 42.2 OpenSSL vs GnuTLS
@@ -25318,6 +25852,9 @@ There are some differences in usage when using GnuTLS instead of OpenSSL:
     be configured in this way, let the Exim Maintainers know and we'll likely
     use it).
 
+  * With GnuTLS, if an explicit list is used for the tls_privatekey main option
+    main option, it must be ordered to match the tls_certificate list.
+
   * Some other recently added features may only be available in one or the
     other. This should be documented with the feature. If the documentation
     does not explicitly state that the feature is infeasible in the other TLS
@@ -25412,10 +25949,13 @@ the generated prime, so it might still be too large.
 
 There is a function in the OpenSSL library that can be passed a list of cipher
 suites before the cipher negotiation takes place. This specifies which ciphers
-are acceptable. The list is colon separated and may contain names like
-DES-CBC3-SHA. Exim passes the expanded value of tls_require_ciphers directly to
-this function call. Many systems will install the OpenSSL manual-pages, so you
-may have ciphers(1) available to you. The following quotation from the OpenSSL
+
+are acceptable for TLS versions prior to 1.3.
+
+The list is colon separated and may contain names like DES-CBC3-SHA. Exim
+passes the expanded value of tls_require_ciphers directly to this function
+call. Many systems will install the OpenSSL manual-pages, so you may have 
+ciphers(1) available to you. The following quotation from the OpenSSL
 documentation specifies what forms of item are allowed in the cipher string:
 
   * It can consist of a single cipher suite such as RC4-SHA.
@@ -25463,6 +26003,18 @@ tls_require_ciphers = ${if =={$received_port}{25}\
                            {DEFAULT}\
                            {HIGH:!MD5:!SHA1}}
 
+This example will prefer ECDSA-authenticated ciphers over RSA ones:
+
+tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT
+
+For TLS version 1.3 the control available is less fine-grained and Exim does
+not provide access to it at present. The value of the tls_require_ciphers
+option is ignored when TLS version 1.3 is negotiated.
+
+As of writing the library default cipher suite list for TLSv1.3 is
+
+TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
+
 
 42.5 Requiring specific ciphers or other parameters in GnuTLS
 -------------------------------------------------------------
@@ -25482,10 +26034,10 @@ given to the GnuTLS library, so that Exim does not need to be aware of future
 feature enhancements of GnuTLS.
 
 Documentation of the strings accepted may be found in the GnuTLS manual, under
-"Priority strings". This is online as http://www.gnutls.org/manual/html_node/
+"Priority strings". This is online as https://www.gnutls.org/manual/html_node/
 Priority-Strings.html, but beware that this relates to GnuTLS 3, which may be
 newer than the version installed on your system. If you are using GnuTLS 3,
-then the example code http://www.gnutls.org/manual/gnutls.html#
+then the example code https://www.gnutls.org/manual/gnutls.html#
 Listing-the-ciphersuites-in-a-priority-string on that site can be used to test
 a given string.
 
@@ -25515,10 +26067,12 @@ tls_require_ciphers = ${if =={$received_port}{25}\
 
 When Exim has been built with TLS support, it advertises the availability of
 the STARTTLS command to client hosts that match tls_advertise_hosts, but not to
-any others. The default value of this option is unset, which means that
-STARTTLS is not advertised at all. This default is chosen because you need to
-set some other options in order to make TLS available, and also it is sensible
-for systems that want to use TLS only as a client.
+any others. The default value of this option is *, which means that STARTTLS is
+always advertised. Set it to blank to never advertise; this is reasonable for
+systems that want to use TLS only as a client.
+
+If STARTTLS is to be used you need to set some other options in order to make
+TLS available.
 
 If a client issues a STARTTLS command and there is some configuration problem
 in the server, the command is rejected with a 454 error. If the client persists
@@ -25539,8 +26093,7 @@ someone able to intercept the communication.
 
 Further protection requires some further configuration at the server end.
 
-It is rumoured that all existing clients that support TLS/SSL use RSA
-encryption. To make this work you need to set, in the server,
+To make TLS work you need to set, in the server,
 
 tls_certificate = /some/file/name
 tls_privatekey = /some/file/name
@@ -25556,6 +26109,13 @@ is forced to fail or results in an empty string, this is assumed to be the
 case. The certificate file may also contain intermediate certificates that need
 to be sent to the client to enable it to authenticate the server's certificate.
 
+For dual-stack (eg. RSA and ECDSA) configurations, these options can be
+colon-separated lists of file paths. Ciphers using given authentication
+algorithms require the presence of a suitable certificate to supply the
+public-key. The server selects among the certificates to present to the client
+depending on the selected cipher, hence the priority ordering for ciphers will
+affect which certificate is used.
+
 If you do not understand about certificates and keys, please try to find a
 source of this background information, which is not Exim-specific. (There are a
 few comments below in section 42.12.)
@@ -25620,9 +26180,9 @@ tls_try_verify_hosts. You can, of course, set either of them to * to apply to
 all TLS connections. For any host that matches one of these options, Exim
 requests a certificate as part of the setup of the TLS session. The contents of
 the certificate are verified by comparing it with a list of expected
-certificates. These may be the system default set (depending on library
-version), an explicit file or, depending on library version, a directory,
-identified by tls_verify_certificates.
+trust-anchors or certificates. These may be the system default set (depending
+on library version), an explicit file or, depending on library version, a
+directory, identified by tls_verify_certificates.
 
 A file can contain multiple certificates, concatenated end to end. If a
 directory is used (OpenSSL only), each certificate must be in a separate file,
@@ -25634,6 +26194,9 @@ openssl x509 -hash -noout -in /cert/file
 
 where /cert/file contains a single certificate.
 
+There is no checking of names of the client against the certificate Subject
+Name or Subject Alternate Names.
+
 The difference between tls_verify_hosts and tls_try_verify_hosts is what
 happens if the client does not supply a certificate, or if the certificate does
 not match any of the certificates in the collection named by 
@@ -25764,9 +26327,8 @@ or tls_try_verify_hosts matches the client.
 
 If the tls_verify_certificates option is set on the smtp transport, it
 specifies a collection of expected server certificates. These may be the system
-default set (depending on library version), a file or, depending on library
-version, a directory, must name a file or, for OpenSSL only (not GnuTLS), a
-directory. The client verifies the server's certificate against this
+default set (depending on library version), a file, or (depending on library
+version) a directory. The client verifies the server's certificate against this
 collection, taking into account any revoked certificates that are in the list
 defined by tls_crl. Failure to verify fails the TLS connection unless either of
 the tls_verify_hosts or tls_try_verify_hosts options are set.
@@ -25775,6 +26337,10 @@ The tls_verify_hosts and tls_try_verify_hosts options restrict certificate
 verification to the listed servers. Verification either must or need not
 succeed respectively.
 
+The tls_verify_cert_hostnames option lists hosts for which additional checks
+are made: that the host name (the one in the DNS A record) is valid for the
+certificate. The option defaults to always checking.
+
 The smtp transport has two OCSP-related options: hosts_require_ocsp; a
 host-list for which a Certificate Status is requested and required for the
 connection to proceed. The default value is empty. hosts_request_ocsp; a
@@ -25883,10 +26449,17 @@ entirely new delivery process for each message, passing the socket from one
 process to the next. This implementation does not fit well with the use of TLS,
 because there is quite a lot of state information associated with a TLS
 connection, not just a socket identification. Passing all the state information
-to a new process is not feasible. Consequently, Exim shuts down an existing TLS
-session before passing the socket to a new process. The new process may then
-try to start a new TLS session, and if successful, may try to re-authenticate
-if AUTH is in use, before sending the next message.
+to a new process is not feasible. Consequently, for sending using TLS Exim
+starts an additional proxy process for handling the encryption, piping the
+unencrypted data stream from and to the delivery processes.
+
+An older mode of operation can be enabled on a per-host basis by the 
+hosts_noproxy_tls option on the smtp transport. If the host matches this list
+the proxy process described above is not used; instead Exim shuts down an
+existing TLS session being run by the delivery process before passing the
+socket to a new process. The new process may then try to start a new TLS
+session, and if successful, may try to re-authenticate if AUTH is in use,
+before sending the next message.
 
 The RFC is not clear as to whether or not an SMTP session continues in clear
 after TLS has been shut down, or whether TLS may be restarted again later, as
@@ -25912,19 +26485,25 @@ new processes if TLS has been used.
 -------------------------------
 
 In order to understand fully how TLS works, you need to know about
-certificates, certificate signing, and certificate authorities. This is not the
-place to give a tutorial, especially as I do not know very much about it
-myself. Some helpful introduction can be found in the FAQ for the SSL addition
-to Apache, currently at
+certificates, certificate signing, and certificate authorities. This is a large
+topic and an introductory guide is unsuitable for the Exim reference manual, so
+instead we provide pointers to existing documentation.
+
+The Apache web-server was for a long time the canonical guide, so their
+documentation is a good place to start; their SSL module's Introduction
+document is currently at
 
-http://www.modssl.org/docs/2.7/ssl_faq.html#ToC24
+https://httpd.apache.org/docs/current/ssl/ssl_intro.html
 
-Other parts of the modssl documentation are also helpful, and have links to
-further files. Eric Rescorla's book, SSL and TLS, published by Addison-Wesley
-(ISBN 0-201-61598-3), contains both introductory and more in-depth
-descriptions. Some sample programs taken from the book are available from
+and their FAQ is at
 
-http://www.rtfm.com/openssl-examples/
+https://httpd.apache.org/docs/current/ssl/ssl_faq.html
+
+Eric Rescorla's book, SSL and TLS, published by Addison-Wesley (ISBN
+0-201-61598-3) in 2001, contains both introductory and more in-depth
+descriptions. More recently Ivan Risti?'s book Bulletproof SSL and TLS,
+published by Feisty Duck (ISBN 978-1907117046) in 2013 is good. Ivan is the
+author of the popular TLS testing tools at https://www.ssllabs.com/.
 
 
 42.13 Certificate chains
@@ -25988,14 +26567,204 @@ that self-signed certificate.
 
 For information on creating self-signed CA certificates and using them to sign
 user certificates, see the General implementation overview chapter of the
-Open-source PKI book, available online at http://ospkibook.sourceforge.net/.
+Open-source PKI book, available online at https://sourceforge.net/projects/
+ospkibook/.
+
+
+42.15 DANE
+----------
+
+DNS-based Authentication of Named Entities, as applied to SMTP over TLS,
+provides assurance to a client that it is actually talking to the server it
+wants to rather than some attacker operating a Man In The Middle (MITM)
+operation. The latter can terminate the TLS connection you make, and make
+another one to the server (so both you and the server still think you have an
+encrypted connection) and, if one of the "well known" set of Certificate
+Authorities has been suborned - something which *has* been seen already (2014),
+a verifiable certificate (if you're using normal root CAs, eg. the Mozilla set,
+as your trust anchors).
+
+What DANE does is replace the CAs with the DNS as the trust anchor. The
+assurance is limited to a) the possibility that the DNS has been suborned, b)
+mistakes made by the admins of the target server. The attack surface presented
+by (a) is thought to be smaller than that of the set of root CAs.
+
+It also allows the server to declare (implicitly) that connections to it should
+use TLS. An MITM could simply fail to pass on a server's STARTTLS.
+
+DANE scales better than having to maintain (and side-channel communicate)
+copies of server certificates for every possible target server. It also scales
+(slightly) better than having to maintain on an SMTP client a copy of the
+standard CAs bundle. It also means not having to pay a CA for certificates.
+
+DANE requires a server operator to do three things: 1) run DNSSEC. This
+provides assurance to clients that DNS lookups they do for the server have not
+been tampered with. The domain MX record applying to this server, its A record,
+its TLSA record and any associated CNAME records must all be covered by DNSSEC.
+2) add TLSA DNS records. These say what the server certificate for a TLS
+connection should be. 3) offer a server certificate, or certificate chain, in
+TLS connections which is is anchored by one of the TLSA records.
+
+There are no changes to Exim specific to server-side operation of DANE. Support
+for client-side operation of DANE can be included at compile time by defining
+SUPPORT_DANE=yes in Local/Makefile. If it has been included, the macro
+"_HAVE_DANE" will be defined.
+
+The TLSA record for the server may have "certificate usage" of DANE-TA(2) or
+DANE-EE(3). These are the "Trust Anchor" and "End Entity" variants. The latter
+specifies the End Entity directly, i.e. the certificate involved is that of the
+server (and if only DANE-EE is used then it should be the sole one transmitted
+during the TLS handshake); this is appropriate for a single system, using a
+self-signed certificate. DANE-TA usage is effectively declaring a specific CA
+to be used; this might be a private CA or a public, well-known one. A private
+CA at simplest is just a self-signed certificate (with certain attributes)
+which is used to sign server certificates, but running one securely does
+require careful arrangement. With DANE-TA, as implemented in Exim and commonly
+in other MTAs, the server TLS handshake must transmit the entire certificate
+chain from CA to server-certificate. DANE-TA is commonly used for several
+services and/or servers, each having a TLSA query-domain CNAME record, all of
+which point to a single TLSA record. DANE-TA and DANE-EE can both be used
+together.
+
+Our recommendation is to use DANE with a certificate from a public CA, because
+this enables a variety of strategies for remote clients to verify your
+certificate. You can then publish information both via DANE and another
+technology, "MTA-STS", described below.
+
+When you use DANE-TA to publish trust anchor information, you ask entities
+outside your administrative control to trust the Certificate Authority for
+connections to you. If using a private CA then you should expect others to
+still apply the technical criteria they'd use for a public CA to your
+certificates. In particular, you should probably try to follow current best
+practices for CA operation around hash algorithms and key sizes. Do not expect
+other organizations to lower their security expectations just because a
+particular profile might be reasonable for your own internal use.
+
+When this text was last updated, this in practice means to avoid use of SHA-1
+and MD5; if using RSA to use key sizes of at least 2048 bits (and no larger
+than 4096, for interoperability); to use keyUsage fields correctly; to use
+random serial numbers. The list of requirements is subject to change as best
+practices evolve. If you're not already using a private CA, or it doesn't meet
+these requirements, then we encourage you to avoid all these issues and use a
+public CA such as Let's Encrypt instead.
+
+The TLSA record should have a Selector field of SPKI(1) and a Matching Type
+field of SHA2-512(2).
+
+At the time of writing, https://www.huque.com/bin/gen_tlsa is useful for
+quickly generating TLSA records; and commands like
+
+  openssl x509 -in -pubkey -noout <certificate.pem \
+  | openssl rsa -outform der -pubin 2>/dev/null \
+  | openssl sha512 \
+  | awk '{print $2}'
+
+are workable for 4th-field hashes.
+
+For use with the DANE-TA model, server certificates must have a correct name
+(SubjectName or SubjectAltName).
+
+The Certificate issued by the CA published in the DANE-TA model should be
+issued using a strong hash algorithm. Exim, and importantly various other MTAs
+sending to you, will not re-enable hash algorithms which have been disabled by
+default in TLS libraries. This means no MD5 and no SHA-1. SHA2-256 is the
+minimum for reliable interoperability (and probably the maximum too, in 2018).
+
+The use of OCSP-stapling should be considered, allowing for fast revocation of
+certificates (which would otherwise be limited by the DNS TTL on the TLSA
+records). However, this is likely to only be usable with DANE-TA. NOTE: the
+default of requesting OCSP for all hosts is modified iff DANE is in use, to:
+
+  hosts_request_ocsp = ${if or { {= {0}{$tls_out_tlsa_usage}} \
+                                 {= {4}{$tls_out_tlsa_usage}} } \
+                         {*}{}}
+
+The (new) variable $tls_out_tlsa_usage is a bitfield with numbered bits set for
+TLSA record usage codes. The zero above means DANE was not in use, the four
+means that only DANE-TA usage TLSA records were found. If the definition of 
+hosts_request_ocsp includes the string "tls_out_tlsa_usage", they are
+re-expanded in time to control the OCSP request.
+
+This modification of hosts_request_ocsp is only done if it has the default
+value of "*". Admins who change it, and those who use hosts_require_ocsp,
+should consider the interaction with DANE in their OCSP settings.
+
+For client-side DANE there are three new smtp transport options, hosts_try_dane
+, hosts_require_dane and dane_require_tls_ciphers. The require variant will
+result in failure if the target host is not DNSSEC-secured.
+
+DANE will only be usable if the target host has DNSSEC-secured MX, A and TLSA
+records.
+
+A TLSA lookup will be done if either of the above options match and the
+host-lookup succeeded using dnssec. If a TLSA lookup is done and succeeds, a
+DANE-verified TLS connection will be required for the host. If it does not, the
+host will not be used; there is no fallback to non-DANE or non-TLS.
+
+If DANE is requested and usable, then the TLS cipher list configuration prefers
+to use the option dane_require_tls_ciphers and falls back to 
+tls_require_ciphers only if that is unset. This lets you configure "decent
+crypto" for DANE and "better than nothing crypto" as the default. Note though
+that while GnuTLS lets the string control which versions of TLS/SSL will be
+negotiated, OpenSSL does not and you're limited to ciphersuite constraints.
+
+If DANE is requested and useable (see above) the following transport options
+are ignored:
+
+  hosts_require_tls
+  tls_verify_hosts
+  tls_try_verify_hosts
+  tls_verify_certificates
+  tls_crl
+  tls_verify_cert_hostnames
+
+If DANE is not usable, whether requested or not, and CA-anchored verification
+evaluation is wanted, the above variables should be set appropriately.
+
+Currently the dnssec_request_domains must be active and dnssec_require_domains
+is ignored.
+
+If verification was successful using DANE then the "CV" item in the delivery
+log line will show as "CV=dane".
+
+There is a new variable $tls_out_dane which will have "yes" if verification
+succeeded using DANE and "no" otherwise (only useful in combination with
+events; see 60), and a new variable $tls_out_tlsa_usage (detailed above).
+
+An event (see 60) of type "dane:fail" will be raised on failures to achieve
+DANE-verified connection, if one was either requested and offered, or required.
+This is intended to support TLS-reporting as defined in https://tools.ietf.org/
+html/draft-ietf-uta-smtp-tlsrpt-17. The $event_data will be one of the Result
+Types defined in Section 4.3 of that document.
+
+Under GnuTLS, DANE is only supported from version 3.0.0 onwards.
+
+DANE is specified in published RFCs and decouples certificate authority trust
+selection from a "race to the bottom" of "you must trust everything for mail to
+get through". There is an alternative technology called MTA-STS, which instead
+publishes MX trust anchor information on an HTTPS website. At the time this
+text was last updated, MTA-STS was still a draft, not yet an RFC. Exim has no
+support for MTA-STS as a client, but Exim mail server operators can choose to
+publish information describing their TLS configuration using MTA-STS to let
+those clients who do use that protocol derive trust information.
+
+The MTA-STS design requires a certificate from a public Certificate Authority
+which is recognized by clients sending to you. That selection of which CAs are
+trusted by others is outside your control.
+
+The most interoperable course of action is probably to use Let's Encrypt, with
+automated certificate renewal; to publish the anchor information in
+DNSSEC-secured DNS via TLSA records for DANE clients (such as Exim and Postfix)
+and to publish anchor information for MTA-STS as well. This is what is done for
+the exim.org domain itself (with caveats around occasionally broken MTA-STS
+because of incompatible specification changes prior to reaching RFC status).
 
 
 
 ===============================================================================
 43. ACCESS CONTROL LISTS
 
-Access Control Lists (ACLs) are defined in a separate section of the run time
+Access Control Lists (ACLs) are defined in a separate section of the runtime
 configuration file, headed by "begin acl". Each ACL definition starts with a
 name, terminated by a colon. Here is a complete ACL section that contains just
 one very small ACL:
@@ -26173,7 +26942,7 @@ otherwise specified, the default action is to accept.
 
 This ACL is evaluated before acl_smtp_mime and acl_smtp_data.
 
-For details on the operation of DKIM, see chapter 57.
+For details on the operation of DKIM, see section 57.1.
 
 
 43.8 The SMTP MIME ACL
@@ -26287,16 +27056,16 @@ acl_smtp_rcpt = ${if ={25}{$interface_port} \
                      {acl_check_rcpt} {acl_check_rcpt_submit} }
 
 In the default configuration file there are some example settings for providing
-an RFC 4409 message submission service on port 587 and a non-standard "smtps"
-service on port 465. You can use a string expansion like this to choose an ACL
-for MUAs on these ports which is more appropriate for this purpose than the
-default ACL on port 25.
+an RFC 4409 message "submission" service on port 587 and an RFC 8314
+"submissions" service on port 465. You can use a string expansion like this to
+choose an ACL for MUAs on these ports which is more appropriate for this
+purpose than the default ACL on port 25.
 
 The expanded string does not have to be the name of an ACL in the configuration
 file; there are other possibilities. Having expanded the string, Exim searches
 for an ACL as follows:
 
-  * If the string begins with a slash, Exim uses it as a file name, and reads
+  * If the string begins with a slash, Exim uses it as a filename, and reads
     its contents as an ACL. The lines are processed in the same way as lines in
     the Exim configuration file. In particular, continuation lines are
     supported, blank lines are ignored, as are lines whose first non-whitespace
@@ -27078,7 +27847,9 @@ control = cutthrough_delivery/<options>
     Note that routers are used in verify mode, and cannot depend on content of
     received headers. Note also that headers cannot be modified by any of the
     post-data ACLs (DATA, MIME and DKIM). Headers may be modified by routers
-    (subject to the above) and transports.
+    (subject to the above) and transports. The Received-By: header is generated
+    as soon as the body reception starts, rather than the traditional time
+    after the full message is received; this will affect the timestamp.
 
     All the usual ACLs are called; if one results in the message being
     rejected, all effort spent in delivery (including the costs on the ultimate
@@ -27088,10 +27859,7 @@ control = cutthrough_delivery/<options>
     Cutthrough delivery is not supported via transport-filters or when DKIM
     signing of outgoing messages is done, because it sends data to the ultimate
     destination before the entire message has been received from the source. It
-    is not supported for messages received with the SMTP PRDR
-
-    or CHUNKING
-
+    is not supported for messages received with the SMTP PRDR or CHUNKING
     options in use.
 
     Should the ultimate destination system positively accept or reject the
@@ -27114,12 +27882,13 @@ control = cutthrough_delivery/<options>
 control = debug/<options>
 
     This control turns on debug logging, almost as though Exim had been invoked
-    with "-d", with the output going to a new logfile, by default called 
-    debuglog. The filename can be adjusted with the tag option, which may
-    access any variables already defined. The logging may be adjusted with the 
-    opts option, which takes the same values as the "-d" command-line option.
-    Logging may be stopped, and the file removed, with the kill option. Some
-    examples (which depend on variables that don't exist in all contexts):
+    with "-d", with the output going to a new logfile in the usual logs
+    directory, by default called debuglog. The filename can be adjusted with
+    the tag option, which may access any variables already defined. The logging
+    may be adjusted with the opts option, which takes the same values as the
+    "-d" command-line option. Logging started this way may be stopped, and the
+    file removed, with the kill option. Some examples (which depend on
+    variables that don't exist in all contexts):
 
           control = debug
           control = debug/tag=.$sender_host_address
@@ -27130,7 +27899,7 @@ control = debug/<options>
 control = dkim_disable_verify
 
     This control turns off DKIM verification processing entirely. For details
-    on the operation and configuration of DKIM, see chapter 57.
+    on the operation and configuration of DKIM, see section 57.1.
 
 control = dscp/<value>
 
@@ -27455,10 +28224,11 @@ warn   hosts           = +internal_hosts
 warn   message         = Remove internal headers
        remove_header   = $acl_c_ihdrs
 
-Removed header lines are accumulated during the MAIL, RCPT, and predata ACLs.
-They are removed from the message before processing the DATA and MIME ACLs.
-There is no harm in attempting to remove the same header twice nor is removing
-a non-existent header. Further header lines to be removed may be accumulated
+Header names for removal are accumulated during the MAIL, RCPT, and predata
+ACLs. Matching header lines are removed from the message before processing the
+DATA and MIME ACLs. If multiple header lines match, all are removed. There is
+no harm in attempting to remove the same header twice nor in removing a
+non-existent header. Further header lines to be removed may be accumulated
 during the DATA and MIME ACLs, after which they are removed from the message,
 if present. In the case of non-SMTP messages, headers to be removed are
 accumulated during the non-SMTP ACLs, and are removed from the message after
@@ -27901,6 +28671,10 @@ done at most once for any incoming connection (assuming long-enough TTL). Exim
 does not share information between multiple incoming connections (but your
 local name server cache should be active).
 
+There are a number of DNS lists to choose from, some commercial, some free, or
+free for small deployments. An overview can be found at https://
+en.wikipedia.org/wiki/Comparison_of_DNS_blacklists.
+
 
 43.28 Specifying the IP address for a DNS list lookup
 -----------------------------------------------------
@@ -27921,7 +28695,7 @@ MX hosts or nameservers of an email sender address. For an example, see section
 -------------------------------------
 
 There are some lists that are keyed on domain names rather than inverted IP
-addresses (see for example the domain based zones link at http://
+addresses (see, e.g., the domain based zones link at http://
 www.rfc-ignorant.org/). No reversing of components is used with these lists.
 You can change the name that is looked up in a DNS list by listing it after the
 domain name, introduced by a slash. For example,
@@ -28244,7 +29018,7 @@ TXT record. As a byproduct of this, there is also a check that the IP being
 tested is indeed on the first list. The first domain is the one that is put in
 $dnslist_domain. For example:
 
-reject message  = \
+deny message  = \
          rejected because $sender_host_address is blacklisted \
          at $dnslist_domain\n$dnslist_text
        dnslists = \
@@ -28262,7 +29036,7 @@ If you are interested in more than one merged list, the same list must be given
 several times, but because the results of the DNS lookups are cached, the DNS
 calls themselves are not repeated. For example:
 
-reject dnslists = \
+deny dnslists = \
          http.dnsbl.sorbs.net,dnsbl.sorbs.net=127.0.0.2 : \
          socks.dnsbl.sorbs.net,dnsbl.sorbs.net=127.0.0.3 : \
          misc.dnsbl.sorbs.net,dnsbl.sorbs.net=127.0.0.4 : \
@@ -28355,7 +29129,7 @@ at which a recipient receives messages, you can use the key
 "$local_part@$domain" with the per_rcpt option (see below) in a RCPT ACL.
 
 Each ratelimit condition can have up to four options. A per_* option specifies
-what Exim measures the rate of, for example messages or recipients or bytes.
+what Exim measures the rate of, for example, messages or recipients or bytes.
 You can adjust the measurement using the unique= and/or count= options. You can
 also control when Exim updates the recorded rate using a strict, leaky, or 
 readonly option. The options are separated by a slash, like the other
@@ -28465,13 +29239,12 @@ as rejecting the message) that may be specified by the rest of the ACL.
 
 The leaky (default) option means that the client's recorded rate is not updated
 if it is above the limit. The effect of this is that Exim measures the client's
-average rate of successfully sent email, which cannot be greater than the
-maximum allowed. If the client is over the limit it may suffer some
-counter-measures (as specified in the ACL), but it will still be able to send
-email at the configured maximum rate, whatever the rate of its attempts. This
-is generally the better choice if you have clients that retry automatically.
-For example, it does not prevent a sender with an over-aggressive retry rate
-from getting any email through.
+average rate of successfully sent email,
+
+up to the given limit. This is appropriate if the countermeasure when the
+condition is true consists of refusing the message, and is generally the better
+choice if you have clients that retry automatically. If the action when true is
+anything more complex then this option is likely not what is wanted.
 
 The strict option means that the client's recorded rate is always updated. The
 effect of this is that Exim measures the client's average rate of attempts to
@@ -28631,6 +29404,10 @@ appropriate) contains one of the following words:
 The main use of these variables is expected to be to distinguish between
 rejections of MAIL and rejections of RCPT in callouts.
 
+The above variables may also be set after a successful address verification to:
+
+  * random: A random local-part callout succeeded
+
 
 43.45 Callout verification
 --------------------------
@@ -28853,6 +29630,20 @@ use_sender
     of the sender when checking recipients. If used indiscriminately, it
     reduces the usefulness of callout caching.
 
+hold
+
+    This option applies to recipient callouts only. For example:
+
+    require  verify = recipient/callout=use_sender,hold
+
+    It causes the connection to be held open and used for any further
+    recipients and for eventual delivery (should that be done quickly). Doing
+    this saves on TCP and SMTP startup costs, and TLS costs also when that is
+    used for the connections. The advantage is only gained if there are no
+    callout cache hits (which could be enforced by the no_cache option), if the
+    use_sender option is used, if neither the random nor the use_postmaster
+    option is used, and if no other callouts intervene.
+
 If you use any of the parameters that set a non-empty sender for the MAIL
 command (mailfrom, postmaster_mailfrom, use_postmaster, or use_sender), you
 should think about possible loops. Recipient checking is usually done between
@@ -29068,7 +29859,8 @@ There are two expansion items to help with the implementation of the BATV
 the original envelope sender address by using a simple key to add a hash of the
 address and some time-based randomizing information. The prvs expansion item
 creates a signed address, and the prvscheck expansion item checks one. The
-syntax of these expansion items is described in section 11.5.
+syntax of these expansion items is described in section 11.5. The validity
+period on signed addresses is seven days.
 
 As an example, suppose the secret per-address keys are stored in an MySQL
 database. A query to look up the key for an address could be defined as a macro
@@ -29280,21 +30072,30 @@ av_scanner = sophie:/var/run/sophie
 
 If the value of av_scanner starts with a dollar character, it is expanded
 before use. The usual list-parsing of the content (see 6.20) applies. The
-following scanner types are supported in this release:
+following scanner types are supported in this release, though individual ones
+can be included or not at build time:
 
 avast
 
     This is the scanner daemon of Avast. It has been tested with Avast Core
-    Security (currently at version 1.1.7). You can get a trial version at http:
-    //www.avast.com or for Linux at http://www.avast.com/linux-server-antivirus
-    . This scanner type takes one option, which can be either a full path to a
-    UNIX socket, or host and port specifiers separated by white space. The host
-    may be a name or an IP address; the port is either a single number or a
-    pair of numbers with a dash between. Any further options are given, on
-    separate lines, to the daemon as options before the main scan command. For
-    example:
+    Security (currently at version 2.2.0). You can get a trial version at 
+    https://www.avast.com or for Linux at https://www.avast.com/
+    linux-server-antivirus. This scanner type takes one option, which can be
+    either a full path to a UNIX socket, or host and port specifiers separated
+    by white space. The host may be a name or an IP address; the port is either
+    a single number or a pair of numbers with a dash between. A list of options
+    may follow. These options are interpreted on the Exim's side of the malware
+    scanner, or are given on separate lines to the daemon as options before the
+    main scan command.
+
+    If "pass_unscanned" is set, any files the Avast scanner can't scan (e.g.
+    decompression bombs, or invalid archives) are considered clean. Use with
+    care.
+
+    For example:
 
     av_scanner = avast:/var/run/avast/scan.sock:FLAGS -fullfiles:SENSITIVITY -pup
+    av_scanner = avast:/var/run/avast/scan.sock:pass_unscanned:FLAGS -fullfiles:SENSITIVITY -pup
     av_scanner = avast:192.168.2.22 5036
 
     If you omit the argument, the default path /var/run/avast/scan.sock is
@@ -29307,10 +30108,14 @@ avast
         SENSITIVITY
         PACK
 
+    If the scanner returns a temporary failure (e.g. license issues, or
+    permission problems), the message is deferred and a paniclog entry is
+    written. The usual "defer_ok" option is available.
+
 aveserver
 
     This is the scanner daemon of Kaspersky Version 5. You can get a trial
-    version at http://www.kaspersky.com. This scanner type takes one option,
+    version at https://www.kaspersky.com/. This scanner type takes one option,
     which is the path to the daemon's UNIX socket. The default is shown in this
     example:
 
@@ -29318,7 +30123,7 @@ aveserver
 
 clamd
 
-    This daemon-type scanner is GPL and free. You can get it at http://
+    This daemon-type scanner is GPL and free. You can get it at https://
     www.clamav.net/. Some older versions of clamd do not seem to unpack MIME
     containers, so it used to be recommended to unpack MIME attachments in the
     MIME ACL. This is no longer believed to be necessary.
@@ -29349,12 +30154,10 @@ clamd
 
     If the value of av_scanner points to a UNIX socket file or contains the
     "local" option, then the ClamAV interface will pass a filename containing
-    the data to be scanned, which will should normally result in less I/O
-    happening and be more efficient. Normally in the TCP case, the data is
-    streamed to ClamAV as Exim does not assume that there is a common
-    filesystem with the remote host. There is an option WITH_OLD_CLAMAV_STREAM
-    in src/EDITME available, should you be running a version of ClamAV prior to
-    0.95.
+    the data to be scanned, which should normally result in less I/O happening
+    and be more efficient. Normally in the TCP case, the data is streamed to
+    ClamAV as Exim does not assume that there is a common filesystem with the
+    remote host.
 
     The final example shows that multiple TCP targets can be specified. Exim
     will randomly use one for each incoming email (i.e. it load balances them).
@@ -29407,7 +30210,7 @@ cmdline
 
 drweb
 
-    The DrWeb daemon scanner (http://www.sald.com/) interface takes one option,
+    The DrWeb daemon scanner (https://www.sald.ru/) interface takes one option,
     either a full path to a UNIX socket, or host and port specifiers separated
     by white space. The host may be a name or an IP address; the port is either
     a single number or a pair of numbers with a dash between. For example:
@@ -29426,11 +30229,21 @@ f-protd
 
     av_scanner = f-protd:localhost 10200-10204
 
+    If you omit the argument, the default values shown above are used.
+
+f-prot6d
+
+    The f-prot6d scanner is accessed using the FPSCAND protocol over TCP. One
+    argument is taken, being a space-separated hostname and port number. For
+    example:
+
+    av_scanner = f-prot6d:localhost 10200
+
     If you omit the argument, the default values show above are used.
 
 fsecure
 
-    The F-Secure daemon scanner (http://www.f-secure.com) takes one argument
+    The F-Secure daemon scanner (https://www.f-secure.com/) takes one argument
     which is the path to a UNIX socket. For example:
 
     av_scanner = fsecure:/path/to/.fsav
@@ -29451,12 +30264,14 @@ kavdaemon
 
 mksd
 
-    This is a daemon type scanner that is aimed mainly at Polish users, though
-    some parts of documentation are now available in English. You can get it at
-    http://linux.mks.com.pl/. The only option for this scanner type is the
-    maximum number of processes used simultaneously to scan the attachments,
-    provided that mksd has been run with at least the same number of child
-    processes. For example:
+    This was a daemon type scanner that is aimed mainly at Polish users, though
+    some documentation was available in English. The history can be shown at 
+    https://en.wikipedia.org/wiki/Mks_vir and this appears to be a candidate
+    for removal from Exim, unless we are informed of other virus scanners which
+    use the same protocol to integrate. The only option for this scanner type
+    is the maximum number of processes used simultaneously to scan the
+    attachments, provided that mksd has been run with at least the same number
+    of child processes. For example:
 
     av_scanner = mksd:2
 
@@ -29468,19 +30283,22 @@ sock
     on the local machine. There are four options: an address (which may be an
     IP address and port, or the path of a Unix socket), a commandline to send
     (may include a single %s which will be replaced with the path to the mail
-    file to be scanned), an RE to trigger on from the returned data, an RE to
-    extract malware_name from the returned data. For example:
+    file to be scanned), an RE to trigger on from the returned data, and an RE
+    to extract malware_name from the returned data. For example:
 
-    av_scanner = sock:127.0.0.1 6001:%s:(SPAM|VIRUS):(.*)\$
+    av_scanner = sock:127.0.0.1 6001:%s:(SPAM|VIRUS):(.*)$
 
-    Default for the socket specifier is /tmp/malware.sock. Default for the
-    commandline is %s\n. Both regular-expressions are required.
+    Note that surrounding whitespace is stripped from each option, meaning
+    there is no way to specify a trailing newline. The socket specifier and
+    both regular-expressions are required. Default for the commandline is %s\n
+    (note this does have a trailing newline); specify an empty element to get
+    this.
 
 sophie
 
     Sophie is a daemon that uses Sophos' libsavi library to scan for viruses.
-    You can get Sophie at http://www.clanfield.info/sophie/. The only option
-    for this scanner type is the path to the UNIX socket that Sophie uses for
+    You can get Sophie at http://sophie.sourceforge.net/. The only option for
+    this scanner type is the path to the UNIX socket that Sophie uses for
     client communication. For example:
 
     av_scanner = sophie:/tmp/sophie
@@ -29513,7 +30331,7 @@ one of
     condition succeeds if a virus is found and its name matches the regular
     expression. This allows you to take special actions on certain types of
     virus. Note that "/" characters in the RE must be doubled due to the
-    list-processing, unless the separator is changed (in the usual way).
+    list-processing, unless the separator is changed (in the usual way 6.21).
 
 You can append a "defer_ok" element to the malware argument list to accept
 messages even if there is a problem with the virus scanner. Otherwise, such a
@@ -29570,8 +30388,8 @@ The spam ACL condition calls SpamAssassin's spamd daemon to get a spam score
 and a report for the message. Support is also provided for Rspamd.
 
 For more information about installation and configuration of SpamAssassin or
-Rspamd refer to their respective websites at http://spamassassin.apache.org and
-http://www.rspamd.com
+Rspamd refer to their respective websites at https://spamassassin.apache.org/
+and https://www.rspamd.com/
 
 SpamAssassin can be installed with CPAN by running:
 
@@ -29587,7 +30405,7 @@ spamd_address. If you intend to use another host or port for SpamAssassin, you
 must set the spamd_address option in the global part of the Exim configuration
 as follows (example):
 
-spamd_address = 192.168.99.45 387
+spamd_address = 192.168.99.45 783
 
 The SpamAssassin protocol relies on a TCP half-close from the client. If your
 SpamAssassin client side is running a Linux system with an iptables firewall,
@@ -29602,15 +30420,15 @@ To use Rspamd (which by default listens on all local addresses on TCP port
 spamd_address = 127.0.0.1 11333 variant=rspamd
 
 As of version 2.60, SpamAssassin also supports communication over UNIX sockets.
-If you want to us these, supply spamd_address with an absolute file name
-instead of an address/port pair:
+If you want to us these, supply spamd_address with an absolute filename instead
+of an address/port pair:
 
 spamd_address = /var/run/spamd_socket
 
 You can have multiple spamd servers to improve scalability. These can reside on
 other hardware reachable over the network. To specify multiple spamd servers,
 put multiple address/port pairs in the spamd_address option, separated with
-colons (the separator can be changed in the usual way):
+colons (the separator can be changed in the usual way 6.21):
 
 spamd_address = 192.168.2.10 783 : \
                 192.168.2.11 783 : \
@@ -29622,7 +30440,7 @@ server responds, the spam condition defers.
 
 Unix and TCP socket specifications may be mixed in any order. Each element of
 the list is a list itself, space-separated by default and changeable in the
-usual way; take care to not double the separator.
+usual way (6.21); take care to not double the separator.
 
 For TCP socket specifications a host name or IP (v4 or v6, but subject to
 list-separator quoting rules) address can be used, and the port can be one or a
@@ -29714,7 +30532,7 @@ are available for use at delivery time.
 
 $spam_score
 
-    The spam score of the message, for example "3.4" or "30.5". This is useful
+    The spam score of the message, for example, "3.4" or "30.5". This is useful
     for inclusion in log or reject messages.
 
 $spam_score_int
@@ -29814,13 +30632,13 @@ The right hand side is expanded before use. After expansion, the value can be:
 
  2. The string "default". In that case, the file is put in the temporary
     "default" directory <spool_directory>/scan/<message_id>/ with a sequential
-    file name consisting of the message id and a sequence number. The full path
+    filename consisting of the message id and a sequence number. The full path
     and name is available in $mime_decoded_filename after decoding.
 
  3. A full path name starting with a slash. If the full name is an existing
     directory, it is used as a replacement for the default directory. The
     filename is then sequentially assigned. If the path does not exist, it is
-    used as the full path and file name.
+    used as the full path and filename.
 
  4. If the string does not start with a slash, it is used as the filename, and
     the default path is then used.
@@ -29916,7 +30734,7 @@ $mime_content_type
 $mime_decoded_filename
 
     This variable is set only after the decode modifier (see above) has been
-    successfully run. It contains the full path and file name of the file
+    successfully run. It contains the full path and filename of the file
     containing the decoded data.
 
 $mime_filename
@@ -29950,7 +30768,7 @@ $mime_is_coverletter
 
     As an example, the following will ban "HTML mail" (including that sent with
     alternative plain text), while allowing HTML files to be attached. HTML
-    coverletter mail attached to non-HMTL coverletter mail will also be
+    coverletter mail attached to non-HTML coverletter mail will also be
     allowed:
 
     deny message = HTML mail is not accepted here
@@ -29961,9 +30779,9 @@ $mime_is_coverletter
 $mime_is_multipart
 
     This variable has the value 1 (true) when the current part has the main
-    type "multipart", for example "multipart/alternative" or "multipart/mixed".
-    Since multipart entities only serve as containers for other parts, you may
-    not want to carry out specific actions on them.
+    type "multipart", for example, "multipart/alternative" or "multipart/
+    mixed". Since multipart entities only serve as containers for other parts,
+    you may not want to carry out specific actions on them.
 
 $mime_is_rfc822
 
@@ -30055,10 +30873,14 @@ ends with a non-zero code. The incident is logged on the main and reject logs.
 -----------------------------------------------
 
 To make use of the local scan function feature, you must tell Exim where your
-function is before building Exim, by setting LOCAL_SCAN_SOURCE in your Local/
-Makefile. A recommended place to put it is in the Local directory, so you might
-set
+function is before building Exim, by setting
+
+both HAVE_LOCAL_SCAN and
 
+LOCAL_SCAN_SOURCE in your Local/Makefile. A recommended place to put it is in
+the Local directory, so you might set
+
+HAVE_LOCAL_SCAN=yes
 LOCAL_SCAN_SOURCE=Local/local_scan.c
 
 for example. The function must be called local_scan(). It is called by Exim
@@ -30068,8 +30890,8 @@ function controls whether the message is actually accepted or not. There is a
 commented template function (that just accepts the message) in the file _src/
 local_scan.c_.
 
-If you want to make use of Exim's run time configuration file to set options
-for your local_scan() function, you must also set
+If you want to make use of Exim's runtime configuration file to set options for
+your local_scan() function, you must also set
 
 LOCAL_SCAN_HAS_OPTIONS=yes
 
@@ -30267,12 +31089,13 @@ as follows:
 
 int body_linecount
 
-    This variable contains the number of lines in the message's body.
+    This variable contains the number of lines in the message's body. It is not
+    valid if the spool_files_wireformat option is used.
 
 int body_zerocount
 
     This variable contains the number of binary zero bytes in the message's
-    body.
+    body. It is not valid if the spool_files_wireformat option is used.
 
 unsigned int debug_selector
 
@@ -32248,7 +33071,7 @@ accepted.
 ===============================================================================
 49. CUSTOMIZING BOUNCE AND WARNING MESSAGES
 
-When a message fails to be delivered, or remains on the queue for more than a
+When a message fails to be delivered, or remains in the queue for more than a
 configured amount of time, Exim sends a message to the original sender, or to
 an alternative configured address. The text of these messages is built into the
 code of Exim, but it is possible to change it, either by adding a single
@@ -32356,7 +33179,7 @@ A message ${if eq{$sender_address}{$warn_message_recipients}
 <$sender_address>
 
 }}has not been delivered to all of its recipients after
-more than $warn_message_delay on the queue on $primary_hostname.
+more than $warn_message_delay in the queue on $primary_hostname.
 
 The message identifier is:     $message_exim_id
 The subject of the message is: $h_subject
@@ -32431,7 +33254,7 @@ such file, the router declines, but because no_more is set, no subsequent
 routers are tried, and so the whole delivery fails.
 
 The forbid_pipe and forbid_file options prevent a local part from being
-expanded into a file name or a pipe delivery, which is usually inappropriate in
+expanded into a filename or a pipe delivery, which is usually inappropriate in
 a mailing list.
 
 The errors_to option specifies that any delivery errors caused by addresses
@@ -32550,11 +33373,11 @@ the address, giving a suitable error message.
 50.6 Variable Envelope Return Paths (VERP)
 ------------------------------------------
 
-Variable Envelope Return Paths - see http://cr.yp.to/proto/verp.txt - are a way
-of helping mailing list administrators discover which subscription address is
-the cause of a particular delivery failure. The idea is to encode the original
-recipient address in the outgoing envelope sender address, so that if the
-message is forwarded by another host and then subsequently bounces, the
+Variable Envelope Return Paths - see https://cr.yp.to/proto/verp.txt - are a
+way of helping mailing list administrators discover which subscription address
+is the cause of a particular delivery failure. The idea is to encode the
+original recipient address in the outgoing envelope sender address, so that if
+the message is forwarded by another host and then subsequently bounces, the
 original recipient can be extracted from the recipient address of the bounce.
 
 Envelope sender addresses can be modified by Exim using two different
@@ -32669,7 +33492,7 @@ the file to find a new address (or list of addresses). The no_more setting
 ensures that if the lookup fails (leading to data being an empty string), Exim
 gives up on the address without trying any subsequent routers.
 
-This one router can handle all the virtual domains because the alias file names
+This one router can handle all the virtual domains because the alias filenames
 follow a fixed pattern. Permissions can be arranged so that appropriate people
 can edit the different alias files. A successful aliasing operation results in
 a new envelope recipient address, which is then routed from scratch.
@@ -32810,7 +33633,7 @@ Nevertheless there are some features that can be used.
 --------------------------------------
 
 It is tempting to arrange for incoming mail for the intermittently connected
-host to remain on Exim's queue until the client connects. However, this
+host to remain in Exim's queue until the client connects. However, this
 approach does not scale very well. Two different kinds of waiting message are
 being mixed up in the same queue - those that cannot be delivered because of
 some temporary problem, and those that are waiting for their destination host
@@ -33037,14 +33860,14 @@ need to tweak syslog to prevent it syncing the file with each write - on Linux
 this has been seen to make syslog take 90% plus of CPU time.
 
 The destination for Exim's logs is configured by setting LOG_FILE_PATH in Local
-/Makefile or by setting log_file_path in the run time configuration. This
-latter string is expanded, so it can contain, for example, references to the
-host name:
+/Makefile or by setting log_file_path in the runtime configuration. This latter
+string is expanded, so it can contain, for example, references to the host
+name:
 
 log_file_path = /var/log/$primary_hostname/exim_%slog
 
 It is generally advisable, however, to set the string in Local/Makefile rather
-than at run time, because then the setting is available right from the start of
+than at runtime, because then the setting is available right from the start of
 Exim's execution. Otherwise, if there's something it wants to log before it has
 read the configuration file (for example, an error in the configuration file)
 it will not use the path you want, and may not be able to log at all.
@@ -33066,11 +33889,11 @@ the setting:
 
 log_file_path = $spool_directory/log/%slog
 
-If you do not specify anything at build time or run time, or if you unset the
-option at run time (i.e. "log_file_path = "), that is where the logs are
+If you do not specify anything at build time or runtime, or if you unset the
+option at runtime (i.e. "log_file_path = "), that is where the logs are
 written.
 
-A log file path may also contain "%D" or "%M" if datestamped log file names are
+A log file path may also contain "%D" or "%M" if datestamped log filenames are
 in use - see section 52.3 below.
 
 Here are some examples of possible settings:
@@ -33355,7 +34178,10 @@ When more than one address is included in a single delivery (for example, two
 SMTP RCPT commands in one transaction) the second and subsequent addresses are
 flagged with "->" instead of "=>". When two or more messages are delivered down
 a single SMTP connection, an asterisk follows the IP address in the log lines
-for the second and subsequent messages.
+for the second and subsequent messages. When two or more messages are delivered
+down a single TLS connection, the DNS and some TLS-related information logged
+for the first message delivered will not be present in the log lines for the
+second and subsequent messages. TLS cipher information is still available.
 
 When delivery is done in cutthrough mode it is flagged with ">>" and the log
 line precedes the reception line, since cutthrough waits for a possible
@@ -33458,14 +34284,17 @@ C           SMTP confirmation on delivery
             command list for "no mail in SMTP session"
 CV          certificate verification status
 D           duration of "no mail in SMTP session"
+DKIM        domain verified in incoming message
 DN          distinguished name from peer certificate
 DS          DNSSEC secured lookups
 DT          on => lines: time taken for a delivery
 F           sender address (on delivery lines)
 H           host name and IP address
 I           local interface used
-K           CHUNKING extension used
 id          message id for incoming message
+K           CHUNKING extension used
+L           on <= and => lines: PIPELINING extension used
+M8S         8BITMIME status for incoming message
 P           on <= lines: protocol used
             on => and ** lines: return path
 PRDR        PRDR extension used
@@ -33475,10 +34304,12 @@ QT          on => lines: time spent on queue so far
             on "Completed" lines: time spent on queue
 R           on <= lines: reference for local bounce
             on =>  >> ** and == lines: router name
+RT          on <= lines: time taken for reception
 S           size of message in bytes
 SNI         server name indication from TLS client hello
 ST          shadow transport name
 T           on <= lines: message subject (topic)
+TFO         connection took advantage of TCP Fast Open
             on => ** and == lines: transport name
 U           local user or RFC 1413 identity
 X           TLS cipher suite
@@ -33520,6 +34351,9 @@ self-explanatory. Among the more common are:
 
         failed. The delivery was discarded.
 
+  * DKIM: d=  Verbose results of a DKIM verification attempt, if enabled for
+    logging and the message has a DKIM signature header.
+
 
 52.15 Reducing or increasing what is logged
 -------------------------------------------
@@ -33543,6 +34377,8 @@ selection marked by asterisks:
 *delay_delivery               immediate delivery delayed
  deliver_time                 time taken to perform delivery
  delivery_size                add S=nnn to => lines
+*dkim                         DKIM verified domain on <= lines
+ dkim_verbose                 separate full DKIM verification result line, per signature
 *dnslist_defer                defers of DNS list (aka RBL) lookups
  dnssec                       DNSSEC secured lookups
 *etrn                         ETRN commands
@@ -33551,13 +34387,16 @@ selection marked by asterisks:
  incoming_interface           local interface on <= and => lines
  incoming_port                remote port on <= lines
 *lost_incoming_connection     as it says (includes timeouts)
+ millisec                     millisecond timestamps and RT,QT,DT,D times
  outgoing_interface           local interface on => lines
  outgoing_port                add remote port to => lines
 *queue_run                    start and end queue runs
  queue_time                   time on queue for one recipient
  queue_time_overall           time on queue for whole message
  pid                          Exim process id
+ pipelining                   PIPELINING use, on <= and => lines
  proxy                        proxy address on <= and => lines
+ receive_time                 time taken to receive message
  received_recipients          recipients on <= lines
  received_sender              sender on <= lines
 *rejected_header              header contents on reject log
@@ -33626,10 +34465,18 @@ More details on each of these items follows:
 
   * deliver_time: For each delivery, the amount of real time it has taken to
     perform the actual delivery is logged as DT=<time>, for example, "DT=1s".
+    If millisecond logging is enabled, short times will be shown with greater
+    precision, eg. "DT=0.304s".
 
   * delivery_size: For each delivery, the size of message delivered is added to
     the "=>" line, tagged with S=.
 
+  * dkim: For message acceptance log lines, when an DKIM signature in the
+    header verifies successfully a tag of DKIM is added, with one of the
+    verified domains.
+
+  * dkim_verbose: A log entry is written for each attempted DKIM verification.
+
   * dnslist_defer: A log entry is written if an attempt to look up a host in a
     DNS black list suffers a temporary error.
 
@@ -33655,7 +34502,7 @@ More details on each of these items follows:
   * incoming_interface: The interface on which a message was received is added
     to the "<=" line as an IP address in square brackets, tagged by I= and
     followed by a colon and the port number. The local interface and port are
-    also added to other SMTP log lines, for example "SMTP connection from", to
+    also added to other SMTP log lines, for example, "SMTP connection from", to
     rejection lines, and (despite the name) to outgoing "=>" and "->" lines.
     The latter can be disabled by turning off the outgoing_interface option.
 
@@ -33674,6 +34521,9 @@ More details on each of these items follows:
   * lost_incoming_connection: A log line is written when an incoming SMTP
     connection is unexpectedly dropped.
 
+  * millisec: Timestamps have a period and three decimal places of finer
+    granularity appended to the seconds value.
+
   * outgoing_interface: If incoming_interface is turned on, then the interface
     on which a message was sent is added to delivery lines as an I= tag
     followed by IP address in square brackets. You can disable this by turning
@@ -33689,6 +34539,12 @@ More details on each of these items follows:
   * pid: The current process id is added to every log line, in square brackets,
     immediately after the time and date.
 
+  * pipelining: A field is added to delivery and accept log lines when the
+    ESMTP PIPELINING extension was used. The field is a single "L".
+
+    On accept lines, where PIPELINING was offered but not used by the client,
+    the field has a minus appended.
+
   * queue_run: The start and end of every queue run are logged.
 
   * queue_time: The amount of time the message has been in the queue on the
@@ -33697,13 +34553,20 @@ More details on each of these items follows:
     includes reception time as well as the delivery time for the current
     address. This means that it may be longer than the difference between the
     arrival and delivery log line times, because the arrival log line is not
-    written until the message has been successfully received.
+    written until the message has been successfully received. If millisecond
+    logging is enabled, short times will be shown with greater precision, eg.
+    "QT=1.578s".
 
   * queue_time_overall: The amount of time the message has been in the queue on
     the local host is logged as QT=<time> on "Completed" lines, for example,
     "QT=3m45s". The clock starts when Exim starts to receive the message, so it
     includes reception time as well as the total delivery time.
 
+  * receive_time: For each message, the amount of real time it has taken to
+    perform the reception is logged as RT=<time>, for example, "RT=1s". If
+    millisecond logging is enabled, short times will be shown with greater
+    precision, eg. "RT=0.204s".
+
   * received_recipients: The recipients of a message are listed in the main log
     as soon as the message is received. The list appears at the end of the log
     line that is written when a message is received, preceded by the word
@@ -33825,7 +34688,8 @@ More details on each of these items follows:
 
   * tls_certificate_verified: An extra item is added to <= and => log lines
     when TLS is in use. The item is "CV=yes" if the peer's certificate was
-    verified, and "CV=no" if not.
+    verified using a CA trust anchor, "CA=dane" if using a DNS trust anchor,
+    and "CV=no" if not.
 
   * tls_cipher: When a message is sent or received over an encrypted
     connection, the cipher suite used is added to the log line, preceded by X=.
@@ -33883,8 +34747,8 @@ the next chapter. The utilities described here are:
     53.15 exim_lock        lock a mailbox file
 
 Another utility that might be of use to sites with many MTAs is Tom Kistner's 
-exilog. It provides log visualizations across multiple Exim servers. See http:/
-/duncanthrax.net/exilog/ for details.
+exilog. It provides log visualizations across multiple Exim servers. See https:
+//duncanthrax.net/exilog/ for details.
 
 
 53.1 Finding out what Exim processes are doing (exiwhat)
@@ -34011,7 +34875,7 @@ There is one more option, -h, which outputs a list of options.
 -------------------------------------
 
 The exiqsumm utility is a Perl script which reads the output of "exim -bp" and
-produces a summary of the messages on the queue. Thus, you use it by running a
+produces a summary of the messages in the queue. Thus, you use it by running a
 command such as
 
 exim -bp | exiqsumm
@@ -34053,11 +34917,11 @@ any additional lines. The usage is:
 
 exigrep [-t<n>] [-I] [-l] [-M] [-v] <pattern> [<log file>] ...
 
-If no log file names are given on the command line, the standard input is read.
+If no log filenames are given on the command line, the standard input is read.
 
 The -t argument specifies a number of seconds. It adds an additional condition
 for message selection. Messages that are complete are shown only if they spent
-more than <n> seconds on the queue.
+more than <n> seconds in the queue.
 
 By default, exigrep does case-insensitive matching. The -I option makes it
 case-sensitive. This may give a performance improvement when searching large
@@ -34094,8 +34958,7 @@ extensions.
 
 John Jetmore's exipick utility is included in the Exim distribution. It lists
 messages from the queue according to a variety of criteria. For details of 
-exipick's facilities, visit the web page at http://www.exim.org/eximwiki/
-ToolExipickManPage or run exipick with the --help option.
+exipick's facilities, run exipick with the --help option.
 
 
 53.6 Cycling log files (exicyclog)
@@ -34116,8 +34979,8 @@ exicyclog:
     the script's default, which is to find the setting from Exim's
     configuration.
 
-Each time exicyclog is run the file names get "shuffled down" by one. If the
-main log file name is mainlog (the default) then when exicyclog is run mainlog
+Each time exicyclog is run the filenames get "shuffled down" by one. If the
+main log filename is mainlog (the default) then when exicyclog is run mainlog
 becomes mainlog.01, the previous mainlog.01 becomes mainlog.02 and so on, up to
 the limit that is set in the script or by the -k option. Log files whose
 numbers exceed the limit are discarded. Reject logs are handled similarly.
@@ -34143,9 +35006,7 @@ as root if you wish, but there is no need.
 --------------------------------
 
 A Perl script called eximstats is provided for extracting statistical
-information from log files. The output is either plain text, or HTML. Exim log
-files are also supported by the Lire system produced by the LogReport
-Foundation http://www.logreport.org.
+information from log files. The output is either plain text, or HTML.
 
 The eximstats script has been hacked about quite a bit over time. The latest
 version is the result of some extensive revision by Steve Campbell. A lot of
@@ -34185,7 +35046,7 @@ one address that failed.
 The remainder of the output is in sections that can be independently disabled
 or modified by various options. It consists of a summary of deliveries by
 transport, histograms of messages received and delivered per time interval
-(default per hour), information about the time messages spent on the queue, a
+(default per hour), information about the time messages spent in the queue, a
 list of relayed messages, lists of the top fifty sending hosts, local senders,
 destination hosts, and destination local users by count and by volume, and a
 list of delivery errors that occurred.
@@ -34260,9 +35121,9 @@ It creates the output under a temporary name, and then renames it if all went
 well.
 
 If the native DB interface is in use (USE_DB is set in a compile-time
-configuration file - this is common in free versions of Unix) the two file
-names must be different, because in this mode the Berkeley DB functions create
-single output file using exactly the name given. For example,
+configuration file - this is common in free versions of Unix) the two filenames
+must be different, because in this mode the Berkeley DB functions create a
+single output file using exactly the name given. For example,
 
 exim_dbmbuild /etc/aliases /etc/aliases.db
 
@@ -34273,7 +35134,7 @@ two files are used, with the suffixes .dir and .pag. In this environment, the
 suffixes are added to the second argument of exim_dbmbuild, so it can be the
 same as the first. This is also the case when the Berkeley functions are used
 in compatibility mode (though this is not recommended), because in that case it
-adds a .db suffix to the file name.
+adds a .db suffix to the filename.
 
 If a duplicate key is encountered, the program outputs a warning, and when it
 finishes, its return code is 1 rather than zero, unless the -noduperr option is
@@ -34523,7 +35384,7 @@ If none of -fcntl, -flock, -lockfile or -mbx are given, the default is to
 create a lock file and also to use fcntl() locking on the mailbox, which is the
 same as Exim's default. The use of -flock or -fcntl requires that the file be
 writeable; the use of -lockfile requires that the directory containing the file
-be writeable. Locking by lock file does not last for ever; Exim assumes that a
+be writeable. Locking by lock file does not last forever; Exim assumes that a
 lock file is expired if it is more than 30 minutes old.
 
 The -mbx option can be used with either or both of -fcntl or -flock. It assumes
@@ -34607,7 +35468,7 @@ xrdb -merge <<End
 Eximon*highlight: gray
 End
 
-In order to see the contents of messages on the queue, and to operate on them, 
+In order to see the contents of messages in the queue, and to operate on them, 
 eximon must either be run as root or by an admin user.
 
 The command-line parameters of eximon are passed to eximon.bin and may contain
@@ -34626,7 +35487,7 @@ different parts of the display.
 54.2 The stripcharts
 --------------------
 
-The first stripchart is always a count of messages on the queue. Its name can
+The first stripchart is always a count of messages in the queue. Its name can
 be configured by setting QUEUE_STRIPCHART_NAME in the Local/eximon.conf file.
 The remaining stripcharts are defined in the configuration script by regular
 expression matches on log file entries, making it possible to display, for
@@ -34736,7 +35597,7 @@ expense of having unwanted items in the search popup window.
 ----------------------
 
 The bottom section of the monitor window contains a list of all messages that
-are on the queue, which includes those currently being received or delivered,
+are in the queue, which includes those currently being received or delivered,
 as well as those awaiting delivery. The size of this subwindow is controlled by
 parameters in the configuration file Local/eximon.conf, and the frequency at
 which it is updated is controlled by another parameter in the same file - the
@@ -34745,7 +35606,7 @@ is an "Update" action button just above the display which can be used to force
 an update of the queue display at any time.
 
 When a host is down for some time, a lot of pending mail can build up for it,
-and this can make it hard to deal with other messages on the queue. To help
+and this can make it hard to deal with other messages in the queue. To help
 with this situation there is a button next to "Update" called "Hide". If
 pressed, a dialogue box called "Hide addresses ending with" is put up. If you
 type anything in here and press "Return", the text is added to a chain of such
@@ -34766,7 +35627,7 @@ queue display to use in the dialogue box, you have to do the cutting before
 pressing the "Hide" button.
 
 The queue display contains, for each unhidden queued message, the length of
-time it has been on the queue, the size of the message, the message id, the
+time it has been in the queue, the size of the message, the message id, the
 message sender, and the first undelivered recipient, all on one line. If it is
 a bounce message, the sender is shown as "<>". If there is more than one
 recipient to which the message has not yet been delivered, subsequent ones are
@@ -34812,7 +35673,7 @@ follows:
   * body: The contents of the spool file containing the body of the message are
     displayed in a new text window. There is a default limit of 20,000 bytes to
     the amount of data displayed. This can be changed by setting the BODY_MAX
-    option at compile time, or the EXIMON_BODY_MAX option at run time.
+    option at compile time, or the EXIMON_BODY_MAX option at runtime.
 
   * deliver message: A call to Exim is made using the -M option to request
     delivery of the message. This causes an automatic thaw if the message is
@@ -34908,10 +35769,10 @@ administrator who does not have the root password, or by someone who has
 penetrated the Exim (but not the root) account. These options are as follows:
 
   * ALT_CONFIG_PREFIX can be set to a string that is required to match the
-    start of any file names used with the -C option. When it is set, these file
-    names are also not allowed to contain the sequence "/../". (However, if the
-    value of the -C option is identical to the value of CONFIGURE_FILE in Local
-    /Makefile, Exim ignores -C and proceeds as usual.) There is no default
+    start of any filenames used with the -C option. When it is set, these
+    filenames are also not allowed to contain the sequence "/../". (However, if
+    the value of the -C option is identical to the value of CONFIGURE_FILE in
+    Local/Makefile, Exim ignores -C and proceeds as usual.) There is no default
     setting for ALT_CONFIG_PREFIX.
 
     If the permitted configuration files are confined to a directory to which
@@ -34973,7 +35834,7 @@ receiving messages and delivering them externally over SMTP, and it is
 obviously more secure if Exim does not run as root except when necessary. For
 this reason, a user and group for Exim to use must be defined in Local/Makefile
 . These are known as "the Exim user" and "the Exim group". Their values can be
-changed by the run time configuration, though this is not recommended. Often a
+changed by the runtime configuration, though this is not recommended. Often a
 user called exim is used, but some sites use mail or another user name
 altogether.
 
@@ -35255,6 +36116,11 @@ the contents of files on the spool via the Exim monitor (which runs
 unprivileged), Exim must be built to allow group read access to its spool
 files.
 
+By default, regular users are trusted to perform basic testing and
+introspection commands, as themselves. This setting can be tightened by setting
+the commandline_checks_require_admin option. This affects most of the checking
+options, such as -be and anything else -b*.
+
 
 55.10 Spool files
 -----------------
@@ -35339,6 +36205,10 @@ two files contains the final component of its own name as its first line. This
 is insurance against disk crashes where the directory is lost but the files
 themselves are recoverable.
 
+The file formats may be changed, or new formats added, at any release. Spool
+files are not intended as an interface to other programs and should not be used
+as such.
+
 Some people are tempted into editing -D files in order to modify messages. You
 need to be extremely careful if you do this; it is not recommended and you are
 on your own if you do it. Here are some of the pitfalls:
@@ -35370,6 +36240,11 @@ file remains in existence. When Exim next processes the message, it notices the
 -J file and uses it to update the -H file before starting the next delivery
 attempt.
 
+Files whose names end with -K or .eml may also be seen in the spool. These are
+temporaries used for DKIM or malware processing, when that is used. They should
+be tidied up by normal operations; any old ones are probably relics of crashes
+and can be removed.
+
 
 56.1 Format of the -H file
 --------------------------
@@ -35455,8 +36330,8 @@ order, and are omitted when not relevant:
 
 -body_linecount <number>
 
-    This records the number of lines in the body of the message, and is always
-    present.
+    This records the number of lines in the body of the message, and is present
+    unless -spool_file_wireformat is.
 
 -body_zerocount <number>
 
@@ -35554,6 +36429,12 @@ order, and are omitted when not relevant:
     If a message was scanned by SpamAssassin, this is present. It records the
     value of $spam_score_int.
 
+-spool_file_wireformat
+
+    The -D file for this message is in wire-format (for ESMTP CHUNKING) rather
+    than Unix-format. The line-ending is CRLF rather than newline. There is
+    still, however, no leading-dot-stuffing.
+
 -tls_certificate_verified
 
     A TLS certificate was received from the client that sent this message, and
@@ -35657,14 +36538,35 @@ header have been rewritten, the last one because routing expanded the
 unqualified domain foundation.
 
 
+56.2 Format of the -D file
+--------------------------
+
+The data file is traditionally in Unix-standard format: lines are ended with an
+ASCII newline character. However, when the spool_wireformat main option is used
+some -D files can have an alternate format. This is flagged by a 
+-spool_file_wireformat line in the corresponding -H file. The -D file lines
+(not including the first name-component line) are suitable for direct copying
+to the wire when transmitting using the ESMTP CHUNKING option, meaning lower
+processing overhead. Lines are terminated with an ASCII CRLF pair. There is no
+dot-stuffing (and no dot-termination).
+
+
 
 ===============================================================================
-57. SUPPORT FOR DKIM (DOMAINKEYS IDENTIFIED MAIL)
+57. DKIM AND SPF
+
+
+57.1 DKIM (DomainKeys Identified Mail)
+--------------------------------------
 
 DKIM is a mechanism by which messages sent by some entity can be provably
 linked to a domain which that entity controls. It permits reputation to be
 tracked on a per-domain basis, rather than merely upon source IP address. DKIM
-is documented in RFC 4871.
+is documented in RFC 6376.
+
+As DKIM relies on the message being unchanged in transit, messages handled by a
+mailing-list (which traditionally adds to the message) will not match any
+original DKIM signature.
 
 DKIM support is compiled into Exim by default if TLS support is present. It can
 be disabled by setting DISABLE_DKIM=yes in Local/Makefile.
@@ -35684,9 +36586,12 @@ default "policy". Instead it enables you to build your own policy using Exim's
 standard controls.
 
 Please note that verification of DKIM signatures in incoming mail is turned on
-by default for logging purposes. For each signature in incoming email, exim
-will log a line displaying the most important signature details, and the
-signature status. Here is an example (with line-breaks added for clarity):
+by default for logging (in the <= line) purposes.
+
+Additional log detail can be enabled using the dkim_verbose log_selector. When
+set, for each signature in incoming email, exim will log a line displaying the
+most important signature details, and the signature status. Here is an example
+(with line-breaks added for clarity):
 
 2009-09-09 10:22:28 1MlIRf-0003LU-U3 DKIM:
     d=facebookmail.com s=q1-2009b
@@ -35699,86 +36604,196 @@ modifier. This should typically be done in the RCPT ACL, at points where you
 accept mail from relay sources (internal hosts or authenticated senders).
 
 
-57.1 Signing outgoing messages
+57.2 Signing outgoing messages
 ------------------------------
 
+For signing to be usable you must have published a DKIM record in DNS. Note
+that RFC 8301 says:
+
+rsa-sha1 MUST NOT be used for signing or verifying.
+
+Signers MUST use RSA keys of at least 1024 bits for all keys.
+Signers SHOULD use RSA keys of at least 2048 bits.
+
+Note also that the key content (the 'p=' field) in the DNS record is different
+between RSA and EC keys; for the former it is the base64 of the ASN.1 for the
+RSA public key (equivalent to the private-key .pem with the header/trailer
+stripped) but for EC keys it is the base64 of the pure key; no ASN.1 wrapping.
+
 Signing is enabled by setting private options on the SMTP transport. These
 options take (expandable) strings as arguments.
 
-+--------------------------------------------------+
-|dkim_domain|Use: smtp|Type: string*|Default: unset|
-+--------------------------------------------------+
++-------------------------------------------------+
+|dkim_domain|Use: smtp|Type: string|Default: list*|
++-------------------------------------------------+
 
-MANDATORY: The domain you want to sign with. The result of this expanded option
-is put into the $dkim_domain expansion variable. If it is empty after
-expansion, DKIM signing is not done.
+The domain(s) you want to sign with. After expansion, this can be a list. Each
+element in turn is put into the $dkim_domain expansion variable while expanding
+the remaining signing options. If it is empty after expansion, DKIM signing is
+not done, and no error will result even if dkim_strict is set.
 
-+----------------------------------------------------+
-|dkim_selector|Use: smtp|Type: string*|Default: unset|
-+----------------------------------------------------+
++---------------------------------------------------+
+|dkim_selector|Use: smtp|Type: string|Default: list*|
++---------------------------------------------------+
 
-MANDATORY: This sets the key selector string. You can use the $dkim_domain
-expansion variable to look up a matching selector. The result is put in the
-expansion variable $dkim_selector which may be used in the dkim_private_key
-option along with $dkim_domain.
+This sets the key selector string. After expansion, which can use $dkim_domain,
+this can be a list. Each element in turn is put in the expansion variable 
+$dkim_selector which may be used in the dkim_private_key option along with 
+$dkim_domain. If the option is empty after expansion, DKIM signing is not done
+for this domain, and no error will result even if dkim_strict is set.
 
 +-------------------------------------------------------+
 |dkim_private_key|Use: smtp|Type: string*|Default: unset|
 +-------------------------------------------------------+
 
-MANDATORY: This sets the private key to use. You can use the $dkim_domain and 
+This sets the private key to use. You can use the $dkim_domain and 
 $dkim_selector expansion variables to determine the private key to use. The
 result can either
 
-  * be a valid RSA private key in ASCII armor, including line breaks.
+  * be a valid RSA private key in ASCII armor (.pem file), including line
+    breaks
+
+  * with GnuTLS 3.6.0 or OpenSSL 1.1.1 or later, be a valid Ed25519 private key
+    (same format as above)
 
   * start with a slash, in which case it is treated as a file that contains the
-    private key.
+    private key
 
   * be "0", "false" or the empty string, in which case the message will not be
     signed. This case will not result in an error, even if dkim_strict is set.
 
+To generate keys under OpenSSL:
+
+openssl genrsa -out dkim_rsa.private 2048
+openssl rsa -in dkim_rsa.private -out /dev/stdout -pubout -outform PEM
+
+Take the base-64 lines from the output of the second command, concatenated, for
+the DNS TXT record. See section 3.6 of RFC6376 for the record specification.
+
+Under GnuTLS:
+
+certtool --generate-privkey --rsa --bits=2048 --password='' -8 --outfile=dkim_rsa.private
+certtool --load-privkey=dkim_rsa.private --pubkey-info
+
+Note that RFC 8301 says:
+
+Signers MUST use RSA keys of at least 1024 bits for all keys.
+Signers SHOULD use RSA keys of at least 2048 bits.
+
+Support for EC keys is being developed under https://datatracker.ietf.org/doc/
+draft-ietf-dcrup-dkim-crypto/. They are considerably smaller than RSA keys for
+equivalent protection. As they are a recent development, users should consider
+dual-signing (by setting a list of selectors, and an expansion for this option)
+for some transition period. The "_CRYPTO_SIGN_ED25519" macro will be defined if
+support is present for EC keys.
+
+OpenSSL 1.1.1 and GnuTLS 3.6.0 can create Ed25519 private keys:
+
+openssl genpkey -algorithm ed25519 -out dkim_ed25519.private
+certtool --generate-privkey --key-type=ed25519 --outfile=dkim_ed25519.private
+
+To produce the required public key value for a DNS record:
+
+openssl pkey -outform DER -pubout -in dkim_ed25519.private | tail -c +13 | base64
+certtool --load_privkey=dkim_ed25519.private --pubkey_info --outder | tail -c +13 | base64
+
+Note that the format of Ed25519 keys in DNS has not yet been decided; this
+release supports both of the leading candidates at this time, a future release
+will probably drop support for whichever proposal loses.
+
++-------------------------------------------------+
+|dkim_hash|Use: smtp|Type: string*|Default: sha256|
++-------------------------------------------------+
+
+Can be set to any one of the supported hash methods, which are:
+
+  * "sha1" - should not be used, is old and insecure
+
+  * "sha256" - the default
+
+  * "sha512" - possibly more secure but less well supported
+
+Note that RFC 8301 says:
+
+rsa-sha1 MUST NOT be used for signing or verifying.
+
++----------------------------------------------------+
+|dkim_identity|Use: smtp|Type: string*|Default: unset|
++----------------------------------------------------+
+
+If set after expansion, the value is used to set an "i=" tag in the signing
+header. The DKIM standards restrict the permissible syntax of this optional tag
+to a mail address, with possibly-empty local part, an @, and a domain identical
+to or subdomain of the "d=" tag value. Note that Exim does not check the value.
+
 +-------------------------------------------------+
 |dkim_canon|Use: smtp|Type: string*|Default: unset|
 +-------------------------------------------------+
 
-OPTIONAL: This option sets the canonicalization method used when signing a
-message. The DKIM RFC currently supports two methods: "simple" and "relaxed".
-The option defaults to "relaxed" when unset. Note: the current implementation
-only supports using the same canonicalization method for both headers and body.
+This option sets the canonicalization method used when signing a message. The
+DKIM RFC currently supports two methods: "simple" and "relaxed". The option
+defaults to "relaxed" when unset. Note: the current implementation only
+supports signing with the same canonicalization method for both headers and
+body.
 
 +--------------------------------------------------+
 |dkim_strict|Use: smtp|Type: string*|Default: unset|
 +--------------------------------------------------+
 
-OPTIONAL: This option defines how Exim behaves when signing a message that
-should be signed fails for some reason. When the expansion evaluates to either
-"1" or "true", Exim will defer. Otherwise Exim will send the message unsigned.
-You can use the $dkim_domain and $dkim_selector expansion variables here.
+This option defines how Exim behaves when signing a message that should be
+signed fails for some reason. When the expansion evaluates to either "1" or
+"true", Exim will defer. Otherwise Exim will send the message unsigned. You can
+use the $dkim_domain and $dkim_selector expansion variables here.
 
-+--------------------------------------------------------+
-|dkim_sign_headers|Use: smtp|Type: string*|Default: unset|
-+--------------------------------------------------------+
++------------------------------------------------------------+
+|dkim_sign_headers|Use: smtp|Type: string*|Default: see below|
++------------------------------------------------------------+
+
+If set, this option must expand to a colon-separated list of header names.
+Headers with these names, or the absence or such a header, will be included in
+the message signature. When unspecified, the header names listed in RFC4871
+will be used, whether or not each header is present in the message. The default
+list is available for the expansion in the macro "_DKIM_SIGN_HEADERS".
+
+If a name is repeated, multiple headers by that name (or the absence thereof)
+will be signed. The textually later headers in the headers part of the message
+are signed first, if there are multiples.
+
+A name can be prefixed with either an '=' or a '+' character. If an '=' prefix
+is used, all headers that are present with this name will be signed. If a '+'
+prefix if used, all headers that are present with this name will be signed, and
+one signature added for a missing header with the name will be appended.
+
++-------------------------------------------------------+
+|dkim_timestamps|Use: smtp|Type: integer*|Default: unset|
++-------------------------------------------------------+
+
+This option controls the inclusion of timestamp information in the signature.
+If not set, no such information will be included. Otherwise, must be an
+unsigned number giving an offset in seconds from the current time for the
+expiry tag (eg. 1209600 for two weeks); both creation (t=) and expiry (x=) tags
+will be included.
 
-OPTIONAL: When set, this option must expand to (or be specified as) a
-colon-separated list of header names. Headers with these names will be included
-in the message signature. When unspecified, the header names recommended in
-RFC4871 will be used.
+RFC 6376 lists these tags as RECOMMENDED.
 
 
-57.2 Verifying DKIM signatures in incoming mail
+57.3 Verifying DKIM signatures in incoming mail
 -----------------------------------------------
 
-Verification of DKIM signatures in SMTP incoming email is implemented via the 
-acl_smtp_dkim ACL. By default, this ACL is called once for each syntactically
-(!) correct signature in the incoming message. A missing ACL definition
-defaults to accept. If any ACL call does not accept, the message is not
-accepted. If a cutthrough delivery was in progress for the message it is
-summarily dropped (having wasted the transmission effort).
+Verification of DKIM signatures in SMTP incoming email is done for all messages
+for which an ACL control dkim_disable_verify has not been set. Performing
+verification sets up information used by the $authresults expansion item.
 
-To evaluate the signature in the ACL a large number of expansion variables
-containing the signature status and its details are set up during the runtime
-of the ACL.
+The acl_smtp_dkim ACL, which can examine and modify them. By default, this ACL
+is called once for each syntactically(!) correct signature in the incoming
+message. A missing ACL definition defaults to accept. If any ACL call does not
+accept, the message is not accepted. If a cutthrough delivery was in progress
+for the message, that is summarily dropped (having wasted the transmission
+effort).
+
+To evaluate the verification result in the ACL a large number of expansion
+variables containing the signature status and its details are set up during the
+runtime of the ACL.
 
 Calling the ACL only for existing signatures is not sufficient to build more
 advanced policies. For that reason, the global option dkim_verify_signers, and
@@ -35809,6 +36824,9 @@ dkim_verify_signers = $sender_address_domain:$dkim_signers
 If a domain or identity is listed several times in the (expanded) value of 
 dkim_verify_signers, the ACL is only called once for that domain or identity.
 
+If multiple signatures match a domain (or identity), the ACL is called once for
+each matching signature.
+
 Inside the acl_smtp_dkim, the following expansion variables are available (from
 most to least important):
 
@@ -35820,7 +36838,8 @@ $dkim_cur_signer
 
 $dkim_verify_status
 
-    A string describing the general status of the signature. One of
+    Within the DKIM ACL, a string describing the general status of the
+    signature. One of
 
       + none: There is no signature in the message for the current domain or
         identity (as reflected by $dkim_cur_signer).
@@ -35833,6 +36852,23 @@ $dkim_verify_status
 
       + pass: The signature passed verification. It is valid.
 
+    This variable can be overwritten using an ACL 'set' modifier. This might,
+    for instance, be done to enforce a policy restriction on hash-method or
+    key-size:
+
+      warn condition       = ${if eq {$dkim_verify_status}{pass}}
+           condition       = ${if eq {${length_3:$dkim_algo}}{rsa}}
+           condition       = ${if or {{eq {$dkim_algo}{rsa-sha1}} \
+                                      {< {$dkim_key_length}{1024}}}}
+           logwrite        = NOTE: forcing DKIM verify fail (was pass)
+           set dkim_verify_status = fail
+           set dkim_verify_reason = hash too weak or key too short
+
+    So long as a DKIM ACL is defined (it need do no more than accept), after
+    all the DKIM ACL runs have completed, the value becomes a colon-separated
+    list of the values after each run. This is maintained for the mime, prdr
+    and data ACLs.
+
 $dkim_verify_reason
 
     A string giving a little bit more detail when $dkim_verify_status is either
@@ -35854,6 +36890,9 @@ $dkim_verify_reason
         DKIM verification. It may of course also mean that the signature is
         forged.
 
+    This variable can be overwritten, with any value, using an ACL 'set'
+    modifier.
+
 $dkim_domain
 
     The signing domain. IMPORTANT: This variable is only populated if there is
@@ -35872,13 +36911,26 @@ $dkim_selector
 
 $dkim_algo
 
-    The algorithm used. One of 'rsa-sha1' or 'rsa-sha256'.
+    The algorithm used. One of 'rsa-sha1' or 'rsa-sha256'. If running under
+    GnuTLS 3.6.0 or OpenSSL 1.1.1 or later, may also be 'ed25519-sha256'. The
+    "_CRYPTO_SIGN_ED25519" macro will be defined if support is present for EC
+    keys.
+
+    Note that RFC 8301 says:
+
+    rsa-sha1 MUST NOT be used for signing or verifying.
+
+    DKIM signatures identified as having been signed with historic
+    algorithms (currently, rsa-sha1) have permanently failed evaluation
+
+    To enforce this you must have a DKIM ACL which checks this variable and
+    overwrites the $dkim_verify_status variable as discussed above.
 
 $dkim_canon_body
 
     The body canonicalization method. One of 'relaxed' or 'simple'.
 
-dkim_canon_headers
+$dkim_canon_headers
 
     The header canonicalization method. One of 'relaxed' or 'simple'.
 
@@ -35896,6 +36948,11 @@ $dkim_bodylength
     limit was set by the signer, "9999999999999" is returned. This makes sure
     that this variable always expands to an integer value.
 
+    Note: The presence of the signature tag specifying a signing body length is
+    one possible route to spoofing of valid DKIM signatures. A paranoid
+    implementation might wish to regard signature where this variable shows
+    less than the "no limit" return as being invalid.
+
 $dkim_created
 
     UNIX timestamp reflecting the date and time when the signature was created.
@@ -35906,7 +36963,8 @@ $dkim_expires
     UNIX timestamp reflecting the date and time when the signer wants the
     signature to be treated as "expired". When this was not specified by the
     signer, "9999999999999" is returned. This makes it possible to do useful
-    integer size comparisons against this value.
+    integer size comparisons against this value. Note that Exim does not check
+    this value.
 
 $dkim_headernames
 
@@ -35938,6 +36996,15 @@ $dkim_key_length
 
     Number of bits in the key.
 
+    Note that RFC 8301 says:
+
+    Verifiers MUST NOT consider signatures using RSA keys of
+    less than 1024 bits as valid signatures.
+
+    To enforce this you must have a DKIM ACL which checks this variable and
+    overwrites the $dkim_verify_status variable as discussed above. As EC keys
+    are much smaller, the check should only do this for RSA keys.
+
 In addition, two ACL conditions are provided:
 
 dkim_signers
@@ -35973,6 +37040,147 @@ dkim_status
     above for more information of what they mean.
 
 
+57.4 SPF (Sender Policy Framework)
+----------------------------------
+
+SPF is a mechanism whereby a domain may assert which IP addresses may transmit
+messages with its domain in the envelope from, documented by RFC 7208. For more
+information on SPF see http://www.openspf.org.
+
+Messages sent by a system not authorised will fail checking of such assertions.
+This includes retransmissions done by traditional forwarders.
+
+SPF verification support is built into Exim if SUPPORT_SPF=yes is set in Local/
+Makefile. The support uses the libspf2 library https://www.libspf2.org/. There
+is no Exim involvement in the transmission of messages; publishing certain DNS
+records is all that is required.
+
+For verification, an ACL condition and an expansion lookup are provided. 
+Performing verification sets up information used by the $authresults expansion
+item.
+
+The ACL condition "spf" can be used at or after the MAIL ACL. It takes as an
+argument a list of strings giving the outcome of the SPF check, and will
+succeed for any matching outcome. Valid strings are:
+
+pass
+
+    The SPF check passed, the sending host is positively verified by SPF.
+
+fail
+
+    The SPF check failed, the sending host is NOT allowed to send mail for the
+    domain in the envelope-from address.
+
+softfail
+
+    The SPF check failed, but the queried domain can't absolutely confirm that
+    this is a forgery.
+
+none
+
+    The queried domain does not publish SPF records.
+
+neutral
+
+    The SPF check returned a "neutral" state. This means the queried domain has
+    published a SPF record, but wants to allow outside servers to send mail
+    under its domain as well. This should be treated like "none".
+
+permerror
+
+    This indicates a syntax error in the SPF record of the queried domain. You
+    may deny messages when this occurs.
+
+temperror
+
+    This indicates a temporary error during all processing, including Exim's
+    SPF processing. You may defer messages when this occurs.
+
+You can prefix each string with an exclamation mark to invert its meaning, for
+example "!fail" will match all results but "fail". The string list is evaluated
+left-to-right, in a short-circuit fashion.
+
+Example:
+
+deny spf = fail
+     message = $sender_host_address is not allowed to send mail from \
+               ${if def:sender_address_domain \
+                    {$sender_address_domain}{$sender_helo_name}}.  \
+               Please see http://www.openspf.org/Why?scope=\
+               ${if def:sender_address_domain {mfrom}{helo}};\
+               identity=${if def:sender_address_domain \
+                             {$sender_address}{$sender_helo_name}};\
+               ip=$sender_host_address
+
+When the spf condition has run, it sets up several expansion variables:
+
+$spf_header_comment
+
+    This contains a human-readable string describing the outcome of the SPF
+    check. You can add it to a custom header or use it for logging purposes.
+
+$spf_received
+
+    This contains a complete Received-SPF: header that can be added to the
+    message. Please note that according to the SPF draft, this header must be
+    added at the top of the header list. Please see section 10 on how you can
+    do this.
+
+    Note: in case of "Best-guess" (see below), the convention is to put this
+    string in a header called X-SPF-Guess: instead.
+
+$spf_result
+
+    This contains the outcome of the SPF check in string form, one of pass,
+    fail, softfail, none, neutral, permerror or temperror.
+
+$spf_result_guessed
+
+    This boolean is true only if a best-guess operation was used and required
+    in order to obtain a result.
+
+$spf_smtp_comment
+
+    This contains a string that can be used in a SMTP response to the calling
+    party. Useful for "fail".
+
+In addition to SPF, you can also perform checks for so-called "Best-guess".
+Strictly speaking, "Best-guess" is not standard SPF, but it is supported by the
+same framework that enables SPF capability. Refer to http://www.openspf.org/FAQ
+/Best_guess_record for a description of what it means.
+
+To access this feature, simply use the spf_guess condition in place of the spf
+one. For example:
+
+deny spf_guess = fail
+     message = $sender_host_address doesn't look trustworthy to me
+
+In case you decide to reject messages based on this check, you should note that
+although it uses the same framework, "Best-guess" is not SPF, and therefore you
+should not mention SPF at all in your reject message.
+
+When the spf_guess condition has run, it sets up the same expansion variables
+as when spf condition is run, described above.
+
+Additionally, since Best-guess is not standardized, you may redefine what
+"Best-guess" means to you by redefining the main configuration spf_guess
+option. For example, the following:
+
+spf_guess = v=spf1 a/16 mx/16 ptr ?all
+
+would relax host matching rules to a broader network range.
+
+A lookup expansion is also available. It takes an email address as the key and
+an IP address as the database:
+
+  ${lookup {username@domain} spf {ip.ip.ip.ip}}
+
+The lookup will return the same result strings as can appear in $spf_result
+(pass,fail,softfail,neutral,none,err_perm,err_temp). Currently, only IPv4
+addresses are supported.
+
+
 
 ===============================================================================
 58. PROXIES
@@ -35988,9 +37196,8 @@ Exim has support for receiving inbound SMTP connections via a proxy that uses
 "Proxy Protocol" to speak to it. To include this support, include
 "SUPPORT_PROXY=yes" in Local/Makefile.
 
-It was built on specifications from: (http://haproxy.1wt.eu/download/1.5/doc/
-proxy-protocol.txt). That URL was revised in May 2014 to version 2 spec: (http:
-//git.1wt.eu/web?p=haproxy.git;a=commitdiff;h=afb768340c9d7e50d8e).
+It was built on the HAProxy specification, found at https://www.haproxy.org/
+download/1.8/doc/proxy-protocol.txt.
 
 The purpose of this facility is so that an application load balancer, such as
 HAProxy, can sit in front of several Exim servers to distribute load. Exim uses
@@ -36016,11 +37223,11 @@ proxy_external_address
  IP of host being proxied or IP of remote interface of proxy
 proxy_external_port      
  Port of host being proxied or Port on remote interface of proxy
-proxy_local_address 
+proxy_local_address      
  IP of proxy server inbound or IP of local interface of proxy
-proxy_local_port    
+proxy_local_port         
  Port of proxy server inbound or Port on local interface of proxy
-proxy_session         boolean: SMTP connection via proxy
+proxy_session             boolean: SMTP connection via proxy
 
 If $proxy_session is set but $proxy_external_address is empty there was a
 protocol error.
@@ -36150,7 +37357,7 @@ ${utf8_domain_from_alabel:str}
 ${utf8_localpart_to_alabel:str}
 ${utf8_localpart_from_alabel:str}
 
-ACLs may use the following modifier:
+The RCPT ACL may use the following modifier:
 
 control = utf8_downconvert
 control = utf8_downconvert/<value>
@@ -36165,6 +37372,9 @@ appended it may be:
 
 If mua_wrapper is set, the utf8_downconvert control is initially set to -1.
 
+The smtp transport has an option utf8_downconvert. If set it must expand to one
+of the three values described above, and it overrides any previously set value.
+
 There is no explicit support for VRFY and EXPN. Configurations supporting these
 should inspect $smtp_command_argument for an SMTPUTF8 argument.
 
@@ -36186,7 +37396,7 @@ ${imapfolder {<string>} {<sep>} {<specials>}}
 The string is converted from the charset specified by the "headers charset"
 command (in a filter file) or headers_charset main configuration option
 (otherwise), to the modified UTF-7 encoding specified by RFC 2060, with the
-following exception: All occurences of <sep> (which has to be a single
+following exception: All occurrences of <sep> (which has to be a single
 character) are replaced with periods ("."), and all periods and slashes that
 are not <sep> and are not in the <specials> string are BASE64 encoded.
 
@@ -36242,12 +37452,13 @@ must check this, as it will be called for every possible event type.
 
 The current list of events is:
 
+dane:fail              after    transport   per connection
 msg:complete           after    main        per message
 msg:delivery           after    transport   per recipient
 msg:rcpt:host:defer    after    transport   per recipient per host
 msg:rcpt:defer         after    transport   per recipient
 msg:host:defer         after    transport   per attempt
-msg:fail:delivery      after    main        per recipient
+msg:fail:delivery      after    transport   per recipient
 msg:fail:internal      after    main        per recipient
 tcp:connect            before   transport   per connection
 tcp:close              after    transport   per connection
@@ -36264,10 +37475,16 @@ The second column in the table above describes whether the event fires before
 or after the action is associates with. Those which fire before can be used to
 affect that action (more on this below).
 
+The third column in the table above says what section of the configuration
+should define the event action.
+
 An additional variable, $event_data, is filled with information varying with
 the event type:
 
+dane:fail             failure reason
 msg:delivery          smtp confirmation message
+msg:fail:internal     failure reason
+msg:fail:delivery     smtp error message
 msg:rcpt:host:defer   error string
 msg:rcpt:defer        error string
 msg:host:defer        error string
@@ -36292,15 +37509,12 @@ writing to the main log.
 The expansion of the event_action option should normally return an empty
 string. Should it return anything else the following will be forced:
 
-msg:delivery       (ignored)
-msg:host:defer     (ignored)
-msg:fail:delivery  (ignored)
 tcp:connect        do not connect
-tcp:close          (ignored)
 tls:cert           refuse verification
 smtp:connect       close connection
 
-No other use is made of the result string.
+All other message types ignore the result string, and no other use is made of
+it.
 
 For a tcp:connect event, if the connection is being made to a proxy then the
 address and port variables will be that of the proxy and not the target system.
@@ -36346,9 +37560,12 @@ authenticator, or lookup type to Exim:
     , src/auths, or src/lookups); add a line for the new driver or lookup type
     and add it to the definition of OBJ.
 
- 7. Create newdriver.h and newdriver.c in the appropriate sub-directory of src.
+ 7. Edit OS/Makefile-Base adding a .o file for the predefined-macros, to the
+    definition of OBJ_MACRO. Add a set of line to do the compile also.
+
+ 8. Create newdriver.h and newdriver.c in the appropriate sub-directory of src.
 
8. Edit scripts/MakeLinks and add commands to link the .h and .c files as for
9. Edit scripts/MakeLinks and add commands to link the .h and .c files as for
     other drivers and lookups.
 
 Then all you need to do is write the code! A good way to start is to make a