X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/039f131577938145fb859309a9822fdce90d7155..1cf47989a0376c3f7156c214c1d509d372e4262b:/doc/doc-docbook/spec.xfpt?ds=sidebyside diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 2dd6e44be..e6135eb52 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -161,6 +161,13 @@ .macro index .echo "** Don't use .index; use .cindex or .oindex or .vindex" .endmacro + + +. use this for a concept-index entry for a header line +.macro chindex +.cindex "&'$1'& header line" +.cindex "header lines" $1 +.endmacro . //////////////////////////////////////////////////////////////////////////// @@ -193,6 +200,8 @@ . This chunk of literal XML implements index entries of the form "x, see y" and . "x, see also y". However, the DocBook DTD doesn't allow entries . at the top level, so we have to put the .chapter directive first. + +. These do not turn up in the HTML output, unfortunately. The PDF does get them. . ///////////////////////////////////////////////////////////////////////////// .chapter "Introduction" "CHID1" @@ -318,6 +327,10 @@ zero, binary binary zero + + headers + header lines + .literal off @@ -2683,10 +2696,8 @@ Exim through the local interface (see the &%-bm%& and &%-f%& options below). See the &%untrusted_set_sender%& option for a way of permitting non-trusted users to set envelope senders. -.cindex "&'From:'& header line" -.cindex "&'Sender:'& header line" -.cindex "header lines" "From:" -.cindex "header lines" "Sender:" +.chindex From: +.chindex Sender: For a trusted user, there is never any check on the contents of the &'From:'& header line, and a &'Sender:'& line is never added. Furthermore, any existing &'Sender:'& line in incoming local (non-TCP/IP) messages is not removed. @@ -3885,7 +3896,9 @@ id, and the remaining ones must be email addresses. However, if the message is active (in the middle of a delivery attempt), it is not altered. This option can be used only by an admin user. -.vitem "&%-MC%&&~<&'transport'&>&~<&'hostname'&>&~<&'sequence&~number'&>&&& +.vitem "&%-MC%&&~<&'transport'&>&~<&'hostname'&>&&& + &~<&'host&~IP'&>&&& + &~<&'sequence&~number'&>&&& &~<&'message&~id'&>" .oindex "&%-MC%&" .cindex "SMTP" "passed connection" @@ -4782,9 +4795,9 @@ recognized when Exim is run normally. It allows for the setting up of explicit .vitem &%-t%& .oindex "&%-t%&" .cindex "recipient" "extracting from header lines" -.cindex "&'Bcc:'& header line" -.cindex "&'Cc:'& header line" -.cindex "&'To:'& header line" +.chindex Bcc: +.chindex Cc: +.chindex To: When Exim is receiving a locally-generated, non-SMTP message on its standard input, the &%-t%& option causes the recipients of the message to be obtained from the &'To:'&, &'Cc:'&, and &'Bcc:'& header lines in the message instead of @@ -5476,8 +5489,8 @@ local_interfaces = 127.0.0.1 : ::::1 contains two IP addresses, the IPv4 address 127.0.0.1 and the IPv6 address ::1. &*Note*&: Although leading and trailing white space is ignored in individual -list items, it is not ignored when parsing the list. The space after the first -colon in the example above is necessary. If it were not there, the list would +list items, it is not ignored when parsing the list. The spaces around the first +colon in the example above are necessary. If they were not there, the list would be interpreted as the two items 127.0.0.1:: and 1. .section "Changing list separators" "SECTlistsepchange" @@ -6411,9 +6424,9 @@ smarthost_smtp: # 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: + # As long as tls_verify_hosts is enabled, this this will have no effect, + # 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; @@ -8775,6 +8788,13 @@ other statements in the same ACL. .cindex "tainted data" "de-tainting" The value will be untainted. +.new +&*Note*&: If the data result of the lookup (as opposed to the key) +is empty, then this empty value is stored in &$domain_data$&. +The option to return the key for the lookup, as the value, +may be what is wanted. +.wen + .next Any of the single-key lookup type names may be preceded by @@ -9716,7 +9736,7 @@ If the ACL returns defer the result is a forced-fail. Otherwise the expansion f .vitem "&*${authresults{*&<&'authserv-id'&>&*}}*&" .cindex authentication "results header" -.cindex headers "authentication-results:" +.chindex Authentication-Results: .cindex authentication "expansion item" This item returns a string suitable for insertion as an &'Authentication-Results:'& @@ -10147,7 +10167,7 @@ newline at the very end. For the &%header%& and &%bheader%& expansion, for those headers that contain lists of addresses, a comma is also inserted at the junctions between headers. This does not happen for the &%rheader%& expansion. -.cindex "tainted data" +.cindex "tainted data" "message headers" When the headers are from an incoming message, the result of expanding any of these variables is tainted. @@ -11719,6 +11739,7 @@ users' filter files may be locked out by the system administrator. .new &*Note:*& Testing a path using this condition is not a sufficient way of de-tainting it. +Consider using a dsearch lookup. .wen .vitem &*first_delivery*& @@ -12324,7 +12345,7 @@ to the relevant file. When, as a result of aliasing or forwarding, a message is directed to a pipe, this variable holds the pipe command when the transport is running. -.vitem "&$auth1$& &-- &$auth3$&" +.vitem "&$auth1$& &-- &$auth4$&" .vindex "&$auth1$&, &$auth2$&, etc" These variables are used in SMTP authenticators (see chapters &<>&&--&<>&). Elsewhere, they are empty. @@ -13703,7 +13724,11 @@ filter file to set values that can be tested in users' filter files. For example, a system filter could set a value indicating how likely it is that a message is junk mail. -.vitem &$spam_$&&'xxx'& +.vitem &$spam_score$& &&& + &$spam_score_int$& &&& + &$spam_bar$& &&& + &$spam_report$& &&& + &$spam_action$& A number of variables whose names start with &$spam$& are available when Exim is compiled with the content-scanning extension. For details, see section &<>&. @@ -14093,6 +14118,10 @@ taint mode of the Perl interpreter. You are encouraged to set this option to a true value. To avoid breaking existing installations, it defaults to false. +.new +&*Note*&: This is entirely separate from Exim's tainted-data tracking. +.wen + .section "Calling Perl subroutines" "SECID86" When the configuration file includes a &%perl_startup%& option you can make use @@ -16973,7 +17002,7 @@ not count as protocol errors (see &%smtp_max_synprot_errors%&). .option pipelining_connect_advertise_hosts main "host list&!!" * .cindex "pipelining" "early connection" .cindex "pipelining" PIPE_CONNECT -.cindex "ESMTP extensions" X_PIPE_CONNECT +.cindex "ESMTP extensions" 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 @@ -16982,7 +17011,9 @@ 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. +.new +The SMTP service extension keyword advertised is &"PIPE_CONNECT"&. +.wen .option prdr_enable main boolean false @@ -17544,7 +17575,7 @@ live with. . searchable. NM changed this occurrence for bug 1197 to no longer allow . the option name to split. -.option "smtp_accept_max_per_connection" main integer 1000 &&& +.option "smtp_accept_max_per_connection" main integer&!! 1000 &&& smtp_accept_max_per_connection .cindex "SMTP" "limiting incoming message count" .cindex "limit" "messages per SMTP connection" @@ -17554,6 +17585,11 @@ results in the transfer of a message. After the limit is reached, a 421 response is given to subsequent MAIL commands. This limit is a safety precaution against a client that goes mad (incidents of this type have been seen). +.new +The option is expanded after the HELO or EHLO is received +and may depend on values available at that time. +An empty or zero value after expansion removes the limit. +.wen .option smtp_accept_max_per_host main string&!! unset @@ -18985,7 +19021,7 @@ transport option of the same name. .cindex "security" "MX lookup" .cindex "DNS" "DNSSEC" DNS lookups for domains matching &%dnssec_request_domains%& will be done with -the dnssec request bit set. +the DNSSEC request bit set. This applies to all of the SRV, MX, AAAA, A lookup sequence. .option dnssec_require_domains routers "domain list&!!" unset @@ -18994,7 +19030,7 @@ 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 +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. @@ -19720,6 +19756,10 @@ 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. +.new +This is done immediately after all the preconditions, before the +evaluation of the &%address_data%& option. +.wen The variable is set with the expansion of the value. The variables can be used by the router options (not including any preconditions) @@ -22567,7 +22607,7 @@ This defaults to the incoming sender address, but can be changed by setting .option return_path_add transports boolean false -.cindex "&'Return-path:'& header line" +.chindex Return-path: If this option is true, a &'Return-path:'& header is added to the message. Although the return path is normally available in the prefix line of BSD mailboxes, this is commonly not displayed by MUAs, and so the user does not @@ -25209,7 +25249,7 @@ details. .cindex "security" "MX lookup" .cindex "DNS" "DNSSEC" DNS lookups for domains matching &%dnssec_request_domains%& will be done with -the dnssec request bit set. Setting this transport option is only useful if the +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. @@ -25221,7 +25261,7 @@ router option. .cindex "security" "MX lookup" .cindex "DNS" "DNSSEC" DNS lookups for domains matching &%dnssec_require_domains%& will be done with -the dnssec request bit set. Setting this transport option is only +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. @@ -25502,9 +25542,9 @@ 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. See -the &%dnssec_request_domains%& router and transport options. +and that a DANE-verified TLS connection is made. There will be no fallback to in-clear communication. +See the &%dnssec_request_domains%& router and transport options. See section &<>&. .option hosts_require_ocsp smtp "host list&!!" unset @@ -25543,11 +25583,14 @@ BDAT will not be used in conjunction with a transport filter. .option hosts_try_dane smtp "host list&!!" * .cindex DANE "transport options" .cindex DANE "attempting 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. See -the &%dnssec_request_domains%& router and transport options. -There will be no fallback to in-clear communication. +.new +If built with DANE support, Exim will look up a +TLSA record for any host matching the list, +If one is found and that lookup was DNSSEC-validated, +then Exim requires that a DANE-verified TLS connection is made for that host; +there will be no fallback to in-clear communication. +.wen +See the &%dnssec_request_domains%& router and transport options. See section &<>&. .option hosts_try_fastopen smtp "host list&!!" * @@ -25705,7 +25748,7 @@ 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 used to strongly discourage use of this mode, -but as of RFC 8314 it is perferred over STARTTLS for message submission +but as of RFC 8314 it is preferred over STARTTLS for message submission (as distinct from MTA-MTA communication). @@ -27358,7 +27401,7 @@ conditions: .ilist The client host must match &%auth_advertise_hosts%& (default *). .next -It the &%server_advertise_condition%& option is set, its expansion must not +If the &%server_advertise_condition%& option is set, its expansion must not yield the empty string, &"0"&, &"no"&, or &"false"&. .endlist @@ -27466,7 +27509,7 @@ encode '\0user@domain.com\0pas$$word' .endd gives an incorrect answer because of the unescaped &"@"& and &"$"& characters. -If you have the &%mimencode%& command installed, another way to do produce +If you have the &%mimencode%& command installed, another way to produce base64-encoded strings is to run the command .code echo -e -n `\0user\0password' | mimencode @@ -27808,7 +27851,14 @@ fixed_plain: client_send = ^username^mysecret .endd The lack of colons means that the entire text is sent with the AUTH -command, with the circumflex characters converted to NULs. A similar example +command, with the circumflex characters converted to NULs. +.new +Note that due to the ambiguity of parsing three consectutive circumflex characters +there is no way to provide a password having a leading circumflex. +.wen + + +A similar example that uses the LOGIN mechanism is: .code fixed_login: @@ -28082,7 +28132,7 @@ connection, a client certificate has been verified, the &"valid-client-cert"& option is passed. When authentication succeeds, the identity of the user who authenticated is placed in &$auth1$&. -The Dovecot configuration to match the above wil look +The Dovecot configuration to match the above will look something like: .code conf.d/10-master.conf :- @@ -28132,6 +28182,12 @@ realease for the SCRAM-SHA-256 method. The macro _HAVE_AUTH_GSASL_SCRAM_SHA_256 will be defined when this happens. +.new +To see the list of mechanisms supported by the library run Exim with "auth" debug +enabled and look for a line containing "GNU SASL supports". +Note however that some may not have been tested from Exim. +.wen + .option client_authz gsasl string&!! unset This option can be used to supply an &'authorization id'& @@ -28151,21 +28207,44 @@ the password to be used, in clear. This option is exapanded before use, and should result in the account name to be used. + .option client_spassword gsasl string&!! unset +.new +This option is only supported for library versions 1.9.1 and greater. +The macro _HAVE_AUTH_GSASL_SCRAM_S_KEY will be defined when this is so. +.wen + If a SCRAM mechanism is being used and this option is set +and correctly sized it is used in preference to &%client_password%&. The value after expansion should be a 40 (for SHA-1) or 64 (for SHA-256) character string with the PBKDF2-prepared password, hex-encoded. + Note that this value will depend on the salt and iteration-count supplied by the server. - +The option is expanded before use. +.new +During the expansion &$auth1$& is set with the client username, +&$auth2$& with the iteration count, and +&$auth3$& with the salt. + +The intent of this option +is to support clients that can cache thes salted password +to save on recalculation costs. +The cache lookup should return an unusable value +(eg. an empty string) +if the salt or iteration count has changed + +If the authentication succeeds then the above variables are set, +.vindex "&$auth4$&" +plus the calculated salted password value value in &$auth4$&, +during the expansion of the &%client_set_id%& option. +A side-effect of this expansion can be used to prime the cache. +.wen .option server_channelbinding gsasl boolean false -Do not set this true and rely on the properties -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 @@ -28185,9 +28264,16 @@ 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 might have switched the default to be true. -However, Channel Binding in TLS has proven to be vulnerable in current versions. -Do not plan to rely upon this feature for security, ever, without consulting -with a subject matter expert (a cryptographic engineer). +. However, Channel Binding in TLS has proven to be vulnerable in current versions. +. Do not plan to rely upon this feature for security, ever, without consulting +. with a subject matter expert (a cryptographic engineer). + +.new +This option was deprecated in previous releases due to doubts over +the "Triple Handshake" vulnerability. +Exim takes suitable precausions (requiring Extended Master Secret if TLS +Session Resumption was used) for safety. +.wen .option server_hostname gsasl string&!! "see below" @@ -28507,7 +28593,7 @@ and for clients to only attempt, this authentication method on a secure (eg. under TLS) connection. One possible use, compatible with the -K-9 Mail Andoid client (&url(https://k9mail.github.io/)), +K-9 Mail Android client (&url(https://k9mail.github.io/)), is for using X509 client certificates. It thus overlaps in function with the TLS authenticator @@ -29726,7 +29812,7 @@ Ivan is the author of the popular TLS testing tools at .section "Certificate chains" "SECID186" -The file named by &%tls_certificate%& may contain more than one +A file named by &%tls_certificate%& may contain more than one certificate. This is useful in the case where the certificate that is being sent is validated by an intermediate certificate which the other end does not have. Multiple certificates must be in the correct order in the file. @@ -30034,7 +30120,7 @@ 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. -A TLSA lookup will be done if either of the above options match and the host-lookup succeeded using dnssec. +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. @@ -32425,6 +32511,13 @@ Section &<>& below describes how you can distinguish between different values. Some DNS lists may return more than one address record; see section &<>& for details of how they are checked. +.new +Values returned by a properly running DBSBL should be in the 127.0.0.0/8 +range. If a DNSBL operator loses control of the domain, lookups on it +may start returning other addresses. Because of this, Exim now ignores +returned values outside the 127/8 region. +.wen + .section "Variables set from DNS lists" "SECID204" .cindex "expansion" "variables, set from DNS list" @@ -32561,6 +32654,14 @@ deny dnslists = relays.ordb.org .endd which is less clear, and harder to maintain. +Negation can also be used with a bitwise-and restriction. +The dnslists condition with only be trus if a result is returned +by the lookup which, anded with the restriction, is all zeroes. +For example: +.code +deny dnslists = zen.spamhaus.org!&0.255.255.0 +.endd + @@ -36003,8 +36104,7 @@ incoming SMTP message from a source that is not permitted to send them. .section "Resent- header lines" "SECID220" -.cindex "&%Resent-%& header lines" -.cindex "header lines" "Resent-" +.chindex Resent- RFC 2822 makes provision for sets of header lines starting with the string &`Resent-`& to be added to a message when it is resent by the original recipient to somebody else. These headers are &'Resent-Date:'&, @@ -36060,8 +36160,7 @@ existing &'Bcc:'& is not removed. .section "The Date: header line" "SECID223" -.cindex "&'Date:'& header line" -.cindex "header lines" "Date:" +.cindex Date: If a locally-generated or submission-mode message has no &'Date:'& header line, Exim adds one, using the current date and time, unless the &%suppress_local_fixups%& control has been specified. @@ -36078,8 +36177,7 @@ messages. .section "The Envelope-to: header line" "SECID225" -.cindex "&'Envelope-to:'& header line" -.cindex "header lines" "Envelope-to:" +.chindex Envelope-to: .oindex "&%envelope_to_remove%&" &'Envelope-to:'& header lines are not part of the standard RFC 2822 header set. Exim can be configured to add them to the final delivery of messages. (See the @@ -36090,8 +36188,7 @@ messages. .section "The From: header line" "SECTthefrohea" -.cindex "&'From:'& header line" -.cindex "header lines" "From:" +.chindex From: .cindex "Sendmail compatibility" "&""From""& line" .cindex "message" "submission" .cindex "submission mode" @@ -36134,8 +36231,7 @@ name as described in section &<>&. .section "The Message-ID: header line" "SECID226" -.cindex "&'Message-ID:'& header line" -.cindex "header lines" "Message-ID:" +.chindex Message-ID: .cindex "message" "submission" .oindex "&%message_id_header_text%&" If a locally-generated or submission-mode incoming message does not contain a @@ -36150,8 +36246,7 @@ in this header line by setting the &%message_id_header_text%& and/or .section "The Received: header line" "SECID227" -.cindex "&'Received:'& header line" -.cindex "header lines" "Received:" +.chindex Received: A &'Received:'& header line is added at the start of every message. The contents are defined by the &%received_header_text%& configuration option, and Exim automatically adds a semicolon and a timestamp to the configured string. @@ -36167,8 +36262,7 @@ changed to the time of acceptance, which is (apart from a small delay while the .section "The References: header line" "SECID228" -.cindex "&'References:'& header line" -.cindex "header lines" "References:" +.chindex References: Messages created by the &(autoreply)& transport include a &'References:'& header line. This is constructed according to the rules that are described in section 3.64 of RFC 2822 (which states that replies should contain such a @@ -36182,8 +36276,7 @@ incoming message. If there are more than 12, the first one and then the final .section "The Return-path: header line" "SECID229" -.cindex "&'Return-path:'& header line" -.cindex "header lines" "Return-path:" +.chindex Return-path: .oindex "&%return_path_remove%&" &'Return-path:'& header lines are defined as something an MTA may insert when it does the final delivery of messages. (See the generic &%return_path_add%& @@ -36196,7 +36289,7 @@ default), Exim removes &'Return-path:'& header lines from incoming messages. .section "The Sender: header line" "SECTthesenhea" .cindex "&'Sender:'& header line" .cindex "message" "submission" -.cindex "header lines" "Sender:" +.chindex Sender: For a locally-originated message from an untrusted user, Exim may remove an existing &'Sender:'& header line, and it may add a new one. You can modify these actions by setting the &%local_sender_retain%& option true, the @@ -38296,8 +38389,11 @@ parentheses afterwards. 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. +down a single SMTP connection, an asterisk follows the +.new +remote IP address (and port if enabled) +.wen +in the log lines 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. @@ -38664,6 +38760,7 @@ routing email addresses, but it does apply to &"byname"& lookups. client's ident port times out. .next .cindex "log" "incoming interface" +.cindex "log" "outgoing interface" .cindex "log" "local interface" .cindex "log" "local address and port" .cindex "TCP/IP" "logging local address and port" @@ -38672,7 +38769,10 @@ client's ident port times out. 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 -rejection lines, and (despite the name) to outgoing &"=>"& and &"->"& lines. +rejection lines, and (despite the name) to outgoing +.new +&"=>"&, &"->"&, &"=="& and &"**"& lines. +.wen The latter can be disabled by turning off the &%outgoing_interface%& option. .next .cindex log "incoming proxy address" @@ -38939,7 +39039,7 @@ unchanged, or whether they should be rendered as escape sequences. when TLS is in use. The item is &`CV=yes`& if the peer's certificate was verified using a CA trust anchor, -&`CA=dane`& if using a DNS trust anchor, +&`CV=dane`& if using a DNS trust anchor, and &`CV=no`& if not. .next .cindex "log" "TLS cipher"