X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/590795f4282e84ce9c2730bb17c7e6bb23615966..d629c90c1c83ef1136008a4d6afeed9b6db903fc:/doc/doc-docbook/spec.xfpt diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index cd95d99ff..21c494329 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -10425,7 +10425,7 @@ abbreviation &%h%& can be used when &%hash%& is used as an operator. .cindex "expansion" "hex to base64" .cindex "&%hex2b64%& expansion item" This operator converts a hex string into one that is base64 encoded. This can -be useful for processing the output of the MD5 and SHA-1 hashing functions. +be useful for processing the output of the various hashing functions. @@ -26830,15 +26830,17 @@ without code changes in Exim. .option server_channelbinding gsasl boolean false +Do not set this true 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 ciphersuites can provide identifying information about the cryptographic context. -This means that certificate identity and verification becomes a non-issue, -as a man-in-the-middle attack will cause the correct client and server to -see different identifiers and authentication will fail. +This should have meant that certificate identity and verification becomes a +non-issue, as a man-in-the-middle attack will cause the correct client and +server to see different identifiers and authentication will fail. This is currently only supported when using the GnuTLS library. This is only usable by mechanisms which support "channel binding"; at time of @@ -26846,7 +26848,11 @@ writing, that's the SCRAM family. 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 may switch the default to be true. +of Exim might have switched the default to be true. + +However, Channel Binding in TLS has proven to be broken in current versions. +Do not plan to rely upon this feature for security, ever, without consulting +with a subject matter expert (a cryptographic engineer). .option server_hostname gsasl string&!! "see below" @@ -28158,20 +28164,48 @@ 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). The latter specifies -the End Entity directly, i.e. the certificate involved is that of the server (and should be the sole one transmitted -during the TLS handshake); this is appropriate for a single system, using a self-signed certificate. +The TLSA record for the server may have "certificate usage" 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); +this is appropriate for a single system, using a self-signed certificate. DANE-TA usage is effectively declaring a specific CA to be used; this might be a private CA or a public, -well-known one. A private CA at simplest is just a self-signed certificate which is used to sign -cerver certificates, but running one securely does require careful arrangement. If a private CA is used -then either all clients must be primed with it, or (probably simpler) the server TLS handshake must transmit -the entire certificate chain from CA to server-certificate. If a public CA is used then all clients must be primed with it -(losing one advantage of DANE) - but the attack surface is reduced from all public CAs to that single CA. +well-known one. +A private CA at simplest is just a self-signed certificate (with certain +attributes) which is used to sign cerver certificates, but running one securely +does require careful arrangement. +With DANE-TA, as implemented in Exim and commonly in other MTAs, +the server TLS handshake must transmit the entire certificate chain from CA to server-certificate. DANE-TA is commonly used for several services and/or servers, each having a TLSA query-domain CNAME record, all of which point to a single TLSA record. +DANE-TA and DANE-EE can both be used together. -Another approach which should be seriously considered is to use DANE with a certificate -from a public CA, because of another technology, "MTA-STS", described below. +.new +Our recommendation is to use DANE with a certificate from a public CA, +because this enables a variety of strategies for remote clients to verify +your certificate. +You can then publish information both via DANE and another technology, +"MTA-STS", described below. + +When you use DANE-TA to publish trust anchor information, you ask entities +outside your administrative control to trust the Certificate Authority for +connections to you. +If using a private CA then you should expect others to still apply the +technical criteria they'd use for a public CA to your certificates. +In particular, you should probably try to follow current best practices for CA +operation around hash algorithms and key sizes. +Do not expect other organizations to lower their security expectations just +because a particular profile might be reasonable for your own internal use. + +When this text was last updated, this in practice means to avoid use of SHA-1 +and MD5; if using RSA to use key sizes of at least 2048 bits (and no larger +than 4096, for interoperability); to use keyUsage fields correctly; to use +random serial numbers. +The list of requirements is subject to change as best practices evolve. +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. +.wen The TLSA record should have a Selector field of SPKI(1) and a Matching Type field of SHA2-512(2). @@ -28189,6 +28223,16 @@ are workable for 4th-field hashes. For use with the DANE-TA model, server certificates must have a correct name (SubjectName or SubjectAltName). +.new +The Certificate issued by the CA published in the DANE-TA model should be +issued using a strong hash algorithm. +Exim, and importantly various other MTAs sending to you, will not +re-enable hash algorithms which have been disabled by default in TLS +libraries. +This means no MD5 and no SHA-1. SHA2-256 is the minimum for reliable +interoperability (and probably the maximum too, in 2018). +.wen + The use of OCSP-stapling should be considered, allowing for fast revocation of certificates (which would otherwise be limited by the DNS TTL on the TLSA records). However, this is likely to only be usable with DANE-TA. NOTE: the default of requesting OCSP for all hosts is modified iff DANE is in use, to: @@ -28271,8 +28315,8 @@ MTA-STS to let those clients who do use that protocol derive trust information. The MTA-STS design requires a certificate from a public Certificate Authority -which is recognized by clients sending to you. That selection is outside your -control. +which is recognized by clients sending to you. +That selection of which CAs are trusted by others is outside your control. The most interoperable course of action is probably to use &url(https://letsencrypt.org/,Let's Encrypt), with automated certificate @@ -29903,9 +29947,10 @@ warn hosts = +internal_hosts warn message = Remove internal headers remove_header = $acl_c_ihdrs .endd -Removed header lines are accumulated during the MAIL, RCPT, and predata ACLs. -They are removed from the message before processing the DATA and MIME ACLs. -There is no harm in attempting to remove the same header twice nor is removing +Header names for removal are accumulated during the MAIL, RCPT, and predata ACLs. +Matching header lines are removed from the message before processing the DATA and MIME ACLs. +If multiple header lines match, all are removed. +There is no harm in attempting to remove the same header twice nor in removing a non-existent header. Further header lines to be removed may be accumulated during the DATA and MIME ACLs, after which they are removed from the message, if present. In the case of non-SMTP messages, headers to be removed are @@ -32265,14 +32310,20 @@ deny message = This message contains malware ($malware_name) .endd -.section "Scanning with SpamAssassin" "SECTscanspamass" +.section "Scanning with SpamAssassin and Rspamd" "SECTscanspamass" .cindex "content scanning" "for spam" .cindex "spam scanning" .cindex "SpamAssassin" +.cindex "Rspamd" The &%spam%& ACL condition calls SpamAssassin's &%spamd%& daemon to get a spam -score and a report for the message. You can get SpamAssassin at -&url(http://www.spamassassin.org), or, if you have a working Perl -installation, you can use CPAN by running: +score and a report for the message. +Support is also provided for Rspamd. + +For more information about installation and configuration of SpamAssassin or +Rspamd refer to their respective websites at +&url(http://spamassassin.apache.org) and &url(http://www.rspamd.com) + +SpamAssassin can be installed with CPAN by running: .code perl -MCPAN -e 'install Mail::SpamAssassin' .endd @@ -32298,6 +32349,14 @@ server (currently defaulting to 120s). With a lower value the Linux connection tracking may consider your half-closed connection as dead too soon. + +To use Rspamd (which by default listens on all local addresses +on TCP port 11333) +you should add &%variant=rspamd%& after the address/port pair, for example: +.code +spamd_address = 127.0.0.1 11333 variant=rspamd +.endd + As of version 2.60, &%SpamAssassin%& also supports communication over UNIX sockets. If you want to us these, supply &%spamd_address%& with an absolute file name instead of an address/port pair: @@ -32382,7 +32441,8 @@ The right-hand side of the &%spam%& condition specifies a name. This is relevant if you have set up multiple SpamAssassin profiles. If you do not want to scan using a specific profile, but rather use the SpamAssassin system-wide default profile, you can scan for an unknown name, or simply use &"nobody"&. -However, you must put something on the right-hand side. +Rspamd does not use this setting. However, you must put something on the +right-hand side. The name allows you to use per-domain or per-user antispam profiles in principle, but this is not straightforward in practice, because a message may @@ -32451,8 +32511,10 @@ when running in country-specific locales, which are not legal unencoded in headers. .vitem &$spam_action$& -Either 'reject' or 'no action' depending on the +For SpamAssassin either 'reject' or 'no action' depending on the spam score versus threshold. +For Rspamd, the recommended action. + .endlist The &%spam%& condition caches its results unless expansion in @@ -39224,8 +39286,10 @@ hash-method or key-size: set dkim_verify_reason = hash too weak or key too short .endd -After all the DKIM ACL runs have completed, the value becomes a +So long as a DKIM ACL is defined (it need do no more than accept), +after all the DKIM ACL runs have completed, the value becomes a colon-separated list of the values after each run. +This is maintained for the mime, prdr and data ACLs. .vitem &%$dkim_verify_reason%& A string giving a little bit more detail when &%$dkim_verify_status%& is either