Docs: Change default for hosts_try_dane to *
[exim.git] / doc / doc-docbook / spec.xfpt
index dea7bc76180c9246b775668cb80bfbef991a9968..e48b3539fbd7fc76db5ab683999e2f1bffa3a8c5 100644 (file)
@@ -2528,6 +2528,8 @@ use of Exim's filtering capabilities, you should make the document entitled
 If you are already running Exim on your host, building and installing a new
 version automatically makes it available to MUAs, or any other programs that
 call the MTA directly. However, if you are running an Exim daemon, you do need
+.cindex restart "on HUP signal"
+.cindex signal "HUP, to restart"
 to send it a HUP signal, to make it re-execute itself, and thereby pick up the
 new binary. You do not need to stop processing mail in order to install a new
 version of Exim. The install script does not modify an existing runtime
@@ -2626,6 +2628,7 @@ supplementary group is one of those listed in the &%trusted_groups%&
 configuration option. Note that the Exim group is not automatically trusted.
 
 .cindex '&"From"& line'
+.cindex "envelope from"
 .cindex "envelope sender"
 Trusted users are always permitted to use the &%-f%& option or a leading
 &"From&~"& line to specify the envelope sender of a message that is passed to
@@ -2765,9 +2768,12 @@ used to specify a path on the command line if a pid file is required.
 
 The SIGHUP signal
 .cindex "SIGHUP"
+.cindex restart "on HUP signal"
+.cindex signal "HUP, to restart"
 .cindex "daemon" "restarting"
 .cindex signal "to reload configuration"
 .cindex daemon "reload configuration"
+.cindex reload configuration
 can be used to cause the daemon to re-execute itself. This should be done
 whenever Exim's configuration file, or any file that is incorporated into it by
 means of the &%.include%& facility, is changed, and also whenever a new version
@@ -2877,6 +2883,7 @@ separate document entitled &'Exim's interfaces to mail filtering'&.
 
 When testing a filter file,
 .cindex "&""From""& line"
+.cindex "envelope from"
 .cindex "envelope sender"
 .oindex "&%-f%&" "for filter testing"
 the envelope sender can be set by the &%-f%& option,
@@ -3717,6 +3724,7 @@ between &%-F%& and the <&'string'&> is optional.
 .cindex "sender" "address"
 .cindex "address" "sender"
 .cindex "trusted users"
+.cindex "envelope from"
 .cindex "envelope sender"
 .cindex "user" "trusted"
 This option sets the address of the envelope sender of a locally-generated
@@ -6101,6 +6109,9 @@ dnslookup:
   domains = ! +local_domains
   transport = remote_smtp
   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+.ifdef _HAVE_DNSSEC
+  dnssec_request_domains = *
+.endif
   no_more
 .endd
 The &%domains%& option behaves as per smarthost, above.
@@ -6251,10 +6262,6 @@ 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
@@ -6263,7 +6270,7 @@ This transport is used for delivering messages over SMTP connections.
 The list 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;
+to use DANE for delivery;
 see section &<<SECDANE>>& for more details.
 
 The &%hosts_try_prdr%& option enables an efficiency SMTP option.  It is
@@ -7321,7 +7328,7 @@ with the lookup.
 With &"strict"& a response from the DNS resolver that
 is not labelled as authenticated data
 is treated as equivalent to a temporary DNS error.
-The default is &"never"&.
+The default is &"lax"&.
 
 See also the &$lookup_dnssec_authenticated$& variable.
 
@@ -9211,7 +9218,13 @@ dependent upon the option for which a value is sought; in this documentation,
 options for which string expansion is performed are marked with &dagger; after
 the data type.  ACL rules always expand strings.  A couple of expansion
 conditions do not expand some of the brace-delimited branches, for security
-reasons.
+reasons,
+.new
+.cindex "tainted data" expansion
+.cindex expansion "tainted data"
+and expansion of data deriving from the sender (&"tainted data"&)
+is not permitted.
+.wen
 
 
 
@@ -9361,7 +9374,7 @@ If the ACL returns defer the result is a forced-fail.  Otherwise the expansion f
 .cindex headers "authentication-results:"
 .cindex authentication "expansion item"
 This item returns a string suitable for insertion as an
-&'Authentication-Results"'&
+&'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.
@@ -9645,7 +9658,7 @@ input, but a separator setting is not included in the output. For example:
 ${filter{a:b:c}{!eq{$item}{b}}}
 .endd
 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.
