X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/0eb9153b250c9569733efaf67e4fd1a3588faa5e..8c40856083f3a2e89350ab3aacfb95256fbadd9d:/doc/doc-docbook/spec.xfpt diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 9cfc06ca5..89fb5841e 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -8939,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, @@ -12152,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$&" @@ -12592,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. @@ -13552,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, @@ -15054,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: @@ -16481,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. @@ -17777,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 @@ -17784,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 @@ -23156,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" @@ -23218,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 @@ -23227,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" @@ -23262,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 @@ -23272,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 @@ -23412,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, @@ -23420,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. @@ -23444,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, @@ -25916,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 @@ -26114,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 @@ -26131,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. @@ -26181,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 @@ -26258,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 @@ -26419,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 @@ -26890,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). @@ -26898,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.