X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=doc%2Fdoc-docbook%2Fspec.xfpt;h=675d3f9561a95087403bba3baa1f342585bfafd6;hb=a64a3dfa73b829669d838c8d129b0974360b95a5;hp=7652ce048e0465a93282ccdcef135e647485ebcf;hpb=a3fb9793861eb9c5ece5c37c08c5c519fe1e01b7;p=exim.git diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 7652ce048..675d3f956 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -3695,8 +3695,19 @@ if &%-f%& is also present, it overrides &"From&~"&. .vitem &%-G%& .oindex "&%-G%&" -.cindex "Sendmail compatibility" "&%-G%& option ignored" -This is a Sendmail option which is ignored by Exim. +.cindex "submission fixups, suppressing (command-line)" +.new +This option is equivalent to an ACL applying: +.code +control = suppress_local_fixups +.endd +for every message received. Note that Sendmail will complain about such +bad formatting, where Exim silently just does not fix it up. This may change +in future. + +As this affects audit information, the caller must be a trusted user to use +this option. +.wen .vitem &%-h%&&~<&'number'&> .oindex "&%-h%&" @@ -6062,7 +6073,7 @@ The example PLAIN authenticator looks like this: # server_set_id = $auth2 # server_prompts = : # server_condition = Authentication is not yet configured -# server_advertise_condition = ${if def:tls_cipher } +# server_advertise_condition = ${if def:tls_in_cipher } .endd And the example LOGIN authenticator looks like this: .code @@ -6071,7 +6082,7 @@ And the example LOGIN authenticator looks like this: # server_set_id = $auth1 # server_prompts = <| Username: | Password: # server_condition = Authentication is not yet configured -# server_advertise_condition = ${if def:tls_cipher } +# server_advertise_condition = ${if def:tls_in_cipher } .endd The &%server_set_id%& option makes Exim remember the authenticated username @@ -9556,6 +9567,7 @@ environments where Exim uses base 36 instead of base 62 for its message identifiers, base-36 digits. The number is converted to decimal and output as a string. + .vitem &*${domain:*&<&'string'&>&*}*& .cindex "domain" "extraction" .cindex "expansion" "domain extraction" @@ -9715,6 +9727,25 @@ See the description of the general &%length%& item above for details. Note that when &%length%& is used as an operator. +.vitem &*${listcount:*&<&'string'&>&*}*& +.cindex "expansion" "list item count" +.cindex "list" "item count" +.cindex "list" "count of items" +.cindex "&%listcount%& expansion item" +The string is interpreted as a list and the number of items is returned. + + +.vitem &*${listnamed:*&<&'name'&>&*}*&&~and&~&*${list_*&<&'type'&>&*name'&>&*}*& +.cindex "expansion" "named list" +.cindex "&%listnamed%& expansion item" +The name is interpreted as a named list and the content of the list is returned, +expanding any referenced lists, re-quoting as needed for colon-separation. +If the optional type if given it must be one of "a", "d", "h" or "l" +and selects address-, domain-, host- or localpart- lists to search among respectively. +Otherwise all types are searched in an undefined order and the first +matching list is returned. + + .vitem &*${local_part:*&<&'string'&>&*}*& .cindex "expansion" "local part extraction" .cindex "&%local_part%& expansion item" @@ -10002,8 +10033,8 @@ ${if >{$message_size}{10M} ... .endd Note that the general negation operator provides for inequality testing. The two strings must take the form of optionally signed decimal integers, -optionally followed by one of the letters &"K"& or &"M"& (in either upper or -lower case), signifying multiplication by 1024 or 1024*1024, respectively. +optionally followed by one of the letters &"K"&, &"M"& or &"G"& (in either upper or +lower case), signifying multiplication by 1024, 1024*1024 or 1024*1024*1024, respectively. As a special case, the numerical value of an empty string is taken as zero. @@ -11946,20 +11977,43 @@ command in a filter file. Its use is explained in the description of that command, which can be found in the separate document entitled &'Exim's interfaces to mail filtering'&. -.vitem &$tls_bits$& -.vindex "&$tls_bits$&" -Contains an approximation of the TLS cipher's bit-strength; the meaning of +.vitem &$tls_in_bits$& +.vindex "&$tls_in_bits$&" +Contains an approximation of the TLS cipher's bit-strength +on the inbound connection; the meaning of this depends upon the TLS implementation used. If TLS has not been negotiated, the value will be 0. The value of this is automatically fed into the Cyrus SASL authenticator when acting as a server, to specify the "external SSF" (a SASL term). -.vitem &$tls_certificate_verified$& -.vindex "&$tls_certificate_verified$&" +The deprecated &$tls_bits$& variable refers to the inbound side +except when used in the context of an outbound SMTP delivery, when it refers to +the outbound. + +.vitem &$tls_out_bits$& +.vindex "&$tls_out_bits$&" +Contains an approximation of the TLS cipher's bit-strength +on an outbound SMTP connection; the meaning of +this depends upon the TLS implementation used. +If TLS has not been negotiated, the value will be 0. + +.vitem &$tls_in_certificate_verified$& +.vindex "&$tls_in_certificate_verified$&" This variable is set to &"1"& if a TLS certificate was verified when the message was received, and &"0"& otherwise. -.vitem &$tls_cipher$& +The deprecated &$tls_certificate_verfied$& variable refers to the inbound side +except when used in the context of an outbound SMTP delivery, when it refers to +the outbound. + +.vitem &$tls_out_certificate_verified$& +.vindex "&$tls_out_certificate_verified$&" +This variable is set to &"1"& if a TLS certificate was verified when an +outbound SMTP connection was made, +and &"0"& otherwise. + +.vitem &$tls_in_cipher$& +.vindex "&$tls_in_cipher$&" .vindex "&$tls_cipher$&" When a message is received from a remote host over an encrypted SMTP connection, this variable is set to the cipher suite that was negotiated, for @@ -11968,23 +12022,39 @@ received over unencrypted connections, the variable is empty. Testing &$tls_cipher$& for emptiness is one way of distinguishing between encrypted and non-encrypted connections during ACL processing. -The &$tls_cipher$& variable retains its value during message delivery, except -when an outward SMTP delivery takes place via the &(smtp)& transport. In this -case, &$tls_cipher$& is cleared before any outgoing SMTP connection is made, +The deprecated &$tls_cipher$& variable is the same as &$tls_in_cipher$& during message reception, +but in the context of an outward SMTP delivery taking place via the &(smtp)& transport +becomes the same as &$tls_out_cipher$&. + +.vitem &$tls_out_cipher$& +.vindex "&$tls_out_cipher$&" +This variable is +cleared before any outgoing SMTP connection is made, and then set to the outgoing cipher suite if one is negotiated. See chapter &<>& for details of TLS support and chapter &<>& for details of the &(smtp)& transport. -.vitem &$tls_peerdn$& +.vitem &$tls_in_peerdn$& +.vindex "&$tls_in_peerdn$&" .vindex "&$tls_peerdn$&" When a message is received from a remote host over an encrypted SMTP connection, and Exim is configured to request a certificate from the client, the value of the Distinguished Name of the certificate is made available in the -&$tls_peerdn$& during subsequent processing. Like &$tls_cipher$&, the -value is retained during message delivery, except during outbound SMTP -deliveries. +&$tls_in_peerdn$& during subsequent processing. + +The deprecated &$tls_peerdn$& variable refers to the inbound side +except when used in the context of an outbound SMTP delivery, when it refers to +the outbound. + +.vitem &$tls_out_peerdn$& +.vindex "&$tls_out_peerdn$&" +When a message is being delivered to a remote host over an encrypted SMTP +connection, and Exim is configured to request a certificate from the server, +the value of the Distinguished Name of the certificate is made available in the +&$tls_out_peerdn$& during subsequent processing. -.vitem &$tls_sni$& +.vitem &$tls_in_sni$& +.vindex "&$tls_in_sni$&" .vindex "&$tls_sni$&" .cindex "TLS" "Server Name Indication" When a TLS session is being established, if the client sends the Server @@ -11995,8 +12065,15 @@ will be re-expanded early in the TLS session, to permit a different certificate to be presented (and optionally a different key to be used) to the client, based upon the value of the SNI extension. -The value will be retained for the lifetime of the message. During outbound -SMTP deliveries, it reflects the value of the &%tls_sni%& option on +The deprecated &$tls_sni$& variable refers to the inbound side +except when used in the context of an outbound SMTP delivery, when it refers to +the outbound. + +.vitem &$tls_out_sni$& +.vindex "&$tls_out_sni$&" +.cindex "TLS" "Server Name Indication" +During outbound +SMTP deliveries, this variable reflects the value of the &%tls_sni%& option on the transport. .vitem &$tod_bsdinbox$& @@ -13139,10 +13216,10 @@ If you want to advertise the availability of AUTH only when the connection is encrypted using TLS, you can make use of the fact that the value of this option is expanded, with a setting like this: .code -auth_advertise_hosts = ${if eq{$tls_cipher}{}{}{*}} +auth_advertise_hosts = ${if eq{$tls_in_cipher}{}{}{*}} .endd -.vindex "&$tls_cipher$&" -If &$tls_cipher$& is empty, the session is not encrypted, and the result of +.vindex "&$tls_in_cipher$&" +If &$tls_in_cipher$& is empty, the session is not encrypted, and the result of the expansion is empty, thus matching no hosts. Otherwise, the result of the expansion is *, which matches all hosts. @@ -14867,7 +14944,7 @@ received_header_text = Received: \ ${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\ by $primary_hostname \ ${if def:received_protocol {with $received_protocol}} \ - ${if def:tls_cipher {($tls_cipher)\n\t}}\ + ${if def:tls_in_cipher {($tls_in_cipher)\n\t}}\ (Exim $version_number)\n\t\ ${if def:sender_address \ {(envelope-from <$sender_address>)\n\t}}\ @@ -15730,7 +15807,7 @@ 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. -If the option contains &$tls_sni$& and Exim is built against OpenSSL, then +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 &<>& will be re-expanded. @@ -22009,6 +22086,9 @@ appropriate values for the outgoing connection, and these are the values that are in force when any authenticators are run and when the &%authenticated_sender%& option is expanded. +These variables are deprecated in favour of &$tls_in_cipher$& et. al. +and will be removed in a future release. + .section "Private options for smtp" "SECID146" .cindex "options" "&(smtp)& transport" @@ -22046,7 +22126,7 @@ ignored. The expansion happens after the outgoing connection has been made and TLS started, if required. This means that the &$host$&, &$host_address$&, -&$tls_cipher$&, and &$tls_peerdn$& variables are set according to the +&$tls_out_cipher$&, and &$tls_out_peerdn$& variables are set according to the particular connection. If the SMTP session is not authenticated, the expansion of @@ -22291,6 +22371,13 @@ that matches this list, even if the server host advertises PIPELINING support. Exim will not try to start a TLS session when delivering to any host that matches this list. See chapter &<>& for details of TLS. +.option hosts_verify_avoid_tls smtp "host list&!!" * +.cindex "TLS" "avoiding for certain hosts" +Exim will not try to start a TLS session for a verify callout, +or when delivering in cutthrough mode, +to any host that matches this list. +Note that the default is to not use TLS. + .option hosts_max_try smtp integer 5 .cindex "host" "maximum number to try" @@ -22600,7 +22687,7 @@ ciphers is a preference order. .option tls_sni smtp string&!! unset .cindex "TLS" "Server Name Indication" .vindex "&$tls_sni$&" -If this option is set then it sets the $tls_sni variable and causes any +If this option is set then it sets the $tls_out_sni variable and causes any TLS session to pass this value as the Server Name Indication extension to the remote side, which can be used by the remote side to select an appropriate certificate and private key for the session. @@ -23872,11 +23959,8 @@ When Exim is authenticating as a client, it skips any authenticator whose used, for example, to skip plain text authenticators when the connection is not encrypted by a setting such as: .code -client_condition = ${if !eq{$tls_cipher}{}} +client_condition = ${if !eq{$tls_out_cipher}{}} .endd -(Older documentation incorrectly states that &$tls_cipher$& contains the cipher -used for incoming messages. In fact, during SMTP delivery, it contains the -cipher used for the delivery.) .option driver authenticators string unset @@ -24036,10 +24120,10 @@ authentication mechanisms. For example, it can be used to restrict the advertisement of a particular mechanism to encrypted connections, by a setting such as: .code -server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}} +server_advertise_condition = ${if eq{$tls_in_cipher}{}{no}{yes}} .endd -.vindex "&$tls_cipher$&" -If the session is encrypted, &$tls_cipher$& is not empty, and so the expansion +.vindex "&$tls_in_cipher$&" +If the session is encrypted, &$tls_in_cipher$& is not empty, and so the expansion yields &"yes"&, which allows the advertisement to happen. When an Exim server receives an AUTH command from a client, it rejects it @@ -25104,10 +25188,11 @@ name of a directory (for OpenSSL it can be either). .next The default value for &%tls_dhparam%& differs for historical reasons. .next -.vindex "&$tls_peerdn$&" +.vindex "&$tls_in_peerdn$&" +.vindex "&$tls_out_peerdn$&" Distinguished Name (DN) strings reported by the OpenSSL library use a slash for separating fields; GnuTLS uses commas, in accordance with RFC 2253. This -affects the value of the &$tls_peerdn$& variable. +affects the value of the &$tls_in_peerdn$& and &$tls_out_peerdn$& variables. .next OpenSSL identifies cipher suites using hyphens as separators, for example: DES-CBC3-SHA. GnuTLS historically used underscores, for example: @@ -25414,15 +25499,13 @@ forced to fail, Exim behaves as if the option is not set. .cindex "cipher" "logging" .cindex "log" "TLS cipher" -.vindex "&$tls_cipher$&" -The variable &$tls_cipher$& is set to the cipher suite that was negotiated for +.vindex "&$tls_in_cipher$&" +The variable &$tls_in_cipher$& is set to the cipher suite that was negotiated for an incoming TLS connection. It is included in the &'Received:'& header of an incoming message (by default &-- you can, of course, change this), and it is also included in the log line that records a message's arrival, keyed by &"X="&, unless the &%tls_cipher%& log selector is turned off. The &%encrypted%& condition can be used to test for specific cipher suites in ACLs. -(For outgoing SMTP deliveries, &$tls_cipher$& is reset &-- see section -&<>&.) Once TLS has been established, the ACLs that run for subsequent SMTP commands can check the name of the cipher suite and vary their actions accordingly. The @@ -25431,6 +25514,9 @@ example, OpenSSL uses the name DES-CBC3-SHA for the cipher suite which in other contexts is known as TLS_RSA_WITH_3DES_EDE_CBC_SHA. Check the OpenSSL or GnuTLS documentation for more details. +For outgoing SMTP deliveries, &$tls_out_cipher$& is used and logged +(again depending on the &%tls_cipher%& log selector). + .section "Requesting and verifying client certificates" "SECID183" .cindex "certificate" "verification of client" @@ -25467,17 +25553,17 @@ fact that no certificate was verified, and vary their actions accordingly. For example, you can insist on a certificate before accepting a message for relaying, but not when the message is destined for local delivery. -.vindex "&$tls_peerdn$&" +.vindex "&$tls_in_peerdn$&" When a client supplies a certificate (whether it verifies or not), the value of the Distinguished Name of the certificate is made available in the variable -&$tls_peerdn$& during subsequent processing of the message. +&$tls_in_peerdn$& during subsequent processing of the message. .cindex "log" "distinguished name" Because it is often a long text string, it is not included in the log line or &'Received:'& header by default. You can arrange for it to be logged, keyed by &"DN="&, by setting the &%tls_peerdn%& log selector, and you can use &%received_header_text%& to change the &'Received:'& header. When no -certificate is supplied, &$tls_peerdn$& is empty. +certificate is supplied, &$tls_in_peerdn$& is empty. .section "Revoked certificates" "SECID184" @@ -25558,12 +25644,12 @@ All the TLS options in the &(smtp)& transport are expanded before use, with which the client is connected. Forced failure of an expansion causes Exim to behave as if the relevant option were unset. -.vindex &$tls_bits$& -.vindex &$tls_cipher$& -.vindex &$tls_peerdn$& -.vindex &$tls_sni$& +.vindex &$tls_out_bits$& +.vindex &$tls_out_cipher$& +.vindex &$tls_out_peerdn$& +.vindex &$tls_out_sni$& Before an SMTP connection is established, the -&$tls_bits$&, &$tls_cipher$&, &$tls_peerdn$& and &$tls_sni$& +&$tls_out_bits$&, &$tls_out_cipher$&, &$tls_out_peerdn$& and &$tls_out_sni$& variables are emptied. (Until the first connection, they contain the values that were set when the message was received.) If STARTTLS is subsequently successfully obeyed, these variables are set to the relevant values for the @@ -25573,8 +25659,8 @@ outgoing connection. .section "Use of TLS Server Name Indication" "SECTtlssni" .cindex "TLS" "Server Name Indication" -.vindex "&$tls_sni$&" -.oindex "&%tls_sni%&" +.vindex "&$tls_in_sni$&" +.oindex "&%tls_in_sni%&" With TLS1.0 or above, there is an extension mechanism by which extra information can be included at various points in the protocol. One of these extensions, documented in RFC 6066 (and before that RFC 4366) is @@ -25601,14 +25687,14 @@ different clients. Or even negotiate different cipher suites. The &%tls_sni%& option on an SMTP transport is an expanded string; the result, if not empty, will be sent on a TLS session as part of the handshake. There's nothing more to it. Choosing a sensible value not derived insecurely is the -only point of caution. The &$tls_sni$& variable will be set to this string +only point of caution. The &$tls_out_sni$& variable will be set to this string for the lifetime of the client connection (including during authentication). -Except during SMTP client sessions, if &$tls_sni$& is set then it is a string +Except during SMTP client sessions, if &$tls_in_sni$& is set then it is a string received from a client. It can be logged with the &%log_selector%& item &`+tls_sni`&. -If the string &`tls_sni`& appears in the main section's &%tls_certificate%& +If the string &`tls_in_sni`& appears in the main section's &%tls_certificate%& option (prior to expansion) then the following options will be re-expanded during TLS session handshake, to permit alternative values to be chosen: @@ -26622,7 +26708,7 @@ confusing to some people, so the use of &%endpass%& is no longer recommended as This modifier sets up a message that is used as part of the log message if the ACL denies access or a &%warn%& statement's conditions are true. For example: .code -require log_message = wrong cipher suite $tls_cipher +require log_message = wrong cipher suite $tls_in_cipher encrypted = DES-CBC3-SHA .endd &%log_message%& is also used when recipients are discarded by &%discard%&. For @@ -26839,6 +26925,27 @@ Notice that we put back the lower cased version afterwards, assuming that is what is wanted for subsequent tests. +.new +.vitem &*control&~=&~cutthrough_delivery*& +.cindex "&ACL;" "cutthrough routing" +This option requests delivery be attempted while the item is being received. +It is usable in the RCPT ACL and valid only for single-recipient mails forwarded +from one SMTP connection to another. If a recipient-verify callout connection is +requested in the same ACL it is held open and used for the data, otherwise one is made +after the ACL completes. + +Should the ultimate destination system positively accept or reject the mail, +a corresponding indication is given to the source system and nothing is queued. +If there is a temporary error the item is queued for later delivery in the +usual fashion. If the item is successfully delivered in cutthrough mode the log line +is tagged with ">>" rather than "=>" and appears before the acceptance "<=" +line. + +Delivery in this mode avoids the generation of a bounce mail to a (possibly faked) +sender when the destination system is doing content-scan based rejection. +.wen + + .new .vitem &*control&~=&~dscp/*&<&'value'&> .cindex "&ACL;" "setting DSCP value" @@ -31566,6 +31673,8 @@ required for the transaction. If the remote server advertises support for the STARTTLS command, and Exim was built to support TLS encryption, it tries to start a TLS session unless the server matches &%hosts_avoid_tls%&. See chapter &<>& for more details. +Either a match in that or &%hosts_verify_avoid_tls%& apply when the transport +is called for verification. If the remote server advertises support for the AUTH command, Exim scans the authenticators configuration for any suitable client settings, as described