+to what it was before. See also the &%map%& and &%reduce%& expansion items.
 
 
 .vitem &*${hash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
@@ -9996,8 +10009,8 @@ setting is not included in the output. For example:
 ${map{a:b:c}{[$item]}} ${map{<- x-y-z}{($item)}}
 .endd
 expands to &`[a]:[b]:[c] (x)-(y)-(z)`&. At the end of the expansion, the
-value of &$item$& is restored to what it was before. See also the &*filter*&
-and &*reduce*& expansion items.
+value of &$item$& is restored to what it was before. See also the &%filter%&
+and &%reduce%& expansion items.
 
 .vitem &*${nhash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
 .cindex "expansion" "numeric hash"
@@ -10196,7 +10209,7 @@ 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
+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:
 .code
 ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
@@ -10207,7 +10220,7 @@ can be found:
 ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
 .endd
 At the end of a &*reduce*& expansion, the values of &$item$& and &$value$& are
-restored to what they were before. See also the &*filter*& and &*map*&
+restored to what they were before. See also the &%filter%& and &%map%&
 expansion items.
 
 .vitem &*$rheader_*&<&'header&~name'&>&*:*&&~or&~&*$rh_*&<&'header&~name'&>&*:*&
@@ -10467,9 +10480,9 @@ separator explicitly:
 ${addresses:>:$h_from:}
 .endd
 
-Compare the &*address*& (singular)
+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
+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
@@ -10957,11 +10970,15 @@ If the string is a single variable of type certificate,
 returns the SHA-1 hash fingerprint of the certificate.
 
 
-.vitem &*${sha256:*&<&'string'&>&*}*&
+.vitem &*${sha256:*&<&'string'&>&*}*& &&&
+       &*${sha2:*&<&'string'&>&*}*& &&&
+       &*${sha2_<n>:*&<&'string'&>&*}*&
 .cindex "SHA-256 hash"
+.cindex "SHA-2 hash"
 .cindex certificate fingerprint
 .cindex "expansion" "SHA-256 hashing"
 .cindex "&%sha256%& expansion item"
+.cindex "&%sha2%& expansion item"
 The &%sha256%& operator computes the SHA-256 hash value of the string
 and returns
 it as a 64-digit hexadecimal number, in which any letters are in upper case.
@@ -10969,6 +10986,15 @@ it as a 64-digit hexadecimal number, in which any letters are in upper case.
 If the string is a single variable of type certificate,
 returns the SHA-256 hash fingerprint of the certificate.
 
+.new
+The operator can also be spelled &%sha2%& and does the same as &%sha256%&
+(except for certificates, which are not supported).
+Finally, if an underbar
+and a number is appended it specifies the output length, selecting a
+member of the SHA-2 family of hash functions.
+Values of 256, 384 and 512 are accepted, with 256 being the default.
+.wen
+
 
 .vitem &*${sha3:*&<&'string'&>&*}*& &&&
        &*${sha3_<n>:*&<&'string'&>&*}*&
@@ -11349,7 +11375,7 @@ list separator is changed to a comma:
 .code
 ${if forany{<, $recipients}{match{$item}{^user3@}}{yes}{no}}
 .endd
-The value of &$item$& is saved and restored while &*forany*& or &*forall*& is
+The value of &$item$& is saved and restored while &%forany%& or &%forall%& is
 being processed, to enable these expansion items to be nested.
 
 To scan a named list, expand it with the &*listnamed*& operator.
@@ -12050,6 +12076,15 @@ contain the trailing slash. If &$config_file$& does not contain a slash,
 .vindex "&$config_file$&"
 The name of the main configuration file Exim is using.
 
+.new
+.vitem &$dmarc_domain_policy$& &&&
+       &$dmarc_status$& &&&
+       &$dmarc_status_text$& &&&
+       &$dmarc_used_domains$&
+Results of DMARC verification.
+For details see section &<<SECDMARC>>&.
+.wen
+
 .vitem &$dkim_verify_status$&
 Results of DKIM verification.
 For details see section &<<SECDKIMVFY>>&.
@@ -12277,7 +12312,7 @@ the result, the name is not accepted, and &$host_lookup_deferred$& is set to
 
 .cindex authentication "expansion item"
 Performing these checks sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
 
 
 .vitem &$host_lookup_failed$&
@@ -12743,6 +12778,16 @@ or if not set, the value of &$qualify_domain$&.
 .cindex queues named
 The name of the spool queue in use; empty for the default queue.
 
+.new
+.vitem &$r_...$&
+.vindex &$r_...$&
+.cindex router variables
+Values can be placed in these variables by the &%set%& option of a router.
+They can be given any name that starts with &$r_$&.
+The values persist for the address being handled through subsequent routers
+and the eventual transport.
+.wen
+
 .vitem &$rcpt_count$&
 .vindex "&$rcpt_count$&"
 When a message is being received by SMTP, this variable contains the number of
@@ -14310,7 +14355,9 @@ listed in more than one group.
 See also the &'Policy controls'& section above.
 
 .table2
-.row &%dkim_verify_signers%&         "DKIM domain for which DKIM ACL is run"
+.row &%dkim_verify_hashes%&          "DKIM hash methods accepted for signatures"
+.row &%dkim_verify_keytypes%&        "DKIM key types accepted for signatures"
+.row &%dkim_verify_signers%&         "DKIM domains for which DKIM ACL is run"
 .row &%host_lookup%&                 "host name looked up for these hosts"
 .row &%host_lookup_order%&           "order of DNS and local name lookups"
 .row &%recipient_unqualified_hosts%& "may send unqualified recipients"
@@ -14355,6 +14402,7 @@ See also the &'Policy controls'& section above.
 .row &%ignore_fromline_hosts%&       "allow &""From ""& from these hosts"
 .row &%ignore_fromline_local%&       "allow &""From ""& from local SMTP"
 .row &%pipelining_advertise_hosts%&  "advertise pipelining to these hosts"
+.row &%pipelining_connect_advertise_hosts%& "advertise pipelining to these hosts"
 .row &%prdr_enable%&                 "advertise PRDR to all hosts"
 .row &%smtputf8_advertise_hosts%&    "advertise SMTPUTF8 to these hosts"
 .row &%tls_advertise_hosts%&         "advertise TLS to these hosts"
@@ -14640,13 +14688,20 @@ recommended, except when you have no other choice.
 .cindex "UTF-8" "in domain name"
 Lots of discussion is going on about internationalized domain names. One
 camp is strongly in favour of just using UTF-8 characters, and it seems
-that at least two other MTAs permit this. This option allows Exim users to
-experiment if they wish.
+that at least two other MTAs permit this.
+This option allows Exim users to experiment if they wish.
 
 If it is set true, Exim's domain parsing function allows valid
 UTF-8 multicharacters to appear in domain name components, in addition to
-letters, digits, and hyphens. However, just setting this option is not
-enough; if you want to look up these domain names in the DNS, you must also
+letters, digits, and hyphens.
+
+.new
+If Exim is built with internationalization support
+and the SMTPUTF8 ESMTP option is in use (see chapter &<<CHAPi18n>>&)
+this option can be left as default.
+.wen
+Without that,
+if you want to look up such domain names in the DNS, you must also
 adjust the value of &%dns_check_names_pattern%& to match the extended form. A
 suitable setting is:
 .code
@@ -15054,6 +15109,27 @@ etc. are ignored. If IP literals are enabled, the &(ipliteral)& router declines
 to handle IPv6 literal addresses.
 
 
+.new
+.option dkim_verify_hashes main "string list" "sha256 : sha512 : sha1"
+.cindex DKIM "selecting signature algorithms"
+This option gives a list of hash types which are acceptable in signatures,
+and an order of processing.
+Signatures with algorithms not in the list will be ignored.
+
+Note that the presence of sha1 violates RFC 8301.
+Signatures using the rsa-sha1 are however (as of writing) still common.
+The default inclusion of sha1 may be dropped in a future release.
+
+.option dkim_verify_keytypes main "string list" "ed25519 : rsa"
+This option gives a list of key types which are acceptable in signatures,
+and an order of processing.
+Signatures with algorithms not in the list will be ignored.
+
+.option dkim_verify_minimal main boolean false
+If set to true, verification of signatures will terminate after the
+first success.
+.wen
+
 .option dkim_verify_signers main "domain list&!!" $dkim_signers
 .cindex DKIM "controlling calls to the ACL"
 This option gives a list of DKIM domains for which the DKIM ACL is run.
@@ -15145,6 +15221,11 @@ domain matches this list.
 This is a fudge to help with name servers that give big delays or otherwise do
 not work for the AAAA record type. In due course, when the world's name
 servers have all been upgraded, there should be no need for this option.
+.new
+Note that all lookups, including those done for verification, are affected;
+this will result in verify failure for IPv6 connections or ones using names
+only valid for IPv6 addresses.
+.wen
 
 
 .option dns_retrans main time 0s
@@ -15874,6 +15955,7 @@ and no &'Sender:'& header is ever added. If, in addition, you want to retain
 &'Sender:'& header lines supplied by untrusted users, you must also set
 &%local_sender_retain%& to be true.
 
+.cindex "envelope from"
 .cindex "envelope sender"
 These options affect only the header lines in the message. The envelope sender
 is still forced to be the login id at the qualify domain unless
@@ -15974,6 +16056,10 @@ 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 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.
+.new
+A path must start with a slash.
+To send to syslog, use the word &"syslog"&.
+.wen
 Chapter &<<CHAPlog>>& contains further details about Exim's logging, and
 section &<<SECTwhelogwri>>& describes how the contents of &%log_file_path%& are
 used. If this string is fixed at your installation (contains no expansion
@@ -16360,6 +16446,21 @@ for each SMTP command and response. When PIPELINING is advertised, Exim assumes
 that clients will use it; &"out of order"& commands that are &"expected"& do
 not count as protocol errors (see &%smtp_max_synprot_errors%&).
 
+.new
+.option pipelining_connect_advertise_hosts main "host list&!!" *
+.cindex "pipelining" "early connection"
+.cindex "pipelining" PIPE_CONNECT
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+this option controls which hosts the facility is advertised to
+and from which pipeline early-connection (before MAIL) SMTP
+commands are acceptable.
+When used, the pipelining saves on roundtrip times.
+
+See also the &%hosts_pipe_connect%& smtp transport option.
+
+Currently the option name &"X_PIPE_CONNECT"& is used.
+.wen
+
 
 .option prdr_enable main boolean false
 .cindex "PRDR" "enabling on server"
@@ -16818,11 +16919,11 @@ it qualifies them only if the message came from a host that matches
 &%sender_unqualified_hosts%&, or if the message was submitted locally (not
 using TCP/IP), and the &%-bnq%& option was not set.
 
-.option set_environment main "string list" empty
+.option add_environment main "string list" empty
 .cindex "environment"
-This option allows to set individual environment variables that the
+This option allows to add individual environment variables that the
 currently linked libraries and programs in child processes use. The
-default list is empty,
+default list is empty.
 
 
 .option slow_lookup_log main integer 0
@@ -17564,8 +17665,8 @@ is not required the &%tls_advertise_hosts%& option should be set empty.
 .cindex "TLS" "server certificate; location of"
 .cindex "certificate" "server, location of"
 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.
+files which contain the server's certificates (in PEM format).
+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
 &<<CHAPTLS>>& for further details.
@@ -17634,7 +17735,14 @@ larger prime than requested.
 The value of this option is expanded and indicates the source of DH parameters
 to be used by Exim.
 
-&*Note: The Exim Maintainers strongly recommend using a filename with site-generated
+.new
+This option is ignored for GnuTLS version 3.6.0 and later.
+The library manages parameter negotiation internally.
+.wen
+
+&*Note: The Exim Maintainers strongly recommend,
+for other TLS library versions,
+using a filename with site-generated
 local DH parameters*&, which has been supported across all versions of Exim.  The
 other specific constants available are a fallback so that even when
 "unconfigured", Exim can offer Perfect Forward Secrecy in older ciphersuites in TLS.
@@ -17730,10 +17838,30 @@ 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
+.new
+For OpenSSL 1.1.0 or later, and
+.wen
+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.
 
+.new
+The file(s) should be in DER format,
+except for GnuTLS 3.6.3 or later
+or for OpenSSL,
+when an optional filetype prefix can be used.
+The prefix must be one of "DER" or "PEM", followed by
+a single space.  If one is used it sets the format for subsequent
+files in the list; the initial format is DER.
+If multiple proofs are wanted, for multiple chain elements
+(this only works under TLS1.3)
+they must be coded as a combined OCSP response.
+
+Although GnuTLS will accept PEM files with multiple separate
+PEM blobs (ie. separate OCSP responses), it sends them in the
+TLS Certificate record interleaved with the certificates of the chain;
+although a GnuTLS client is happy with that, an OpenSSL client is not.
+.wen
 
 .option tls_on_connect_ports main "string list" unset
 .cindex SSMTP
@@ -17891,6 +18019,7 @@ See &%unknown_login%&.
 .cindex "sender" "setting by untrusted user"
 .cindex "untrusted user setting sender"
 .cindex "user" "untrusted setting sender"
+.cindex "envelope from"
 .cindex "envelope sender"
 When an untrusted user submits a message to Exim using the standard input, Exim
 normally creates an envelope sender address from the user's login and the
@@ -18041,6 +18170,10 @@ file = ${extract{mailbox}{$address_data}}
 This makes the configuration file less messy, and also reduces the number of
 lookups (though Exim does cache lookups).
 
+.new
+See also the &%set%& option below.
+.wen
+
 .vindex "&$sender_address_data$&"
 .vindex "&$address_data$&"
 The &%address_data%& facility is also useful as a means of passing information
@@ -18246,7 +18379,7 @@ or for any deliveries caused by this router. You should not set this option
 unless you really, really know what you are doing. See also the generic
 transport option of the same name.
 
-.option dnssec_request_domains routers "domain list&!!" unset
+.option dnssec_request_domains routers "domain list&!!" *
 .cindex "MX record" "security"
 .cindex "DNSSEC" "MX lookup"
 .cindex "security" "MX lookup"
@@ -18293,6 +18426,7 @@ Not effective on redirect routers.
 
 
 .option errors_to routers string&!! unset
+.cindex "envelope from"
 .cindex "envelope sender"
 .cindex "router" "changing address for errors"
 If a router successfully handles an address, it may assign the address to a
@@ -18821,11 +18955,24 @@ latter kind.
 
 This option controls whether the local part is used to form the key for retry
 hints for addresses that suffer temporary errors while being handled by this
-router. The default value is true for any router that has &%check_local_user%&
+.new
+router. The default value is true for any router that has any of
+&%check_local_user%&,
+&%local_parts%&,
+&%condition%&,
+&%local_part_prefix%&,
+&%local_part_suffix%&,
+&%senders%& or
+&%require_files%&
+.wen
 set, and false otherwise. Note that this option does not apply to hints keys
 for transport delays; they are controlled by a generic transport option of the
 same name.
 
+Failing to set this option when it is needed
+(because a remote router handles only some of the local-parts for a domain)
+can result in incorrect error messages being generated.
+
 The setting of &%retry_use_local_part%& applies only to the router on which it
 appears. If the router generates child addresses, they are routed
 independently; this setting does not become attached to them.
@@ -18954,6 +19101,32 @@ SMTP VRFY command is enabled, it must be used after MAIL if the sender address
 matters.
 
 
+.new
+.option set routers "string list" unset
+.cindex router variables
+This option may be used multiple times on a router;
+because of this the list aspect is mostly irrelevant.
+The list separator is a semicolon but can be changed in the
+usual way.
+
+Each list-element given must be of the form $"name = value"$
+and the names used must start with the string &"r_"&.
+Values containing a list-separator should have them doubled.
+When a router runs, the strings are evaluated in order,
+to create variables which are added to the set associated with
+the address.
+The variable is set with the expansion of the value.
+The variables can be used by the router options
+(not including any preconditions)
+and by the transport.
+Later definitions of a given named variable will override former ones.
+Varible use is via the usual &$r_...$& syntax.
+
+This is similar to the &%address_data%& option, except that
+many independent variables can be used, with choice of naming.
+.wen
+
+
 .option translate_ip_address routers string&!! unset
 .cindex "IP address" "translating"
 .cindex "packet radio"
@@ -21739,6 +21912,7 @@ on a remote transport in the current implementation.
 
 .option return_path transports string&!! unset
 .cindex "envelope sender"
+.cindex "envelope from"
 .cindex "transport" "return path; changing"
 .cindex "return path" "changing in transport"
 If this option is set, the string is expanded at transport time and replaces
@@ -22733,6 +22907,15 @@ sometimes add other information onto the ends of message filenames.
 
 Section &<<SECID136>>& contains further information.
 
+.new
+This option should not be used when other message-handling software
+may duplicate messages by making hardlinks to the files.  When that is done Exim
+will count the message size once for each filename, in contrast with the actual
+disk usage.  When the option is not set, calculating total usage requires
+a system-call per file to get the size; the number of links is then available also
+as is used to adjust the effective size.
+.wen
+
 
 .option quota_warn_message appendfile string&!! "see below"
 See below for the use of this option. If it is not set when
@@ -22785,6 +22968,7 @@ percentage.
 
 
 .option use_bsmtp appendfile boolean false
+.cindex "envelope from"
 .cindex "envelope sender"
 If this option is set true, &(appendfile)& writes messages in &"batch SMTP"&
 format, with the envelope sender and recipient(s) included as SMTP commands. If
@@ -23669,7 +23853,7 @@ 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
+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 similarly to &$pipe_addresses$& above.  It is expanded and each
 argument is inserted in the argument list at that point
@@ -24326,15 +24510,23 @@ of the message. Its value must not be zero. See also &%final_timeout%&.
 
 
 .option dkim_canon smtp string&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_domain smtp string list&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_hash smtp string&!! sha256
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_identity smtp string&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_private_key smtp string&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_selector smtp string&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_strict smtp string&!! unset
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_sign_headers smtp string&!! "per RFC"
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 .option dkim_timestamps smtp string&!! unset
-DKIM signing options.  For details see section &<<SECDKIMSIGN>>&.
+DKIM signing option.  For details see section &<<SECDKIMSIGN>>&.
 
 
 .option delay_after_cutoff smtp boolean true
@@ -24376,14 +24568,15 @@ See the &%search_parents%& option in chapter &<<CHAPdnslookup>>& for more
 details.
 
 
-.option dnssec_request_domains smtp "domain list&!!" unset
+.option dnssec_request_domains smtp "domain list&!!" *
 .cindex "MX record" "security"
 .cindex "DNSSEC" "MX lookup"
 .cindex "security" "MX lookup"
 .cindex "DNS" "DNSSEC"
 DNS lookups for domains matching &%dnssec_request_domains%& will be done with
-the dnssec request bit set.
-This applies to all of the SRV, MX, AAAA, A lookup sequence.
+the dnssec request bit set. Setting this transport option is only useful if the
+transport overrides or sets the host names. See the &%dnssec_request_domains%&
+router option.
 
 
 
@@ -24393,9 +24586,9 @@ This applies to all of the SRV, MX, AAAA, A lookup sequence.
 .cindex "security" "MX lookup"
 .cindex "DNS" "DNSSEC"
 DNS lookups for domains matching &%dnssec_require_domains%& will be done with
-the dnssec request bit set.  Any returns not having the Authenticated Data bit
-(AD bit) set will be ignored and logged as a host-lookup failure.
-This applies to all of the SRV, MX, AAAA, A lookup sequence.
+the dnssec request bit set.  Setting this transport option is only
+useful if the transport overrides or sets the host names. See the
+&%dnssec_require_domains%& router option.
 
 
 
@@ -24540,6 +24733,32 @@ facilities such as AUTH, PIPELINING, SIZE, and STARTTLS.
 Exim will not use the SMTP PIPELINING extension when delivering to any host
 that matches this list, even if the server host advertises PIPELINING support.
 
+.new
+.option hosts_pipe_connect smtp "host list&!!" unset
+.cindex "pipelining" "early connection"
+.cindex "pipelining" PIPE_CONNECT
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+this option controls which to hosts the facility watched for
+and recorded, and used for subsequent connections.
+
+The retry hints database is used for the record,
+and records are subject to the &%retry_data_expire%& option.
+When used, the pipelining saves on roundtrip times.
+It also turns SMTP into a client-first protocol
+so combines well with TCP Fast Open.
+
+See also the &%pipelining_connect_advertise_hosts%& main option.
+
+Note:
+When the facility is used, the transport &%helo_data%& option
+will be expanded before the &$sending_ip_address$& variable
+is filled in.
+A check is made for the use of that variable, without the
+presence of a &"def:"& test on it, but suitably complex coding
+can avoid the check and produce unexpected results.
+You have been warned.
+.wen
+
 
 .option hosts_avoid_tls smtp "host list&!!" unset
 .cindex "TLS" "avoiding for certain hosts"
@@ -24579,13 +24798,15 @@ been started will not be passed to a new delivery process for sending another
 message on the same connection. See section &<<SECTmulmessam>>& for an
 explanation of when this might be needed.
 
-.option hosts_noproxy_tls smtp "host list&!!" *
+.new
+.option hosts_noproxy_tls smtp "host list&!!" unset
 .cindex "TLS" "passing connection"
 .cindex "multiple SMTP deliveries"
 .cindex "TLS" "multiple message deliveries"
 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.
+.wen
 
 The traditional implementation closes down TLS and re-starts it in the new
 process, on the same open TCP connection, for each successive message
@@ -24648,7 +24869,8 @@ TLS session for any host that matches this list.
 .cindex DANE "requiring for certain servers"
 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.
+and that a DANE-verified TLS connection is made. See
+the &%dnssec_request_domains%& router and transport options.
 There will be no fallback to in-clear communication.
 See section &<<SECDANE>>&.
 
@@ -24681,17 +24903,17 @@ 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.
 
-.option hosts_try_dane smtp "host list&!!" unset
+.option hosts_try_dane smtp "host list&!!" *
 .cindex DANE "transport options"
 .cindex DANE "attempting for certain servers"
-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.
+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. See
+the &%dnssec_request_domains%& router and transport options.
+There will be no fallback to in-clear communication.
 See section &<<SECDANE>>&.
 
-.option hosts_try_fastopen smtp "host list&!!" unset
+.option hosts_try_fastopen smtp "host list&!!" *
 .cindex "fast open, TCP" "enabling, in client"
 .cindex "TCP Fast Open" "enabling, in client"
 .cindex "RFC 7413" "TCP Fast Open"
@@ -25254,6 +25476,7 @@ When an address is being routed, either for delivery or for verification,
 rewriting is applied immediately to child addresses that are generated by
 redirection, unless &%no_rewrite%& is set on the router.
 
+.cindex "envelope from"
 .cindex "envelope sender" "rewriting at transport time"
 .cindex "rewriting" "at transport time"
 .cindex "header lines" "rewriting at transport time"
@@ -26526,7 +26749,7 @@ no successful authentication.
 
 .cindex authentication "expansion item"
 Successful authentication sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
 
 
 
@@ -28370,6 +28593,13 @@ transport provide the client with a certificate, which is passed to the server
 if it requests it. If the server is Exim, it will request a certificate only if
 &%tls_verify_hosts%& or &%tls_try_verify_hosts%& matches the client.
 
+.new
+Do not use a certificate which has the OCSP-must-staple extension,
+for client use (they are usable for server use).
+As TLS has no means for the client to staple before TLS 1.3 it will result
+in failed connections.
+.wen
+
 If the &%tls_verify_certificates%& option is set on the &(smtp)& transport, it
 specifies a collection of expected server certificates.
 These may be
@@ -28493,7 +28723,7 @@ Great care should be taken to deal with matters of case, various injection
 attacks in the string (&`../`& or SQL), and ensuring that a valid filename
 can always be referenced; it is important to remember that &$tls_in_sni$& is
 arbitrary unverified data provided prior to authentication.
-Further, the initial certificate is loaded before SNI is arrived, so
+Further, the initial certificate is loaded before SNI has arrived, so
 an expansion for &%tls_certificate%& must have a default which is used
 when &$tls_in_sni$& is empty.
 
@@ -28688,7 +28918,12 @@ Support for client-side operation of DANE can be included at compile time by def
 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).
+A TLSA record consist of 4 fields, the "Certificate Usage", the
+"Selector", the "Matching type", and the "Certificate Association Data".
+For a detailed description of the TLSA record see
+&url(https://tools.ietf.org/html/rfc7671#page-5,RFC 7671).
+
+The TLSA record for the server may have "Certificate Usage" (1st) field 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);
@@ -28729,19 +28964,29 @@ 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 &url(https://letsencrypt.org/,Let's Encrypt) instead.
 
-The TLSA record should have a Selector field of SPKI(1) and a Matching Type field of SHA2-512(2).
+The TLSA record should have a "Selector" (2nd) field of SPKI(1) and
+a "Matching Type" (3rd) field of SHA2-512(2).
 
-At the time of writing, &url(https://www.huque.com/bin/gen_tlsa)
-is useful for quickly generating TLSA records; and commands like
+For the "Certificate Authority Data" (4th) field, commands like
 
 .code
-  openssl x509 -in -pubkey -noout <certificate.pem \
+  openssl x509 -pubkey -noout <certificate.pem \
   | openssl rsa -outform der -pubin 2>/dev/null \
   | openssl sha512 \
   | awk '{print $2}'
 .endd
 
-are workable for 4th-field hashes.
+are workable to create a hash of the certificate's public key.
+
+An example TLSA record for DANE-EE(3), SPKI(1), and SHA-512 (2) looks like
+
+.code
+  _25._tcp.mail.example.com. TLSA 3 1 2 8BA8A336E...
+.endd
+
+At the time of writing, &url(https://www.huque.com/bin/gen_tlsa)
+is useful for quickly generating TLSA records.
+
 
 For use with the DANE-TA model, server certificates must have a correct name (SubjectName or SubjectAltName).
 
@@ -28775,7 +29020,9 @@ those who use &%hosts_require_ocsp%&, should consider the interaction with DANE
 
 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.
+The require variant will result in failure if the target host is not
+DNSSEC-secured. To get DNSSEC-secured hostname resolution, use
+the &%dnssec_request_domains%& router or transport option.
 
 DANE will only be usable if the target host has DNSSEC-secured MX, A and TLSA records.
 
@@ -28805,7 +29052,8 @@ If DANE is requested and useable (see above) the following transport options are
 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.
+The router and transport option &%dnssec_request_domains%& must not be
+set to "never" 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".
 
@@ -30688,7 +30936,9 @@ the next &%local_parts%& test.
 .cindex "&ACL;" "virus scanning"
 .cindex "&ACL;" "scanning for viruses"
 This condition is available only when Exim is compiled with the
-content-scanning extension. It causes the incoming message to be scanned for
+content-scanning extension
+and only after a DATA command.
+It causes the incoming message to be scanned for
 viruses. For details, see chapter &<<CHAPexiscan>>&.
 
 .vitem &*mime_regex&~=&~*&<&'list&~of&~regular&~expressions'&>
@@ -30849,7 +31099,7 @@ client host, and its contents have been verified. If there has been no previous
 attempt to verify the HELO/EHLO contents, it is carried out when this
 condition is encountered. See the description of the &%helo_verify_hosts%& and
 &%helo_try_verify_hosts%& options for details of how to request verification
-independently of this condition.
+independently of this condition, and for detail of the verification.
 
 For SMTP input that does not come over TCP/IP (the &%-bs%& command line
 option), this condition is always true.
@@ -32476,6 +32726,15 @@ It supports a &"generic"& interface to scanners called via the shell, and
 specialized interfaces for &"daemon"& type virus scanners, which are resident
 in memory and thus are much faster.
 
+.new
+Since message data needs to have arrived,
+the condition may be only called in ACL defined by
+&%acl_smtp_data%&,
+&%acl_smtp_data_prdr%&,
+&%acl_smtp_mime%& or
+&%acl_smtp_dkim%&
+.wen
+
 A timeout of 2 minutes is applied to a scanner call (by default);
 if it expires then a defer action is taken.
 
@@ -34357,6 +34616,7 @@ headers remove "Old-Subject"
 
 
 .section "Setting an errors address in a system filter" "SECID217"
+.cindex "envelope from"
 .cindex "envelope sender"
 In a system filter, if a &%deliver%& command is followed by
 .code
@@ -34590,6 +34850,7 @@ other words, such qualification is also controlled by
 .cindex "sender" "address"
 .oindex "&%uucp_from_pattern%&"
 .oindex "&%uucp_from_sender%&"
+.cindex "envelope from"
 .cindex "envelope sender"
 .cindex "Sendmail compatibility" "&""From""& line"
 Messages that have come from UUCP (and some other applications) often begin
@@ -36038,6 +36299,7 @@ the address, giving a suitable error message.
 .section "Variable Envelope Return Paths (VERP)" "SECTverp"
 .cindex "VERP"
 .cindex "Variable Envelope Return Paths"
+.cindex "envelope from"
 .cindex "envelope sender"
 Variable Envelope Return Paths &-- see &url(https://cr.yp.to/proto/verp.txt) &--
 are a way of helping mailing list administrators discover which subscription
@@ -37365,6 +37627,15 @@ 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.
+
+.new
+.cindex "pipelining" "early connection"
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+accept "L" fields have a period appended if the feature was
+offered but not used, or an asterisk appended if used.
+Delivery "L" fields have an asterisk appended if used.
+.wen
+
 .next
 .cindex "log" "queue run"
 .cindex "queue runner" "logging"
@@ -37720,6 +37991,11 @@ Match only frozen messages.
 
 .vitem &*-x*&
 Match only non-frozen messages.
+
+.new
+.vitem &*-G*&&~<&'queuename'&>
+Match only messages in the given queue.  Without this, the default queue is searched.
+.wen
 .endlist
 
 The following options control the format of the output:
@@ -39407,6 +39683,11 @@ was received from the client, this records the Distinguished Name from that
 certificate.
 .endlist
 
+.new
+Any of the above may have an extra hyphen prepended, to indicate the the
+corresponding data is untrusted.
+.wen
+
 Following the options there is a list of those addresses to which the message
 is not to be delivered. This set of addresses is initialized from the command
 line when the &%-t%& option is used and &%extract_addresses_remove_arguments%&
@@ -39515,11 +39796,11 @@ There is no dot-stuffing (and no dot-termination).
 . ////////////////////////////////////////////////////////////////////////////
 . ////////////////////////////////////////////////////////////////////////////
 
-.chapter "DKIM and SPF" "CHAPdkim" &&&
-         "DKIM and SPF Support"
-.cindex "DKIM"
+.chapter "DKIM, SPF and DMARC" "CHAPdkim" &&&
+         "DKIM, SPF and DMARC Support"
 
 .section "DKIM (DomainKeys Identified Mail)" SECDKIM
+.cindex "DKIM"
 
 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
@@ -39753,15 +40034,28 @@ RFC 6376 lists these tags as RECOMMENDED.
 
 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.
+.new
+.cindex DKIM "selecting signature algorithms"
+Individual classes of signature algorithm can be ignored by changing
+the main options &%dkim_verify_hashes%& or &%dkim_verify_keytypes%&.
+The &%dkim_verify_minimal%& option can be set to cease verification
+processing for a message once the first passing signature is found.
+.wen
+
 .cindex authentication "expansion item"
 Performing verification sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
+
+.new
+For most purposes the default option settings suffice and the remainder
+of this section can be ignored.
+.wen
 
-The results of that verification are then made available to the
+The results of verification are made available to 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.
+By default, the ACL is called once for each
+syntactically(!) correct signature in the incoming message.
 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).
@@ -39772,11 +40066,11 @@ 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 a global expansion variable
+more advanced policies. For that reason, the main option
+&%dkim_verify_signers%&, and an expansion variable
 &%$dkim_signers%& exist.
 
-The global option &%dkim_verify_signers%& can be set to a colon-separated
+The main option &%dkim_verify_signers%& can be set to a colon-separated
 list of DKIM domains or identities for which the ACL &%acl_smtp_dkim%& is
 called. It is expanded when the message has been received. At this point,
 the expansion variable &%$dkim_signers%& already contains a colon-separated
@@ -39814,7 +40108,7 @@ 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
+Inside the DKIM ACL, the following expansion variables are
 available (from most to least important):
 
 
@@ -39908,8 +40202,12 @@ DKIM signatures identified as having been signed with historic
 algorithms (currently, rsa-sha1) have permanently failed evaluation
 .endd
 
-To enforce this you must have a DKIM ACL which checks this variable
-and overwrites the &$dkim_verify_status$& variable as discussed above.
+To enforce this you must either have a DKIM ACL which checks this variable
+and overwrites the &$dkim_verify_status$& variable as discussed above,
+.new
+or have set the main option &%dkim_verify_hashes%& to exclude
+processing of such signatures.
+.wen
 
 .vitem &%$dkim_canon_body%&
 The body canonicalization method. One of 'relaxed' or 'simple'.
@@ -40039,7 +40337,7 @@ publishing certain DNS records is all that is required.
 For verification, an ACL condition and an expansion lookup are provided.
 .cindex authentication "expansion item"
 Performing verification sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
 
 
 .cindex SPF "ACL condition"
@@ -40176,7 +40474,11 @@ would relax host matching rules to a broader network range.
 .cindex SPF "lookup expansion"
 .cindex lookup spf
 A lookup expansion is also available. It takes an email
-address as the key and an IP address as the database:
+address as the key and an IP address
+.new
+(v4 or v6)
+.wen
+as the database:
 
 .code
   ${lookup {username@domain} spf {ip.ip.ip.ip}}
@@ -40184,7 +40486,241 @@ address as the key and an IP address as the database:
 
 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.
+
+
+
+
+
+.new
+.section DMARC SECDMARC
+.cindex DMARC verification
+
+DMARC combines feedback from SPF, DKIM, and header From: in order
+to attempt to provide better indicators of the authenticity of an
+email.  This document does not explain the fundamentals; you
+should read and understand how it works by visiting the website at
+&url(http://www.dmarc.org/).
+
+If Exim is built with DMARC support,
+the libopendmarc library is used.
+
+For building Exim yourself, obtain the library from
+&url(http://sourceforge.net/projects/opendmarc/)
+to obtain a copy, or find it in your favorite rpm package
+repository.  You will need to attend to the local/Makefile feature
+SUPPORT_DMARC and the associated LDFLAGS addition.
+This description assumes
+that headers will be in /usr/local/include, and that the libraries
+are in /usr/local/lib.
+
+. subsection
+
+There are three main-configuration options:
+.cindex DMARC "configuration options"
+
+The &%dmarc_tld_file%& option
+.oindex &%dmarc_tld_file%&
+defines the location of a text file of valid
+top level domains the opendmarc library uses
+during domain parsing. Maintained by Mozilla,
+the most current version can be downloaded
+from a link at &url(https://publicsuffix.org/list/, currently pointing
+at https://publicsuffix.org/list/public_suffix_list.dat)
+See also util/renew-opendmarc-tlds.sh script.
+The default for the option is /etc/exim/opendmarc.tlds.
+
+
+The &%dmarc_history_file%& option, if set
+.oindex &%dmarc_history_file%&
+defines the location of a file to log results
+of dmarc verification on inbound emails. The
+contents are importable by the opendmarc tools
+which will manage the data, send out DMARC
+reports, and expire the data. Make sure the
+directory of this file is writable by the user
+exim runs as.
+The default is unset.
+
+The &%dmarc_forensic_sender%& option
+.oindex &%dmarc_forensic_sender%&
+defines an alternate email address to use when sending a
+forensic report detailing alignment failures
+if a sender domain's dmarc record specifies it
+and you have configured Exim to send them.
+If set, this is expanded and used for the
+From: header line; the address is extracted
+from it and used for the envelope from.
+If not set (the default), the From: header is expanded from
+the dsn_from option, and <> is used for the
+envelope from.
+
+. I wish we had subsections...
+
+.cindex DMARC controls
+By default, the DMARC processing will run for any remote,
+non-authenticated user.  It makes sense to only verify DMARC
+status of messages coming from remote, untrusted sources.  You can
+use standard conditions such as hosts, senders, etc, to decide that
+DMARC verification should *not* be performed for them and disable
+DMARC with a control setting:
+.code
+  control = dmarc_disable_verify
+.endd
+A DMARC record can also specify a "forensic address", which gives
+exim an email address to submit reports about failed alignment.
+Exim does not do this by default because in certain conditions it
+results in unintended information leakage (what lists a user might
+be subscribed to, etc).  You must configure exim to submit forensic
+reports to the owner of the domain.  If the DMARC record contains a
+forensic address and you specify the control statement below, then
+exim will send these forensic emails.  It's also advised that you
+configure a dmarc_forensic_sender because the default sender address
+construction might be inadequate.
+.code
+  control = dmarc_enable_forensic
+.endd
+(AGAIN: You can choose not to send these forensic reports by simply
+not putting the dmarc_enable_forensic control line at any point in
+your exim config.  If you don't tell it to send them, it will not
+send them.)
+
+There are no options to either control.  Both must appear before
+the DATA acl.
+
+. subsection
+
+DMARC checks cam be run on incoming SMTP  messages by using the
+"dmarc_status" ACL condition in the DATA ACL.  You are required to
+call the "spf" condition first in the ACLs, then the "dmarc_status"
+condition.  Putting this condition in the ACLs is required in order
+for a DMARC check to actually occur.  All of the variables are set
+up before the DATA ACL, but there is no actual DMARC check that
+occurs until a "dmarc_status" condition is encountered in the ACLs.
+
+The dmarc_status condition takes a list of strings on its
+right-hand side.  These strings describe recommended action based
+on the DMARC check.  To understand what the policy recommendations
+mean, refer to the DMARC website above.  Valid strings are:
+.display
+&'accept      '& The DMARC check passed and the library recommends accepting the email.
+&'reject      '& The DMARC check failed and the library recommends rejecting the email.
+&'quarantine  '& The DMARC check failed and the library recommends keeping it for further inspection.
+&'none        '& The DMARC check passed and the library recommends no specific action, neutral.
+&'norecord    '& No policy section in the DMARC record for this sender domain.
+&'nofrom      '& Unable to determine the domain of the sender.
+&'temperror   '& Library error or dns error.
+&'off         '& The DMARC check was disabled for this email.
+.endd
+You can prefix each string with an exclamation mark to invert its
+meaning, for example "!accept" will match all results but
+"accept".  The string list is evaluated left-to-right in a
+short-circuit fashion.  When a string matches the outcome of the
+DMARC check, the condition succeeds.  If none of the listed
+strings matches the outcome of the DMARC check, the condition
+fails.
+
+Of course, you can also use any other lookup method that Exim
+supports, including LDAP, Postgres, MySQL, etc, as long as the
+result is a list of colon-separated strings.
+
+Performing the check sets up information used by the
+&%authresults%& expansion item.
+
+Several expansion variables are set before the DATA ACL is
+processed, and you can use them in this ACL.  The following
+expansion variables are available:
+
+&$dmarc_status$&
+.vindex &$dmarc_status$&
+.cindex DMARC result
+is a one word status indicating what the DMARC library
+thinks of the email.  It is a combination of the results of
+DMARC record lookup and the SPF/DKIM/DMARC processing results
+(if a DMARC record was found).  The actual policy declared
+in the DMARC record is in a separate expansion variable.
+
+&$dmarc_status_text$&
+.vindex &$dmarc_status_text$&
+is a slightly longer, human readable status.
+
+&$dmarc_used_domain$&
+.vindex &$dmarc_used_domain$&
+is the domain which DMARC used to look up the DMARC policy record.
+
+&$dmarc_domain_policy$&
+.vindex &$dmarc_domain_policy$&
+is the policy declared in the DMARC record.  Valid values
+are "none", "reject" and "quarantine".  It is blank when there
+is any error, including no DMARC record.
+
+. subsection
+
+By default, Exim's DMARC configuration is intended to be
+non-intrusive and conservative.  To facilitate this, Exim will not
+create any type of logging files without explicit configuration by
+you, the admin.  Nor will Exim send out any emails/reports about
+DMARC issues without explicit configuration by you, the admin (other
+than typical bounce messages that may come about due to ACL
+processing or failure delivery issues).
+
+In order to log statistics suitable to be imported by the opendmarc
+tools, you need to:
+.ilist
+Configure the global setting dmarc_history_file
+.next
+Configure cron jobs to call the appropriate opendmarc history
+import scripts and truncating the dmarc_history_file
+.endlist
+
+In order to send forensic reports, you need to:
+.ilist
+Configure the global setting dmarc_forensic_sender
+.next
+Configure, somewhere before the DATA ACL, the control option to
+enable sending DMARC forensic reports
+.endlist
+
+. subsection
+
+Example usage:
+.code
+(RCPT ACL)
+  warn    domains        = +local_domains
+          hosts          = +local_hosts
+          control        = dmarc_disable_verify
+
+  warn    !domains       = +screwed_up_dmarc_records
+          control        = dmarc_enable_forensic
+
+  warn    condition      = (lookup if destined to mailing list)
+          set acl_m_mailing_list = 1
+
+(DATA ACL)
+  warn    dmarc_status   = accept : none : off
+          !authenticated = *
+          log_message    = DMARC DEBUG: $dmarc_status $dmarc_used_domain
+
+  warn    dmarc_status   = !accept
+          !authenticated = *
+          log_message    = DMARC DEBUG: '$dmarc_status' for $dmarc_used_domain
+
+  warn    dmarc_status   = quarantine
+          !authenticated = *
+          set $acl_m_quarantine = 1
+          # Do something in a transport with this flag variable
+
+  deny    condition      = ${if eq{$dmarc_domain_policy}{reject}}
+          condition      = ${if eq{$acl_m_mailing_list}{1}}
+          message        = Messages from $dmarc_used_domain break mailing lists
+
+  deny    dmarc_status   = reject
+          !authenticated = *
+          message        = Message from $dmarc_used_domain failed sender's DMARC policy, REJECT
+
+  warn    add_header     = :at_start:${authresults {$primary_hostname}}
+.endd
+
+.wen
 
 
 
@@ -40513,7 +41049,9 @@ Events have names which correspond to the point in process at which they fire.
 The name is placed in the variable &$event_name$& and the event action
 expansion must check this, as it will be called for every possible event type.
 
+.new
 The current list of events is:
+.wen
 .display
 &`dane:fail              after    transport  `& per connection
 &`msg:complete           after    main       `& per message
@@ -40527,6 +41065,7 @@ The current list of events is:
 &`tcp:close              after    transport  `& per connection
 &`tls:cert               before   both       `& per certificate in verification chain
 &`smtp:connect           after    transport  `& per connection
+&`smtp:ehlo              after    transport  `& per connection
 .endd
 New event types may be added in future.
 
@@ -40553,6 +41092,7 @@ with the event type:
 &`msg:host:defer       `& error string
 &`tls:cert             `& verification chain depth
 &`smtp:connect         `& smtp banner
+&`smtp:ehlo            `& smtp ehlo response
 .endd
 
 The :defer events populate one extra variable: &$event_defer_errno$&.