X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/f4952db2835a261d478321c930db5af27496e598..8c40856083f3a2e89350ab3aacfb95256fbadd9d:/doc/doc-docbook/spec.xfpt diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 2a52666f6..89fb5841e 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -6875,12 +6875,6 @@ ${lookup dnsdb{ptr=192.168.4.5}{$value}fail} If the data for a PTR record is not a syntactically valid IP address, it is not altered and nothing is added. -.cindex "MX record" "in &(dnsdb)& lookup" -.cindex "SRV record" "in &(dnsdb)& lookup" -For an MX lookup, both the preference value and the host name are returned for -each record, separated by a space. For an SRV lookup, the priority, weight, -port, and host name are returned for each record, separated by spaces. - For any record type, if multiple records are found (or, for A6 lookups, if a single record leads to multiple addresses), the data is returned as a concatenation, with newline as the default separator. The order, of course, @@ -6893,6 +6887,16 @@ ${lookup dnsdb{>: a=host1.example}} It is permitted to specify a space as the separator character. Further white space is ignored. +.cindex "MX record" "in &(dnsdb)& lookup" +.cindex "SRV record" "in &(dnsdb)& lookup" +For an MX lookup, both the preference value and the host name are returned for +each record, separated by a space. For an SRV lookup, the priority, weight, +port, and host name are returned for each record, separated by spaces. +.new +An alternate field separator can be specified using a comma after the main +separator character, followed immediately by the field separator. +.wen + .cindex "TXT record" "in &(dnsdb)& lookup" .cindex "SPF record" "in &(dnsdb)& lookup" For TXT records with multiple items of data, only the first item is returned, @@ -8935,8 +8939,10 @@ a right angle-bracket followed immediately by the new separator. Recognised RDN type labels include "CN", "O", "OU" and "DC". The field selectors marked as "time" above -may output a number of seconds since epoch -if the modifier "int" is used. +take an optional modifier of "int" +for which the result is the number of seconds since epoch. +Otherwise the result is a human-readable string +in the timezone selected by the main "timezone" option. The field selectors marked as "list" above return a list, newline-separated by default, @@ -9694,6 +9700,37 @@ the regular expression from string expansion. +.new +.vitem &*${sort{*&<&'string'&>&*}{*&<&'comparator'&>&*}{*&<&'extractor'&>&*}}*& +.cindex sorting a list +.cindex list sorting +After expansion, <&'string'&> is interpreted as a list, colon-separated by +default, but the separator can be changed in the usual way. +The <&'comparator'&> argument is interpreted as the operator +of a two-argument expansion condition. +The numeric operators plus ge, gt, le, lt (and ~i variants) are supported. +The comparison should return true when applied to two values +if the first value should sort before the second value. +The <&'extractor'&> expansion is applied repeatedly to elements of the list, +the element being placed in &$item$&, +to give values for comparison. + +The item result is a sorted list, +with the original list separator, +of the list elements (in full) of the original. + +Examples: +.code +${sort{3:2:1:4}{<}{$item}} +.endd +sorts a list of numbers, and +.code +${sort {$lookup dnsdb{>:,,mx=example.com}} {<} {${listextract{1}{<,$item}}}} +.endd +will sort an MX lookup into priority order. +.wen + + .vitem &*${substr{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*& .cindex "&%substr%& expansion item" .cindex "substring extraction" @@ -12117,8 +12154,9 @@ the &%-bs%& or &%-bS%& options. .vitem &$sender_host_address$& .vindex "&$sender_host_address$&" -When a message is received from a remote host, this variable contains that -host's IP address. For locally submitted messages, it is empty. +When a message is received from a remote host using SMTP, +this variable contains that +host's IP address. For locally non-SMTP submitted messages, it is empty. .vitem &$sender_host_authenticated$& .vindex "&$sender_host_authenticated$&" @@ -12557,6 +12595,13 @@ This variable contains the result of an expansion lookup, extraction operation, or external command, as described above. It is also used during a &*reduce*& expansion. +.vitem &$verify_mode$& +.vindex "&$verify_mode$&" +While a router or transport is being run in verify mode +or for cutthrough delivery, +contains "S" for sender-verification or "R" for recipient-verification. +Otherwise, empty. + .vitem &$version_number$& .vindex "&$version_number$&" The version number of Exim. @@ -13517,8 +13562,9 @@ This option defines the ACL that is run after an SMTP DATA command has been processed and the message itself has been received, but before the final acknowledgment is sent. See chapter &<>& for further details. -.option acl_smtp_data_prdr main string&!! unset -.cindex "DATA" "ACL for" +.option acl_smtp_data_prdr main string&!! accept +.cindex "PRDR" "ACL for" +.cindex "DATA" "PRDR ACL for" .cindex "&ACL;" "PRDR-related" .cindex "&ACL;" "per-user data processing" This option defines the ACL that, @@ -15019,16 +15065,21 @@ yourself in the foot in various unpleasant ways. This option should not be adjusted lightly. An unrecognised item will be detected at startup, by invoking Exim with the &%-bV%& flag. +The option affects Exim operating both as a server and as a client. + Historical note: prior to release 4.80, Exim defaulted this value to "+dont_insert_empty_fragments", which may still be needed for compatibility with some clients, but which lowers security by increasing exposure to some now infamous attacks. -An example: +Examples: .code # Make both old MS and old Eudora happy: openssl_options = -all +microsoft_big_sslv3_buffer \ +dont_insert_empty_fragments + +# Disable older protocol versions: +openssl_options = +no_sslv2 +no_sslv3 .endd Possible options may include: @@ -16446,19 +16497,31 @@ See &%tls_verify_hosts%& below. .option tls_verify_certificates main string&!! unset .cindex "TLS" "client certificate verification" .cindex "certificate" "verification of client" -The value of this option is expanded, and must then be the absolute path to -a file containing permitted certificates for clients that -match &%tls_verify_hosts%& or &%tls_try_verify_hosts%&. Alternatively, if you -are using OpenSSL, you can set &%tls_verify_certificates%& to the name of a -directory containing certificate files. This does not work with GnuTLS; the -option must be set to the name of a single file if you are using GnuTLS. +The value of this option is expanded, and must then be either the +word "system" +or the absolute path to +a file or directory containing permitted certificates for clients that +match &%tls_verify_hosts%& or &%tls_try_verify_hosts%&. + +The "system" value for the option will use a +system default location compiled into the SSL library. +This is not available for GnuTLS versions preceding 3.0.20 and an explicit location +must be specified. + +The use of a directory for the option value is not avilable for GnuTLS versions +preceding 3.3.6 and a single file must be used. + +With OpenSSL the certificates specified +explicitly +either by file or directory +are added to those given by the system default location. These certificates should be for the certificate authorities trusted, rather than the public cert of individual clients. With both OpenSSL and GnuTLS, if the value is a file then the certificates are sent by Exim as a server to connecting clients, defining the list of accepted certificate authorities. Thus the values defined should be considered public data. To avoid this, -use OpenSSL with a directory. +use the explicit directory version. See &<>& for discussion of when this option might be re-expanded. @@ -16831,7 +16894,7 @@ be specified using &%condition%&. Historical note: We have &%condition%& on ACLs and on Routers. Routers are far older, and use one set of semantics. ACLs are newer and when they were created, the ACL &%condition%& process was given far stricter -parse semantics. The &%bool{}&% expansion condition uses the same rules as +parse semantics. The &%bool{}%& expansion condition uses the same rules as ACLs. The &%bool_lax{}%& expansion condition uses the same rules as Routers. More pointedly, the &%bool_lax{}%& was written to match the existing Router rules processing behavior. @@ -17742,6 +17805,7 @@ delivering in cutthrough mode or testing recipient verification using &%-bv%&. See section &<>& for a list of the order in which preconditions are evaluated. +See also the &$verify_mode$& variable. .option verify_sender routers&!? boolean true @@ -17749,6 +17813,7 @@ If this option is false, the router is skipped when verifying sender addresses or testing sender verification using &%-bvs%&. See section &<>& for a list of the order in which preconditions are evaluated. +See also the &$verify_mode$& variable. .ecindex IIDgenoprou1 .ecindex IIDgenoprou2 @@ -23121,11 +23186,12 @@ connects. If authentication fails, Exim will try to transfer the message unauthenticated. See also &%hosts_require_auth%&, and chapter &<>& for details of authentication. -.option hosts_try_prdr smtp "host list&!!" unset +.option hosts_try_prdr smtp "host list&!!" * .cindex "PRDR" "enabling, optional in client" This option provides a list of servers to which, provided they announce PRDR support, Exim will attempt to negotiate PRDR for multi-recipient messages. +The option can usually be left as default. .option interface smtp "string list&!!" unset .cindex "bind IP address" @@ -23183,7 +23249,7 @@ so can cause parallel connections to the same host if &%remote_max_parallel%& permits this. -.option multi_domain smtp boolean true +.option multi_domain smtp boolean&!! true .vindex "&$domain$&" When this option is set, the &(smtp)& transport can handle a number of addresses containing a mixture of different domains provided they all resolve @@ -23192,6 +23258,9 @@ handling only one domain at a time. This is useful if you want to use &$domain$& in an expansion for the transport, because it is set only when there is a single domain involved in a remote delivery. +It is expanded per-address and can depend on any of +&$address_data$&, &$domain_data$&, &$local_part_data$&, +&$host$&, &$host_address$& and &$host_port$&. .option port smtp string&!! "see below" .cindex "port" "sending TCP/IP" @@ -23227,7 +23296,7 @@ connecting, as an outbound SSL-on-connect, instead of using STARTTLS to upgrade. The Internet standards bodies strongly discourage use of this mode. -.option retry_include_ip_address smtp boolean true +.option retry_include_ip_address smtp boolean&!! true Exim normally includes both the host name and the IP address in the key it constructs for indexing retry data after a temporary delivery failure. This means that when one of several IP addresses for a host is failing, it gets @@ -23237,9 +23306,8 @@ addresses is not affected. However, in some dialup environments hosts are assigned a different IP address each time they connect. In this situation the use of the IP address as part of the retry key leads to undesirable behaviour. Setting this option false causes -Exim to use only the host name. This should normally be done on a separate -instance of the &(smtp)& transport, set up specially to handle the dialup -hosts. +Exim to use only the host name. +Since it is expanded it can be made to depend on the host or domain. .option serialize_hosts smtp "host list&!!" unset @@ -23377,7 +23445,7 @@ unknown state), opens a new one to the same host, and then tries the delivery in clear. -.option tls_try_verify_hosts smtp "host list&!! unset +.option tls_try_verify_hosts smtp "host list&!!" unset .cindex "TLS" "server certificate verification" .cindex "certificate" "verification of server" This option gives a list of hosts for which, on encrypted connections, @@ -23385,22 +23453,48 @@ certificate verification will be tried but need not succeed. The &%tls_verify_certificates%& option must also be set. Note that unless the host is in this list TLS connections will be denied to hosts using self-signed certificates -when &%tls_verify_certificates%& is set. +when &%tls_verify_certificates%& is matched. The &$tls_out_certificate_verified$& variable is set when certificate verification succeeds. +.option tls_verify_cert_hostnames smtp "host list&!!" * +.cindex "TLS" "server certificate hostname verification" +.cindex "certificate" "verification of server" +This option give a list of hosts for which, +while verifying the server certificate, +checks will be included on the host name +(note that this will generally be the result of a DNS MX lookup) +versus Subject and Subject-Alternate-Name fields. Wildcard names are permitted +limited to being the initial component of a 3-or-more component FQDN. + +There is no equivalent checking on client certificates. + + .option tls_verify_certificates smtp string&!! unset .cindex "TLS" "server certificate verification" .cindex "certificate" "verification of server" .vindex "&$host$&" .vindex "&$host_address$&" -The value of this option must be the absolute path to a file containing -permitted server certificates, for use when setting up an encrypted connection. -Alternatively, if you are using OpenSSL, you can set -&%tls_verify_certificates%& to the name of a directory containing certificate -files. This does not work with GnuTLS; the option must be set to the name of a -single file if you are using GnuTLS. The values of &$host$& and +The value of this option must be either the +word "system" +or the absolute path to +a file or directory containing permitted certificates for servers, +for use when setting up an encrypted connection. + +The "system" value for the option will use a location compiled into the SSL library. +This is not available for GnuTLS versions preceding 3.0.20 and an explicit location +must be specified. + +The use of a directory for the option value is not avilable for GnuTLS versions +preceding 3.3.6 and a single file must be used. + +With OpenSSL the certificates specified +explicitly +either by file or directory +are added to those given by the system default location. + +The values of &$host$& and &$host_address$& are set to the name and address of the server during the expansion of this option. See chapter &<>& for details of TLS. @@ -23409,7 +23503,7 @@ if neither tls_verify_hosts nor tls_try_verify_hosts are set and certificate verification fails the TLS connection is closed. -.option tls_verify_hosts smtp "host list&!! unset +.option tls_verify_hosts smtp "host list&!!" unset .cindex "TLS" "server certificate verification" .cindex "certificate" "verification of server" This option gives a list of hosts for which. on encrypted connections, @@ -25881,8 +25975,10 @@ include files and libraries for GnuTLS can be found. There are some differences in usage when using GnuTLS instead of OpenSSL: .ilist -The &%tls_verify_certificates%& option must contain the name of a file, not the -name of a directory (for OpenSSL it can be either). +The &%tls_verify_certificates%& option +cannot be the path of a directory +for GnuTLS versions before 3.3.6 +(for later versions, or OpenSSL, it can be either). .next The default value for &%tls_dhparam%& differs for historical reasons. .next @@ -26079,7 +26175,8 @@ The GnuTLS library allows the caller to provide a "priority string", documented as part of the &[gnutls_priority_init]& function. This is very similar to the ciphersuite specification in OpenSSL. -The &%tls_require_ciphers%& option is treated as the GnuTLS priority string. +The &%tls_require_ciphers%& option is treated as the GnuTLS priority string +and controls both protocols and ciphers. The &%tls_require_ciphers%& option is available both as an global option, controlling how Exim behaves as a server, and also as an option of the @@ -26096,6 +26193,12 @@ installed on your system. If you are using GnuTLS 3, &url(http://www.gnutls.org/manual/gnutls.html#Listing-the-ciphersuites-in-a-priority-string, then the example code) on that site can be used to test a given string. +For example: +.code +# Disable older versions of protocols +tls_require_ciphers = NORMAL:%LATEST_RECORD_VERSION:-VERS-SSL3.0 +.endd + Prior to Exim 4.80, an older API of GnuTLS was used, and Exim supported three additional options, "&%gnutls_require_kx%&", "&%gnutls_require_mac%&" and "&%gnutls_require_protocols%&". &%tls_require_ciphers%& was an Exim list. @@ -26146,8 +26249,11 @@ tls_privatekey = /some/file/name These options are, in fact, expanded strings, so you can make them depend on the identity of the client that is connected if you wish. The first file contains the server's X509 certificate, and the second contains the private key -that goes with it. These files need to be readable by the Exim user, and must -always be given as full path names. They can be the same file if both the +that goes with it. These files need to be +PEM format and readable by the Exim user, and must +always be given as full path names. +The key must not be password-protected. +They can be the same file if both the certificate and the key are contained within it. If &%tls_privatekey%& is not set, or if its expansion is forced to fail or results in an empty string, this is assumed to be the case. The certificate file may also contain intermediate @@ -26223,8 +26329,10 @@ session with a client, you must set either &%tls_verify_hosts%& or apply to all TLS connections. For any host that matches one of these options, Exim requests a certificate as part of the setup of the TLS session. The contents of the certificate are verified by comparing it with a list of -expected certificates. These must be available in a file or, -for OpenSSL only (not GnuTLS), a directory, identified by +expected certificates. +These may be the system default set (depending on library version), +an explicit file or, +depending on library version, a directory, identified by &%tls_verify_certificates%&. A file can contain multiple certificates, concatenated end to end. If a @@ -26274,7 +26382,7 @@ an identically named option for the &(smtp)& transport. In each case, the value of the option is expanded and must then be the name of a file that contains a CRL in PEM format. The downside is that clients have to periodically re-download a potentially huge -file from every certificate authority the know of. +file from every certificate authority they know of. The way with most moving parts at query time is Online Certificate Status Protocol (OCSP), where the client verifies the certificate @@ -26384,9 +26492,13 @@ 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. If the &%tls_verify_certificates%& option is set on the &(smtp)& transport, it +specified a collection of expected server certificates. +These may be the system default set (depeding on library version), +a file or, +depnding on liibrary version, a directory, must name a file or, -for OpenSSL only (not GnuTLS), a directory, that contains a collection of -expected server certificates. The client verifies the server's certificate +for OpenSSL only (not GnuTLS), a directory. +The client verifies the server's certificate against this collection, taking into account any revoked certificates that are in the list defined by &%tls_crl%&. Failure to verify fails the TLS connection unless either of the @@ -26855,6 +26967,7 @@ This ACL is evaluated after &%acl_smtp_dkim%& but before &%acl_smtp_data%&. .section "The SMTP PRDR ACL" "SECTPRDRACL" +.cindex "PRDR" "ACL for" .oindex "&%prdr_enable%&" The &%acl_smtp_data_prdr%& ACL is available only when Exim is compiled with PRDR support enabled (which is the default). @@ -26863,8 +26976,9 @@ client and server for a message, and more than one recipient has been accepted. The ACL test specfied by &%acl_smtp_data_prdr%& happens after a message -has been recieved, and is executed for each recipient of the message. -The test may accept or deny for inividual recipients. +has been recieved, and is executed once for each recipient of the message +with &$local_part$& and &$domain$& valid. +The test may accept, defer or deny for inividual recipients. The &%acl_smtp_data%& will still be called after this ACL and can reject the message overall, even if this ACL has accepted it for some or all recipients. @@ -28272,6 +28386,8 @@ can be appended; they appear within the called ACL in $acl_arg1 to $acl_arg9, and $acl_narg is set to the count of values. Previous values of these variables are restored after the call returns. The name and values are expanded separately. +Note that spaces in complex expansions which are used as arguments +will act as argument separators. If the nested &%acl%& returns &"drop"& and the outer condition denies access, the connection is dropped. If it returns &"discard"&, the verb must be @@ -32485,6 +32601,9 @@ headers_remove = return-receipt-to:acknowledge-to Multiple &%headers_remove%& options for a single router or transport can be specified; the arguments will append to a single header-names list. Each item is separately expanded. +Note that colons in complex expansions which are used to +form all or part of a &%headers_remove%& list +will act as list separators. When &%headers_add%& or &%headers_remove%& is specified on a router, items are expanded at routing time, @@ -35238,9 +35357,11 @@ given message, or all mail for a given user, or for a given host, for example. The input files can be in Exim log format or syslog format. If a matching log line is not associated with a specific message, it is included in &'exigrep'&'s output without any additional lines. The usage is: +.new .display -&`exigrep [-t<`&&'n'&&`>] [-I] [-l] [-v] <`&&'pattern'&&`> [<`&&'log file'&&`>] ...`& +&`exigrep [-t<`&&'n'&&`>] [-I] [-l] [-M] [-v] <`&&'pattern'&&`> [<`&&'log file'&&`>] ...`& .endd +.wen If no log file names are given on the command line, the standard input is read. The &%-t%& argument specifies a number of seconds. It adds an additional @@ -35260,6 +35381,21 @@ regular expression. The &%-v%& option inverts the matching condition. That is, a line is selected if it does &'not'& match the pattern. +.new +The &%-M%& options means &"related messages"&. &'exigrep'& will show messages +that are generated as a result/response to a message that &'exigrep'& matched +normally. + +Example of &%-M%&: +user_a sends a message to user_b, which generates a bounce back to user_b. If +&'exigrep'& is used to search for &"user_a"&, only the first message will be +displayed. But if &'exigrep'& is used to search for &"user_b"&, the first and +the second (bounce) message will be displayed. Using &%-M%& with &'exigrep'& +when searching for &"user_a"& will show both messages since the bounce is +&"related"& to or a &"result"& of the first message that was found by the +search term. +.wen + If the location of a &'zcat'& command is known from the definition of ZCAT_COMMAND in &_Local/Makefile_&, &'exigrep'& automatically passes any file whose name ends in COMPRESS_SUFFIX through &'zcat'& as it searches it.