From: Jeremy Harris Date: Mon, 1 Jun 2020 16:07:44 +0000 (+0100) Subject: Merge branch '4.next' X-Git-Tag: exim-4.95-RC0~347 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/da47dd4d092ba35e4f8ff055d79693cc1266c816?ds=sidebyside;hp=-c Merge branch '4.next' --- da47dd4d092ba35e4f8ff055d79693cc1266c816 diff --combined doc/doc-docbook/spec.xfpt index b154743c2,68f3b5b5a..28c8b1462 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@@ -45,7 -45,7 +45,7 @@@ . Update the Copyright year (only) when changing content. . ///////////////////////////////////////////////////////////////////////////// -.set previousversion "4.93" +.set previousversion "4.94" .include ./local_params .set ACL "access control lists (ACLs)" @@@ -1409,9 -1409,11 +1409,9 @@@ the set of local parts that it defines &%local_part_suffix%& is in use, the prefix or suffix is removed from the local part before this check. If you want to do precondition tests on local parts that include affixes, you can do so by using a &%condition%& option (see below) -.new that uses the variables &$local_part$&, &$local_part_prefix$&, &$local_part_prefix_v$&, &$local_part_suffix$& and &$local_part_suffix_v$& as necessary. -.wen .next .vindex "&$local_user_uid$&" .vindex "&$local_user_gid$&" @@@ -3869,11 -3871,13 +3869,11 @@@ This option is not intended for use by by Exim in conjunction with the &%-MC%& option. It signifies that the remote host supports the ESMTP &_DSN_& extension. -.new .vitem &%-MCd%& .oindex "&%-MCd%&" This option is not intended for use by external callers. It is used internally by Exim in conjunction with the &%-d%& option to pass on an information string on the purpose of the process. -.wen .vitem &%-MCG%&&~<&'queue&~name'&> .oindex "&%-MCG%&" @@@ -3902,6 -3906,13 +3902,13 @@@ together with the file descriptor numbe signals the final completion of the sequence of processes that are passing messages through the same SMTP connection. + .new + .vitem &%-MCq%&&~<&'recipient&~address'&>&~<&'size'&> + .oindex "&%-MCq%&" + This option is not intended for use by external callers. It is used internally + by Exim to implement quota checking for local users. + .wen + .vitem &%-MCS%& .oindex "&%-MCS%&" This option is not intended for use by external callers. It is used internally @@@ -4393,6 -4404,7 +4400,6 @@@ written. When &%-oX%& is used with &%-b without &%-bd%&, this is the only way of causing Exim to write a pid file, because in those cases, the normal pid file is not used. -.new .vitem &%-oPX%& .oindex "&%-oPX%&" .cindex "pid (process id)" "of daemon" @@@ -4401,6 -4413,7 +4408,6 @@@ This option is not intended for genera The daemon uses it when terminating due to a SIGTEM, possibly in combination with &%-oP%&&~<&'path'&>. It causes the pid file to be removed. -.wen .vitem &%-or%&&~<&'time'&> .oindex "&%-or%&" @@@ -4512,12 -4525,19 +4519,17 @@@ appear in the correct order. Each flag .cindex "queue" "routing" .cindex "routing" "whole queue before delivery" .cindex "first pass routing" + .cindex "queue runner" "two phase" An option starting with &%-qq%& requests a two-stage queue run. In the first stage, the queue is scanned as if the &%queue_smtp_domains%& option matched every domain. Addresses are routed, local deliveries happen, but no remote transports are run. -.new Performance will be best if the &%queue_run_in_order%& option is false. + If that is so and the &%queue_fast_ramp%& option is true then + in the first phase of the run, + once a threshold number of messages are routed for a given host, + a delivery process is forked in parallel with the rest of the scan. -.wen .cindex "hints database" "remembering routing" The hints database that remembers which messages are waiting for specific hosts @@@ -5897,13 -5917,13 +5909,13 @@@ messages that are submitted by SMTP fro input and output (that is, not using TCP/IP). A number of MUAs operate in this manner. .code -deny message = Restricted characters in address - domains = +local_domains +deny domains = +local_domains local_parts = ^[.] : ^.*[@%!/|] + message = Restricted characters in address -deny message = Restricted characters in address - domains = !+local_domains +deny domains = !+local_domains local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./ + message = Restricted characters in address .endd These statements are concerned with local parts that contain any of the characters &"@"&, &"%"&, &"!"&, &"/"&, &"|"&, or dots in unusual places. @@@ -6007,10 -6027,10 +6019,10 @@@ require verify = recipien This statement requires the recipient address to be verified; if verification fails, the address is rejected. .code -# deny message = rejected because $sender_host_address \ +# deny dnslists = black.list.example +# message = rejected because $sender_host_address \ # is in a black list at $dnslist_domain\n\ # $dnslist_text -# dnslists = black.list.example # # warn dnslists = black.list.example # add_header = X-Warning: $sender_host_address is in \ @@@ -6383,11 -6403,13 +6395,11 @@@ local_delivery This &(appendfile)& transport is used for local delivery to user mailboxes in traditional BSD mailbox format. -.new We prefer to avoid using &$local_part$& directly to define the mailbox filename, as it is provided by a potential bad actor. Instead we use &$local_part_data$&, the result of looking up &$local_part$& in the user database (done by using &%check_local_user%& in the the router). -.wen By default &(appendfile)& runs under the uid and gid of the local user, which requires the sticky bit to be set on the &_/var/mail_& @@@ -6653,11 -6675,18 +6665,18 @@@ If the value of &$sender_host_address$ first &%domains%& setting above generates the second setting, which therefore causes a second lookup to occur. + .new The lookup type may optionally be followed by a comma and a comma-separated list of options. Each option is a &"name=value"& pair. Whether an option is meaningful depands on the lookup type. + All lookups support the option &"cache=no_rd"&. + If this is given then the cache that Exim manages for lookup results + is not checked before diong the lookup. + The result of the lookup is still written to the cache. + .wen + The rest of this chapter describes the different lookup types that are available. Any of them can be used in any part of the configuration where a lookup is permitted. @@@ -6672,15 -6701,17 +6691,16 @@@ Two different types of data lookup are The &'single-key'& type requires the specification of a file in which to look, and a single key to search for. The key must be a non-empty string for the lookup to succeed. The lookup type determines how the file is searched. -.new .cindex "tainted data" "single-key lookups" The file string may not be tainted +.cindex "tainted data" "de-tainting" All single-key lookups support the option &"ret=key"&. If this is given and the lookup (either underlying implementation or cached value) returns data, the result is replaced with a non-tainted version of the lookup key. + .cindex "tainted data" "de-tainting" -.wen .next .cindex "query-style lookup" "definition of" The &'query-style'& type accepts a generalized database query. No particular @@@ -6773,12 -6804,15 +6793,12 @@@ by default, but has an option to omit t .cindex "lookup" "dsearch" .cindex "dsearch lookup type" &(dsearch)&: The given file must be an -.new absolute -.wen directory path; this is searched for an entry whose name is the key by calling the &[lstat()]& function. The key may not contain any forward slash characters. If &[lstat()]& succeeds then so does the lookup. -.new .cindex "tainted data" "dsearch result" The result is regarded as untainted. @@@ -6802,6 -6836,7 +6822,6 @@@ ${lookup {passwd} dsearch,filter=file { .endd The default matching is for any entry type, including directories and symlinks. -.wen An example of how this lookup can be used to support virtual domains is given in section @@@ -6854,6 -6889,29 +6874,29 @@@ The final resulting element can be a si or array; for the latter two a string-representation of the JSON is returned. For elements of type string, the returned value is de-quoted. + + + .new + .next + .cindex LMDB + .cindex lookup lmdb + .cindex database lmdb + &(lmdb)&: The given file is an LMDB database. + LMDB is a memory-mapped key-value store, + with API modeled loosely on that of BerkeleyDB. + See &url(https://symas.com/products/lightning-memory-mapped-database/) + for the feature set and operation modes. + + Exim provides read-only access via the LMDB C library. + The library can be obtained from &url(https://github.com/LMDB/lmdb) + or your operating system package repository. + To enable LMDB support in Exim set LOOKUP_LMDB=yes in &_Local/Makefile_&. + + You will need to separately create the LMDB database file, + possibly using the &"mdb_load"& utility. + .wen + + .next .cindex "linear search" .cindex "lookup" "lsearch" @@@ -7052,6 -7110,7 +7095,6 @@@ passed to a Redis database. See sectio &(sqlite)&: The format of the query is new an optional filename -.wen followed by an SQL statement that is passed to an SQLite database. See section &<>&. @@@ -8014,12 -8073,14 +8057,12 @@@ The &%quote_redis%& expansion operato escapes whitespace and backslash characters with a backslash. .section "Specifying the server in the query" "SECTspeserque" -.new For MySQL, PostgreSQL and Redis lookups (but not currently for Oracle and InterBase), it is possible to specify a list of servers with an individual query. This is done by appending a comma-separated option to the query type: .display .endd &`,servers=`&&'server1:server2:server3:...'& -.wen Each item in the list may take one of two forms: .olist If it contains no slashes it is assumed to be just a host name. The appropriate @@@ -8053,6 -8114,7 +8096,6 @@@ option, you can still update it by a qu ${lookup pgsql,servers=master/db/name/pw {UPDATE ...} } .endd -.new An older syntax places the servers speciification before the qury, semicolon separated: .code @@@ -8061,6 -8123,7 +8104,6 @@@ ${lookup mysql{servers=master; UPDATE . The new version avoids potential issues with tainted arguments in the query, for explicit expansion. &*Note*&: server specifications in list-style lookups are still problematic. -.wen .section "Special MySQL features" "SECID73" @@@ -8112,10 -8175,12 +8155,10 @@@ SQLite is different to the other SQL lo addition to the SQL query. An SQLite database is a single file, and there is no daemon as in the other SQL databases. -.new .oindex &%sqlite_dbfile%& The preferred way of specifying the file is by using the &%sqlite_dbfile%& option, set to an absolute path. -.wen A deprecated method is available, prefixing the query with the filename separated by white space. This means that the path name cannot contain white space. @@@ -8124,6 -8189,7 +8167,6 @@@ It also means that the query cannot us the entire query including the filename - resulting in a refusal to open the file. -.new Here is a lookup expansion example: .code sqlite_dbfile = /some/thing/sqlitedb @@@ -8135,6 -8201,7 +8178,6 @@@ In a list, the syntax is similar. For e domainlist relay_to_domains = sqlite;\ select * from relays where ip='$sender_host_address'; .endd -.wen The only character affected by the &%quote_sqlite%& operator is a single quote, which it doubles. @@@ -8324,6 -8391,7 +8367,6 @@@ in the previous section. You could als -.new .section "Results of list checking" SECTlistresults The primary result of doing a list check is a truth value. In some contexts additional information is stored @@@ -8347,6 -8415,7 +8390,6 @@@ will store a result in the &$recipient_ The detail of the additional information depends on the type of match and is given below as the &*value*& information. -.wen @@@ -8409,6 -8478,7 +8452,6 @@@ domainlist dom2 = !a.b : *. where &'x.y'& does not match. It's best to avoid negation altogether in referenced lists if you can. -.new .cindex "hiding named list values" .cindex "named lists" "hiding value of" Some named list definitions may contain sensitive data, for example, passwords for @@@ -8418,6 -8488,7 +8461,6 @@@ word &"hide"&. For example .code hide domainlist filter_for_domains = ldap;PASS=secret ldap::/// ... .endd -.wen Named lists may have a performance advantage. When Exim is routing an @@@ -8512,7 -8583,9 +8555,7 @@@ as set by the &%primary_hostname%& opti possible to use the same configuration file on several different hosts that differ only in their names. -.new The value for a match will be the primary host name. -.wen .next @@@ -8527,7 -8600,9 +8570,7 @@@ control which of a host's several IP ad In today's Internet, the use of domain literals is controversial; see the &%allow_domain_literals%& main option. -.new The value for a match will be the string &`@[]`&. -.wen .next @@@ -8578,7 -8653,9 +8621,7 @@@ involved, it is easiest to change the d domains = &*}{*&<&'secret'&>&*}{*&<&'string'&>&*}}*& @@@ -10342,6 -10427,7 +10385,6 @@@ Example ${readsocket{/socket/name}{request string}{3s:shutdown=no}} .endd -.new The following option names are recognised: .ilist &*cache*& @@@ -10363,6 -10449,7 +10406,6 @@@ Controls the use of TLS on the connecti Values are &"yes"& or &"no"& (the default). If it is enabled, a shutdown as descripbed above is never done. .endlist -.wen A fourth argument allows you to change any newlines that are in the data @@@ -10564,6 -10651,14 +10607,14 @@@ ${sort {${lookup dnsdb{>:,,mx=example.c will sort an MX lookup into priority order. + + .new + .vitem &*${srs_encode&~{*&<&'secret'&>&*}{*&<&'return&~path'&>&*}{*&<&'original&~domain'&>&*}}*& + SRS encoding. See SECT &<>& for details. + .wen + + + .vitem &*${substr{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*& .cindex "&%substr%& expansion item" .cindex "substring extraction" @@@ -10838,7 -10933,8 +10889,7 @@@ a decimal representation of the answer As a more realistic example, in an ACL you might have .code -deny message = Too many bad recipients - condition = \ +deny condition = \ ${if and { \ {>{$rcpt_count}{10}} \ { \ @@@ -10847,7 -10943,6 +10898,7 @@@ {${eval:$rcpt_count/2}} \ } \ }{yes}{no}} + message = Too many bad recipients .endd The condition is true if there have been more than 10 RCPT commands and fewer than half of them have resulted in a valid recipient. @@@ -11626,6 -11721,13 +11677,13 @@@ includes the case of letters, whereas f case-independent. Case and collation order are defined per the system C locale. + + .new + .vitem &*inbound_srs&~{*&<&'local&~part'&>&*}{*&<&'secret'&>&*}*& + SRS decode. See SECT &<>& for details. + .wen + + .vitem &*inlist&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&& &*inlisti&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& .cindex "string" "comparison" @@@ -12278,6 -12380,13 +12336,6 @@@ contain the trailing slash. If &$config .vindex "&$config_file$&" The name of the main configuration file Exim is using. -.vitem &$dmarc_domain_policy$& &&& - &$dmarc_status$& &&& - &$dmarc_status_text$& &&& - &$dmarc_used_domains$& -Results of DMARC verification. -For details see section &<>&. - .vitem &$dkim_verify_status$& Results of DKIM verification. For details see section &<>&. @@@ -12310,13 -12419,6 +12368,13 @@@ When a message has been received this v a colon-separated list of signer domains and identities for the message. For details see section &<>&. +.vitem &$dmarc_domain_policy$& &&& + &$dmarc_status$& &&& + &$dmarc_status_text$& &&& + &$dmarc_used_domains$& +Results of DMARC verification. +For details see section &<>&. + .vitem &$dnslist_domain$& &&& &$dnslist_matched$& &&& &$dnslist_text$& &&& @@@ -12385,12 -12487,14 +12443,12 @@@ When the &%smtp_etrn_command%& option i the complete argument of the ETRN command (see section &<>&). .endlist -.new .cindex "tainted data" If the origin of the data is an incoming message, the result of expanding this variable is tainted. When un untainted version is needed, one should be obtained from looking up the value in a local (therefore trusted) database. Often &$domain_data$& is usable in this role. -.wen .vitem &$domain_data$& @@@ -12486,7 -12590,7 +12544,7 @@@ result of the lookup is made available allows you, for example, to do things like this: .code deny hosts = net-lsearch;/some/file -message = $host_data + message = $host_data .endd .vitem &$host_lookup_deferred$& .cindex "host name" "lookup, failure of" @@@ -12585,6 -12689,7 +12643,6 @@@ Global address rewriting happens when because a message may have many recipients and the system filter is called just once. -.new .cindex "tainted data" If the origin of the data is an incoming message, the result of expanding this variable is tainted. @@@ -12602,6 -12707,7 +12660,6 @@@ rather than this variable Often &$local_part_data$& is usable in this role. If needed, use a router &%address_data%& or &%set%& option for the retrieved data. -.wen When a message is being delivered to a file, pipe, or autoreply transport as a result of aliasing or forwarding, &$local_part$& is set to the local part of @@@ -12643,7 -12749,9 +12701,7 @@@ router as &$local_part_data$&. In addit to a transport, the value is available in that transport. If the transport is handling multiple addresses, the value from the first address is used. -.new The &%check_local_user%& router option also sets this variable. -.wen &$local_part_data$& is also set when the &%local_parts%& condition in an ACL matches a local part by means of a lookup. The data read by the lookup is @@@ -12659,6 -12767,7 +12717,6 @@@ If a local part prefix or suffix has be value of &$local_part$& during routing and subsequent delivery. The values of any prefix or suffix are in &$local_part_prefix$& and &$local_part_suffix$&, respectively. -.new .cindex "tainted data" If the specification did not include a wildcard then the affix variable value is not tainted. @@@ -12667,6 -12776,7 +12725,6 @@@ If the affix specification included a w the affix matched by the wildcard is in &$local_part_prefix_v$& or &$local_part_suffix_v$& as appropriate, and both the whole and varying values are tainted. -.wen .vitem &$local_scan_data$& .vindex "&$local_scan_data$&" @@@ -12832,9 -12942,9 +12890,9 @@@ header and the body) Here is an example of the use of this variable in a DATA ACL: .code -deny message = Too many lines in message header - condition = \ +deny condition = \ ${if <{250}{${eval:$message_linecount - $body_linecount}}} + message = Too many lines in message header .endd In the MAIL and RCPT ACLs, the value is zero because at that stage the message has not yet been received. @@@ -13323,6 -13433,7 +13381,6 @@@ library, by setting dns_dnssec_ok = 1 .endd -.new In addition, on Linux with glibc 2.31 or newer the resolver library will default to stripping out a successful validation status. This will break a previously working Exim installation. @@@ -13332,6 -13443,7 +13390,6 @@@ glibc to pass through any successful va .code options trust-ad .endd -.wen Exim does not perform DNSSEC validation itself, instead leaving that to a validating resolver (e.g. unbound, or bind with suitable configuration). @@@ -13708,6 -13820,17 +13766,17 @@@ the value of the Distinguished Name of If certificate verification fails it may refer to a failing chain element which is not the leaf. + + .new + .vitem &$tls_in_resumption$& &&& + &$tls_out_resumption$& + .vindex &$tls_in_resumption$& + .vindex &$tls_out_resumption$& + .cindex TLS resumption + Observability for TLS session resumption. See &<>& for details. + .wen + + .vitem &$tls_in_sni$& .vindex "&$tls_in_sni$&" .vindex "&$tls_sni$&" @@@ -14521,7 -14644,6 +14590,7 @@@ listed in more than one group .row &%percent_hack_domains%& "recognize %-hack for these domains" .row &%spamd_address%& "set interface to SpamAssassin" .row &%strict_acl_vars%& "object to unset ACL variables" +.row &%spf_smtp_comment_template%& "template for &$spf_smtp_comment$&" .endtable @@@ -14608,9 -14730,6 +14677,9 @@@ See also the &'Policy controls'& sectio .row &%dkim_verify_keytypes%& "DKIM key types accepted for signatures" .row &%dkim_verify_min_keysizes%& "DKIM key sizes accepted for signatures" .row &%dkim_verify_signers%& "DKIM domains for which DKIM ACL is run" +.row &%dmarc_forensic_sender%& "DMARC sender for report messages" +.row &%dmarc_history_file%& "DMARC results log" +.row &%dmarc_tld_file%& "DMARC toplevel domains file" .row &%host_lookup%& "host name looked up for these hosts" .row &%host_lookup_order%& "order of DNS and local name lookups" .row &%recipient_unqualified_hosts%& "may send unqualified recipients" @@@ -14712,6 -14831,7 +14781,7 @@@ .row &%hold_domains%& "hold delivery for these domains" .row &%local_interfaces%& "for routing checks" .row &%queue_domains%& "no immediate delivery for these" + .row &%queue_fast_ramp%& "parallel delivery with 2-phase queue run" .row &%queue_only%& "no immediate delivery at all" .row &%queue_only_file%& "no immediate delivery if file exists" .row &%queue_only_load%& "no immediate delivery if load is high" @@@ -15040,9 -15160,11 +15110,9 @@@ required, it must come from the &%-oA% This option defines a template file containing paragraphs of text to be used for constructing bounce messages. Details of the file's contents are given in chapter &<>&. -.new .cindex bounce_message_file "tainted data" The option is expanded to give the file path, which must be absolute and untainted. -.wen See also &%warn_message_file%&. @@@ -15369,9 -15491,11 +15439,9 @@@ etc. are ignored. If IP literals are en to handle IPv6 literal addresses. -.new .option dkim_verify_hashes main "string list" "sha256 : sha512" .cindex DKIM "selecting signature algorithms" This option gives a list of hash types which are acceptable in signatures, -.wen and an order of processing. Signatures with algorithms not in the list will be ignored. @@@ -15390,12 -15514,14 +15460,12 @@@ and an order of processing Signatures with algorithms not in the list will be ignored. -.new .option dkim_verify_min_keysizes main "string list" "rsa=1024 ed25519=250" This option gives a list of key sizes which are acceptable in signatures. The list is keyed by the algorithm type for the key; the values are in bits. Signatures with keys smaller than given by this option will fail verification. The default enforces the RFC 8301 minimum key size for RSA signatures. -.wen .option dkim_verify_minimal main boolean false If set to true, verification of signatures will terminate after the @@@ -15409,14 -15535,6 +15479,14 @@@ the ACL once for each signature in the See section &<>&. +.option dmarc_forensic_sender main string&!! unset +.option dmarc_history_file main string unset +.option dmarc_tld_file main string unset +.cindex DMARC "main section options" +These options control DMARC processing. +See section &<>& for details. + + .option dns_again_means_nonexist main "domain list&!!" unset .cindex "DNS" "&""try again""& response; overriding" DNS lookups give a &"try again"& response for the DNS errors @@@ -15487,6 -15605,7 +15557,6 @@@ default. A value of 0 coerces DNSSEC of If the resolver library does not support DNSSEC then this option has no effect. -.new On Linux with glibc 2.31 or newer this is insufficient, the resolver library will default to stripping out a successful validation status. This will break a previously working Exim installation. @@@ -15496,6 -15615,7 +15566,6 @@@ glibc to pass through any successful va .code options trust-ad .endd -.wen .option dns_ipv4_lookup main "domain list&!!" unset @@@ -15594,8 -15714,10 +15664,8 @@@ and RET and ORCPT options on MAIL FROM A NOTIFY=SUCCESS option requests success-DSN messages. A NOTIFY= option with no argument requests that no delay or failure DSNs are sent. -.new &*Note*&: Supplying success-DSN messages has been criticised on privacy grounds; it can leak details of internal forwarding. -.wen .option dsn_from main "string&!!" "see below" .cindex "&'From:'& header line" "in bounces" @@@ -16559,6 -16681,7 +16629,6 @@@ harm. This option overrides the &%pipe_ transport driver. -.new .option notifier_socket main string "$spool_directory/exim_daemon_notify" This option gives the name for a unix-domain socket on which the daemon listens for work and information-requests. @@@ -16573,6 -16696,7 +16643,6 @@@ to Exim If the Exim command line uses a &%-oX%& option and does not use &%-oP%& then a notifier socket is not created. -.wen .option openssl_options main "string list" "+no_sslv2 +no_sslv3 +single_dh_use +no_ticket +no_renegotiation" @@@ -16884,6 -17008,17 +16954,17 @@@ domains that do not match are processed next queue run. See also &%hold_domains%& and &%queue_smtp_domains%&. + .new + .option queue_fast_ramp main boolean false + .cindex "queue runner" "two phase" + .cindex "queue" "double scanning" + If set to true, two-phase queue runs, initiated using &%-qq%& on the + command line, may start parallel delivery processes during their first + phase. This will be done when a threshold number of messages have been + routed for a single host. + .wen + + .option queue_list_requires_admin main boolean true .cindex "restricting access to features" .oindex "&%-bp%&" @@@ -17505,10 -17640,12 +17586,10 @@@ example smtp_etrn_command = /etc/etrn_command $domain \ $sender_host_address .endd -.new If the option is not set, the argument for the ETRN command must be a &'#'& followed by an address string. In this case an &'exim -R '& command is used; if the ETRN ACL has set up a named-queue then &'-MCG '& is appended. -.wen A new process is created to run the command, but Exim does not wait for it to complete. Consequently, its status cannot be checked. If the command cannot be @@@ -17691,46 -17828,6 +17772,46 @@@ See section &<>& for m This option is available when Exim is compiled with SPF support. See section &<>& for more details. +.option spf_smtp_comment_template main string&!! "Please%_see%_http://www.open-spf.org/Why" +This option is available when Exim is compiled with SPF support. It +allows the customisation of the SMTP comment that the SPF library +generates. You are strongly encouraged to link to your own explanative +site. The template must not contain spaces. If you need spaces in the +output, use the proper placeholder. If libspf2 can not parse the +template, it uses a built-in default broken link. The following placeholders +(along with Exim variables (but see below)) are allowed in the template: +.ilist +&*%_*&: A space. +.next +&*%{L}*&: Envelope sender's local part. +.next +&*%{S}*&: Envelope sender. +.next +&*%{O}*&: Envelope sender's domain. +.next +&*%{D}*&: Current(?) domain. +.next +&*%{I}*&: SMTP client Ip. +.next +&*%{C}*&: SMTP client pretty IP. +.next +&*%{T}*&: Epoch time (UTC). +.next +&*%{P}*&: SMTP client domain name. +.next +&*%{V}*&: IP version. +.next +&*%{H}*&: EHLO/HELO domain. +.next +&*%{R}*&: Receiving domain. +.endlist +The capitalized placeholders do proper URL encoding, if you use them +lowercased, no encoding takes place. This list was compiled from the +libspf2 sources. + +A note on using Exim variables: As +currently the SPF library is initialized before the SMTP EHLO phase, +the variables useful for expansion are quite limited. .option split_spool_directory main boolean false @@@ -18254,6 -18351,14 +18335,14 @@@ preference order of the available ciphe &<>& and &<>&. + .new + .option tls_resumption_hosts main "host list&!!" unset + .cindex TLS resumption + This option controls which connections to offer the TLS resumption feature. + See &<>& for details. + .wen + + .option tls_try_verify_hosts main "host list&!!" unset .cindex "TLS" "client certificate verification" .cindex "certificate" "verification of client" @@@ -18450,9 -18555,11 +18539,9 @@@ for constructing the warning message wh been in the queue for a specified amount of time, as specified by &%delay_warning%&. Details of the file's contents are given in chapter &<>&. -.new .cindex warn_message_file "tainted data" The option is expanded to give the file path, which must be absolute and untainted. -.wen See also &%bounce_message_file%&. @@@ -18938,7 -19045,9 +19027,7 @@@ colon-separated (by default, changeabl that is associated with any addresses that are accepted by the router. However, the option has no effect when an address is just being verified. Each list item is separately expanded, at transport time. -.new If an item ends in *, it will match any header with the given prefix. -.wen The way in which the text is used to remove header lines at transport time is described in section &<>&. Header lines are not actually removed until @@@ -19051,9 -19160,11 +19140,9 @@@ command for LMTP, SMTP, and BSMTP deliv This behaviour can be overridden by setting &%rcpt_include_affixes%& true on the relevant transport. -.new .vindex &$local_part_prefix_v$& If wildcarding (above) was used then the part of the prefix matching the wildcard is available in &$local_part_prefix_v$&. -.wen When an address is being verified, &%local_part_prefix%& affects only the behaviour of the router. If the callout feature of verification is in use, this @@@ -20888,6 -20999,7 +20977,6 @@@ is not the case when the file contains yield empty addresses, for example, items containing only RFC 2822 address comments. -.new .cindex "tainted data" "in filenames" .cindex redirect "tainted data" Tainted data may not be used for a filename. @@@ -20898,6 -21010,7 +20987,6 @@@ as they are provided by a potential att In the examples above, &$local_part$& is used for looking up data held locally on the system, and not used directly (the second example derives &$home$& via the passsword file or database, using &$local_part$&). -.wen @@@ -21124,9 -21237,11 +21213,9 @@@ It must be given a .code list1: :include:/opt/lists/list1 .endd -.new .cindex "tainted data" "in filenames" .cindex redirect "tainted data" Tainted data may not be used for a filename. -.wen .next .cindex "address redirection" "to black hole" .cindex "delivery" "discard" @@@ -22135,7 -22250,9 +22224,7 @@@ Each list item is separately expanded If the result of the expansion is an empty string, or if the expansion is forced to fail, no action is taken. Other expansion failures are treated as errors and cause the delivery to be deferred. -.new If an item ends in *, it will match any header with the given prefix. -.wen Matching headers are omitted from the message as it is transported, as described in section &<>&. Header removal can also be specified by @@@ -22690,12 -22807,14 +22779,12 @@@ If &%file%& or &%directory%& is set fo used to determine the file or directory name for the delivery. Normally, the contents of &$address_file$& are used in some way in the string expansion. .endlist -.new .cindex "tainted data" "in filenames" .cindex appendfile "tainted data" Tainted data may not be used for a file or directory name. This means that, for instance, &$local_part$& cannot be used directly as a component of a path. It can however be used as the key for a lookup which returns a path (or component). -.wen .cindex "Sieve filter" "configuring &(appendfile)&" @@@ -24133,9 -24252,11 +24222,9 @@@ directories are also controllable. See details of the local delivery environment and chapter &<>& for a discussion of local delivery batching. -.new .cindex "tainted data" "in pipe command" .cindex pipe "tainted data" Tainted data may not be used for the command name. -.wen .section "Concurrent delivery" "SECID140" @@@ -25277,7 -25398,9 +25366,7 @@@ unauthenticated. See also &%hosts_requi .cindex "RFC 3030" "CHUNKING" This option provides a list of servers to which, provided they announce CHUNKING support, Exim will attempt to use BDAT commands rather than DATA. -.new Unless DKIM signing is being done, -.wen BDAT will not be used in conjunction with a transport filter. .option hosts_try_dane smtp "host list&!!" * @@@ -25375,6 -25498,20 +25464,20 @@@ so can cause parallel connections to th permits this. + .new + .option message_linelength_limit smtp integer 998 + .cindex "line length" limit + This option sets the maximum line length, in bytes, that the transport + will send. Any messages with lines exceeding the given value + will fail and a failure-DSN ("bounce") message will if possible be returned + to the sender. + The default value is that defined by the SMTP standards. + + It is generally wise to also check in the data ACL so that messages + received via SMTP can be refused without producing a bounce. + .wen + + .option multi_domain smtp boolean&!! true .vindex "&$domain$&" When this option is set, the &(smtp)& transport can handle a number of @@@ -25556,6 -25693,14 +25659,14 @@@ is used in different ways by OpenSSL an ciphers is a preference order. + .new + .option tls_resumption_hosts smtp "host list&!!" unset + .cindex TLS resumption + This option controls which connections to use the TLS resumption feature. + See &<>& for details. + .wen + + .option tls_sni smtp string&!! unset .cindex "TLS" "Server Name Indication" @@@ -27788,6 -27933,7 +27899,6 @@@ connection, a client certificate has be option is passed. When authentication succeeds, the identity of the user who authenticated is placed in &$auth1$&. -.new The Dovecot configuration to match the above wil look something like: .code @@@ -27807,6 -27953,7 +27918,6 @@@ conf.d/10-auth.conf : auth_mechanisms = plain login ntlm .endd -.wen .ecindex IIDdcotauth1 .ecindex IIDdcotauth2 @@@ -27833,6 -27980,7 +27944,6 @@@ scale to handle future authentication m made that any particular new authentication mechanism will be supported without code changes in Exim. -.new The library is expected to add support in an upcoming realease for the SCRAM-SHA-256 method. The macro _HAVE_AUTH_GSASL_SCRAM_SHA_256 will be defined @@@ -27856,7 -28004,9 +27967,7 @@@ the password to be used, in clear .option client_username gsasl string&!! unset This option is exapanded before use, and should result in the account name to be used. -.wen -.new .option client_spassword gsasl string&!! unset If a SCRAM mechanism is being used and this option is set it is used in preference to &%client_password%&. @@@ -27865,6 -28015,7 +27976,6 @@@ a 40 (for SHA-1) or 64 (for SHA-256) ch with the PBKDF2-prepared password, hex-encoded. Note that this value will depend on the salt and iteration-count supplied by the server. -.wen @@@ -27882,10 -28033,12 +27993,10 @@@ This should have meant that certificat non-issue, as a man-in-the-middle attack will cause the correct client and server to see different identifiers and authentication will fail. -.new This is only usable by mechanisms which support "channel binding"; at time of writing, that's the SCRAM family. When using this feature the "-PLUS" variants of the method names need to be used. -.wen This defaults off to ensure smooth upgrade across Exim releases, in case this option causes some clients to start failing. Some future release @@@ -27941,6 -28094,7 +28052,6 @@@ Some mechanisms will use this data .option server_scram_iter gsasl string&!! 4096 This option provides data for the SCRAM family of mechanisms. -.new The &$auth1$&, &$auth2$& and &$auth3$& variables are available when this option is expanded. @@@ -27951,17 -28105,21 +28062,17 @@@ a compute cost factor imposed on the cl either the iteration count or the salt). A minimum value of 4096 is required by the standards for all current SCRAM mechanism variants. -.wen .option server_scram_salt gsasl string&!! unset This option provides data for the SCRAM family of mechanisms. -.new The &$auth1$&, &$auth2$& and &$auth3$& variables are available when this option is expanded. The value should be a base64-encoded string, of random data typically 4-to-16 bytes long. If unset or empty after expansion the library will provides a value for the protocol conversation. -.wen -.new .option server_key gsasl string&!! unset .option server_skey gsasl string&!! unset These options can be used for the SCRAM family of mechanisms @@@ -27987,6 -28145,7 +28098,6 @@@ If unset or not of the right length, &% The libgsasl library release includes a utility &'gsasl'& which can be used to generate these values. -.wen .option server_service gsasl string &`smtp`& @@@ -29372,6 -29531,100 +29483,100 @@@ Open-source PKI book, available online .ecindex IIDencsmtp2 + .new + .section "TLS Resumption" "SECTresumption" + .cindex TLS resumption + TLS Session Resumption for TLS 1.2 and TLS 1.3 connections can be used (defined + in RFC 5077 for 1.2). The support for this requires GnuTLS 3.6.3 or OpenSSL 1.1.1 + (or later). + + Session resumption (this is the "stateless" variant) involves the server sending + a "session ticket" to the client on one connection, which can be stored by the + client and used for a later session. The ticket contains sufficient state for + the server to reconstruct the TLS session, avoiding some expensive crypto + calculation and (on TLS1.2) one full packet roundtrip time. + + .ilist + Operational cost/benefit: + + The extra data being transmitted costs a minor amount, and the client has + extra costs in storing and retrieving the data. + + In the Exim/Gnutls implementation the extra cost on an initial connection + which is TLS1.2 over a loopback path is about 6ms on 2017-laptop class hardware. + The saved cost on a subsequent connection is about 4ms; three or more + connections become a net win. On longer network paths, two or more + connections will have an average lower startup time thanks to the one + saved packet roundtrip. TLS1.3 will save the crypto cpu costs but not any + packet roundtrips. + + .cindex "hints database" tls + Since a new hints DB is used on the TLS client, + the hints DB maintenance should be updated to additionally handle "tls". + + .next + Security aspects: + + The session ticket is encrypted, but is obviously an additional security + vulnarability surface. An attacker able to decrypt it would have access + all connections using the resumed session. + The session ticket encryption key is not committed to storage by the server + and is rotated regularly (OpenSSL: 1hr, and one previous key is used for + overlap; GnuTLS 6hr but does not specify any overlap). + Tickets have limited lifetime (2hr, and new ones issued after 1hr under + OpenSSL. GnuTLS 2hr, appears to not do overlap). + + There is a question-mark over the security of the Diffie-Helman parameters + used for session negotiation. + + .next + Observability: + + The &%log_selector%& "tls_resumption" appends an asterisk to the tls_cipher "X=" + element. + + The variables &$tls_in_resumption$& and &$tls_out_resumption$& + have bits 0-4 indicating respectively + support built, client requested ticket, client offered session, + server issued ticket, resume used. A suitable decode list is provided + in the builtin macro _RESUME_DECODE for in &%listextract%& expansions. + + .next + Control: + + The &%tls_resumption_hosts%& main option specifies a hostlist for which + exim, operating as a server, will offer resumption to clients. + Current best practice is to not offer the feature to MUA connection. + Commonly this can be done like this: + .code + tls_resumption_hosts = ${if inlist {$received_port}{587:465} {:}{*}} + .endd + If the peer host matches the list after expansion then resumption + is offered and/or accepted. + + The &%tls_resumption_hosts%& smtp transport option performs the + equivalent function for operation as a client. + If the peer host matches the list after expansion then resumption + is attempted (if a stored session is available) or the information + stored (if supplied by the peer). + + + .next + Issues: + + In a resumed session: + .ilist + The variables &$tls_{in,out}_cipher$& will have values different + to the original (under GnuTLS). + .next + The variables &$tls_{in,out}_ocsp$& will be "not requested" or "no response", + and the &%hosts_require_ocsp%& smtp trasnport option will fail. + . XXX need to do something with that hosts_require_ocsp + .endlist + + .endlist + .wen + .section DANE "SECDANE" .cindex DANE @@@ -30190,8 -30443,8 +30395,8 @@@ The &%message%& modifier operates exact &%drop%&: This verb behaves like &%deny%&, except that an SMTP connection is forcibly closed after the 5&'xx'& error message has been sent. For example: .code -drop message = I don't take more than 20 RCPTs - condition = ${if > {$rcpt_count}{20}} +drop condition = ${if > {$rcpt_count}{20}} + message = I don't take more than 20 RCPTs .endd There is no difference between &%deny%& and &%drop%& for the connect-time ACL. The connection is always dropped after sending a 550 response. @@@ -31001,6 -31254,7 +31206,6 @@@ response to an EHLO command. Therefore controlled by &%acl_smtp_connect%& or &%acl_smtp_helo%&. See also &%pipelining_advertise_hosts%&. -.new .vitem &*control&~=&~queue/*&<&'options'&>* &&& &*control&~=&~queue_only*& .oindex "&%queue%&" @@@ -31025,6 -31279,7 +31230,6 @@@ able to send all such messages on a sin The control only applies to the current message, not to any subsequent ones that may be received in the same SMTP connection. -.wen .vitem &*control&~=&~submission/*&<&'options'&> .cindex "message" "submission" @@@ -31425,7 -31680,7 +31630,7 @@@ of the lookup is made available in the allows you, for example, to set up a statement like this: .code deny hosts = net-lsearch;/some/file -message = $host_data + message = $host_data .endd which gives a custom error message for each denied host. @@@ -31569,8 -31824,8 +31774,8 @@@ section &<>& ( condition to restrict it to bounce messages only: .code deny senders = : - message = A valid sender header is required for bounces !verify = header_sender + message = A valid sender header is required for bounces .endd .vitem &*verify&~=&~header_syntax*& @@@ -31752,8 -32007,8 +31957,8 @@@ Testing the list of domains stops as so warn for one list and block for another, you can use two different statements: .code deny dnslists = blackholes.mail-abuse.org -warn message = X-Warn: sending host is on dialups list - dnslists = dialups.mail-abuse.org +warn dnslists = dialups.mail-abuse.org + message = X-Warn: sending host is on dialups list .endd .cindex caching "of dns lookup" .cindex DNS TTL @@@ -31794,8 -32049,8 +31999,8 @@@ addresses (see, e.g., the &'domain base with these lists. You can change the name that is looked up in a DNS list by listing it after the domain name, introduced by a slash. For example, .code -deny message = Sender's domain is listed at $dnslist_domain - dnslists = dsn.rfc-ignorant.org/$sender_address_domain +deny dnslists = dsn.rfc-ignorant.org/$sender_address_domain + message = Sender's domain is listed at $dnslist_domain .endd This particular example is useful only in ACLs that are obeyed after the RCPT or DATA commands, when a sender address is available. If (for @@@ -31859,13 -32114,13 +32064,13 @@@ dnslists = black.list.tld/a.domain::b.d However, when the data for the list is obtained from a lookup, the second form is usually much more convenient. Consider this example: .code -deny message = The mail servers for the domain \ +deny dnslists = sbl.spamhaus.org/<|${lookup dnsdb {>|a=<|\ + ${lookup dnsdb {>|mxh=\ + $sender_address_domain} }} } + message = The mail servers for the domain \ $sender_address_domain \ are listed at $dnslist_domain ($dnslist_value); \ see $dnslist_text. - dnslists = sbl.spamhaus.org/<|${lookup dnsdb {>|a=<|\ - ${lookup dnsdb {>|mxh=\ - $sender_address_domain} }} } .endd Note the use of &`>|`& in the dnsdb lookup to specify the separator for multiple DNS records. The inner dnsdb lookup produces a list of MX hosts @@@ -31938,7 -32193,7 +32143,7 @@@ very meaningful. See section &<>&. + .new + .next + If the &%quota%& option is specified for recipient verify, + successful routing to an appendfile transport is followed by a call into + the transport to evaluate the quota status for the recipient. + No actual delivery is done, but verification will succeed if the quota + is sufficient for the message (if the sender gave a message size) or + not already exceeded (otherwise). + .wen .endlist .cindex "verifying address" "differentiating failures" @@@ -32525,6 -32789,9 +32739,9 @@@ connection, HELO, or MAIL) &%recipient%&: The RCPT command in a callout was rejected. .next &%postmaster%&: The postmaster check in a callout was rejected. + .new + .next + &%quota%&: The quota check for a local recipient did non pass. .endlist The main use of these variables is expected to be to distinguish between @@@ -32854,6 -33121,38 +33071,38 @@@ behaviour will be the same + .new + .section "Quota caching" "SECTquotacache" + .cindex "hints database" "quota cache" + .cindex "quota" "cache, description of" + .cindex "caching" "quota" + Exim caches the results of quota verification + in order to reduce the amount of resources used. + The &"callout"& hints database is used. + + The default cache periods are five minutes for a positive (good) result + and one hour for a negative result. + To change the periods the &%quota%& option can be followed by an equals sign + and a number of optional paramemters, separated by commas. + For example: + .code + verify = recipient/quota=cachepos=1h,cacheneg=1d + .endd + Possible parameters are: + .vlist + .vitem &*cachepos&~=&~*&<&'time&~interval'&> + .cindex "quota cache" "positive entry expiry, specifying" + Set the lifetime for a positive cache entry. + A value of zero seconds is legitimate. + + .vitem &*cacheneg&~=&~*&<&'time&~interval'&> + .cindex "quota cache" "negative entry expiry, specifying" + As above, for a negative entry. + + .vitem &*no_cache*& + Set both positive and negative lifetimes to zero. + .wen + .section "Sender address verification reporting" "SECTsenaddver" .cindex "verifying" "suppressing error details" See section &<>& for a general discussion of @@@ -33032,16 -33331,16 +33281,16 @@@ list called &%batv_senders%&. Then, in use this: .code # Bounces: drop unsigned addresses for BATV senders -deny message = This address does not send an unsigned reverse path - senders = : +deny senders = : recipients = +batv_senders + message = This address does not send an unsigned reverse path # Bounces: In case of prvs-signed address, check signature. -deny message = Invalid reverse path signature. - senders = : +deny senders = : condition = ${prvscheck {$local_part@$domain}\ {PRVSCHECK_SQL}{1}} !condition = $prvscheck_result + message = Invalid reverse path signature. .endd The first statement rejects recipients for bounce messages that are addressed to plain BATV sender addresses, because it is known that BATV senders do not @@@ -33578,13 -33877,13 +33827,13 @@@ imposed by your anti-virus scanner Here is a very simple scanning example: .code -deny message = This message contains malware ($malware_name) - malware = * +deny malware = * + message = This message contains malware ($malware_name) .endd The next example accepts messages when there is a problem with the scanner: .code -deny message = This message contains malware ($malware_name) - malware = */defer_ok +deny malware = */defer_ok + message = This message contains malware ($malware_name) .endd The next example shows how to use an ACL variable to scan with both sophie and aveserver. It assumes you have set: @@@ -33593,13 -33892,13 +33842,13 @@@ av_scanner = $acl_m .endd in the main Exim configuration. .code -deny message = This message contains malware ($malware_name) - set acl_m0 = sophie +deny set acl_m0 = sophie malware = * + message = This message contains malware ($malware_name) -deny message = This message contains malware ($malware_name) - set acl_m0 = aveserver +deny set acl_m0 = aveserver malware = * + message = This message contains malware ($malware_name) .endd @@@ -33728,8 -34027,8 +33977,8 @@@ is set to record the actual address use .section "Calling SpamAssassin from an Exim ACL" "SECID206" Here is a simple example of the use of the &%spam%& condition in a DATA ACL: .code -deny message = This message was classified as SPAM - spam = joe +deny spam = joe + message = This message was classified as SPAM .endd 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 @@@ -33761,9 -34060,9 +34010,9 @@@ large ones may cause significant perfor are quite small, it is recommended that you do not scan the big ones. For example: .code -deny message = This message was classified as SPAM - condition = ${if < {$message_size}{10K}} +deny condition = ${if < {$message_size}{10K}} spam = nobody + message = This message was classified as SPAM .endd The &%spam%& condition returns true if the threshold specified in the user's @@@ -33821,8 -34120,8 +34070,8 @@@ failed. If you want to treat DEFER as F statement block), append &`/defer_ok`& to the right-hand side of the spam condition, like this: .code -deny message = This message was classified as SPAM - spam = joe/defer_ok +deny spam = joe/defer_ok + message = This message was classified as SPAM .endd This causes messages to be accepted even if there is a problem with &%spamd%&. @@@ -33840,9 -34139,9 +34089,9 @@@ warn spam = nobod add_header = Subject: *SPAM* $h_Subject: # reject spam at high scores (> 12) -deny message = This message scored $spam_score spam points. - spam = nobody:true +deny spam = nobody:true condition = ${if >{$spam_score_int}{120}{1}{0}} + message = This message scored $spam_score spam points. .endd @@@ -34046,10 -34345,10 +34295,10 @@@ As an example, the following will ban & alternative plain text), while allowing HTML files to be attached. HTML coverletter mail attached to non-HTML coverletter mail will also be allowed: .code -deny message = HTML mail is not accepted here -!condition = $mime_is_rfc822 -condition = $mime_is_coverletter -condition = ${if eq{$mime_content_type}{text/html}{1}{0}} +deny !condition = $mime_is_rfc822 + condition = $mime_is_coverletter + condition = ${if eq{$mime_content_type}{text/html}{1}{0}} + message = HTML mail is not accepted here .endd .vitem &$mime_is_multipart$& @@@ -34102,8 -34401,8 +34351,8 @@@ expanded before being used, you must al with more backslashes, or use the &`\N`& facility to disable expansion. Here is a simple example that contains two regular expressions: .code -deny message = contains blacklisted regex ($regex_match_string) - regex = [Mm]ortgage : URGENT BUSINESS PROPOSAL +deny regex = [Mm]ortgage : URGENT BUSINESS PROPOSAL + message = contains blacklisted regex ($regex_match_string) .endd The conditions returns true if any one of the regular expressions matches. The &$regex_match_string$& expansion variable is then set up and contains the @@@ -34171,8 -34470,10 +34420,8 @@@ HAVE_LOCAL_SCAN=ye LOCAL_SCAN_SOURCE=Local/local_scan.c .endd for example. The function must be called &[local_scan()]&; -.new the source file(s) for it should first #define LOCAL_SCAN and then #include "local_scan.h". -.wen It is called by Exim after it has received a message, when the success return code is about to be sent. This is after all the ACLs have been run. The return code from your @@@ -34853,6 -35154,7 +35102,6 @@@ dropping of a TCP/IP connection), you c arguments. It flushes the output stream, and returns a non-zero value if there is an error. -.new .vitem &*void&~*store_get(int,BOOL)*& This function accesses Exim's internal store (memory) manager. It gets a new chunk of memory whose size is given by the first argument. @@@ -34861,6 -35163,7 +35110,6 @@@ data possibly coming from an attacker ( FALSE if it is locally-sourced. Exim bombs out if it ever runs out of memory. See the next section for a discussion of memory handling. -.wen .vitem &*void&~*store_get_perm(int,BOOL)*& This function is like &'store_get()'&, but it always gets memory from the @@@ -36974,11 -37277,13 +37223,11 @@@ virtual data = ${lookup{$local_part}lsearch{/etc/mail/virtual/$domain_data}} no_more .endd -.new The &%domains%& option specifies that the router is to be skipped, unless there is a file in the &_/etc/mail/virtual_& directory whose name is the same as the domain that is being processed. The &(dsearch)& lookup used results in an untainted version of &$domain$& being placed into the &$domain_data$& variable. -.wen When the router runs, it looks up the local part in the file to find a new address (or list of addresses). The &%no_more%& @@@ -37983,6 -38288,7 +38232,7 @@@ selection marked by asterisks &`*tls_certificate_verified `& certificate verification status &`*tls_cipher `& TLS cipher suite on <= and => lines &` tls_peerdn `& TLS peer DN on <= and => lines + &` tls_resumption `& append * to cipher field &` tls_sni `& TLS SNI on <= lines &` unknown_in_list `& DNS lookup failed in list match @@@ -38384,6 -38690,14 +38634,14 @@@ connection, the cipher suite used is ad connection, and a certificate is supplied by the remote host, the peer DN is added to the log line, preceded by DN=. .next + .cindex "log" "TLS resumption" + .cindex "TLS" "logging session resumption" + .new + &%tls_resumption%&: When a message is sent or received over an encrypted + connection and the TLS session resumed one used on a previous TCP connection, + an asterisk is appended to the X= cipher field in the log line. + .wen + .next .cindex "log" "TLS SNI" .cindex "TLS" "logging SNI" &%tls_sni%&: When a message is received over an encrypted connection, and @@@ -38929,6 -39243,10 +39187,10 @@@ for remote host .next &'ratelimit'&: the data for implementing the ratelimit ACL condition .next + .new + &'tls'&: TLS session resumption data + .wen + .next &'misc'&: other hints data .endlist @@@ -40342,8 -40660,8 +40604,8 @@@ There is no dot-stuffing (and no dot-te . //////////////////////////////////////////////////////////////////////////// . //////////////////////////////////////////////////////////////////////////// - .chapter "DKIM, SPF and DMARC" "CHAPdkim" &&& - "DKIM, SPF and DMARC Support" + .chapter "DKIM, SPF, SRS and DMARC" "CHAPdkim" &&& + "DKIM, SPF, SRS and DMARC Support" .section "DKIM (DomainKeys Identified Mail)" SECDKIM .cindex "DKIM" @@@ -40548,7 -40866,9 +40810,7 @@@ When unspecified, the header names list whether or not each header is present in the message. The default list is available for the expansion in the macro &"_DKIM_SIGN_HEADERS"& -.new and an oversigning variant is in &"_DKIM_OVERSIGN_HEADERS"&. -.wen If a name is repeated, multiple headers by that name (or the absence thereof) will be signed. The textually later headers in the headers part of the @@@ -40799,8 -41119,10 +41061,8 @@@ Notes from the key record (tag n=) .vitem &%$dkim_key_length%& Number of bits in the key. -.new Valid only once the key is loaded, which is at the time the header signature is verified, which is after the body hash is. -.wen Note that RFC 8301 says: .code @@@ -40824,10 -41146,10 +41086,10 @@@ verb to a group of domains or identitie .code # Warn when Mail purportedly from GMail has no gmail signature -warn log_message = GMail sender without gmail.com DKIM signature - sender_domains = gmail.com +warn sender_domains = gmail.com dkim_signers = gmail.com dkim_status = none + log_message = GMail sender without gmail.com DKIM signature .endd Note that the above does not check for a total lack of DKIM signing; @@@ -40839,10 -41161,10 +41101,10 @@@ results against the actual result of ve to restrict an ACL verb to a list of verification outcomes, for example: .code -deny message = Mail from Paypal with invalid/missing signature - sender_domains = paypal.com:paypal.de +deny sender_domains = paypal.com:paypal.de dkim_signers = paypal.com:paypal.de dkim_status = none:invalid:fail + message = Mail from Paypal with invalid/missing signature .endd The possible status keywords are: 'none','invalid','fail' and 'pass'. Please @@@ -40926,16 -41248,13 +41188,16 @@@ deny spf = fai message = $sender_host_address is not allowed to send mail from \ ${if def:sender_address_domain \ {$sender_address_domain}{$sender_helo_name}}. \ - Please see http://www.open-spf.org/Why?scope=\ - ${if def:sender_address_domain {mfrom}{helo}};\ + Please see http://www.open-spf.org/Why;\ identity=${if def:sender_address_domain \ {$sender_address}{$sender_helo_name}};\ ip=$sender_host_address .endd +Note: The above mentioned URL may not be as helpful as expected. You are +encouraged to replace the link with a link to a site with more +explanations. + When the spf condition has run, it sets up several expansion variables: @@@ -40970,11 -41289,8 +41232,11 @@@ .vitem &$spf_smtp_comment$& .vindex &$spf_smtp_comment$& +.vindex &%spf_smtp_comment_template%& This contains a string that can be used in a SMTP response to the calling party. Useful for "fail". + The string is generated by the SPF library from the template configured in the main config + option &%spf_smtp_comment_template%&. .endlist @@@ -41035,6 -41351,108 +41297,108 @@@ The lookup will return the same result + .section "SRS (Sender Rewriting Scheme)" SECTSRS + .cindex SRS "sender rewriting scheme" + + .new + SRS can be used to modify sender addresses when forwarding so that + SPF verification does not object to them. + It operates by encoding the original envelope sender in a new + sender local part and using a domain run by the forwarding site + as the new domain for the sender. Any DSN message should be returned + to this new sender at the forwarding site, which can extract the + original sender from the coded local part and forward the DSN to + the originator. + + This is a way of avoiding the breakage that SPF does to forwarding. + The constructed local-part will be longer than the original, + leading to possible problems with very long addresses. + The changing of the sender address also hinders the tracing of mail + problems. + + Exim can be built to include native SRS support. To do this + SUPPORT_SRS=yes must be defined in &_Local/Makefile_&. + If this has been done, the macros _HAVE_SRS and _HAVE_NATIVE_SRS + will be defined. + The support is limited to SRS0-encoding; SRS1 is not supported. + + .cindex SRS excoding + To encode an address use this expansion item: + .vlist + .vitem &*${srs_encode&~{*&<&'secret'&>&*}{*&<&'return&~path'&>&*}{*&<&'original&~domain'&>&*}}*& + .cindex "&%srs_encode%& expansion item" + .cindex SRS "expansion item" + The first argument should be a secret known and used by all systems + handling the recipient domain for the original message. + There is no need to periodically change this key; a timestamp is also + encoded. + The second argument should be given as the envelope sender address before this + encoding operation. + The third argument should be the recipient domain of the message when + it arrived at this system. + .endlist + + .cindex SRS decoding + To decode an address use this expansion condition: + .vlist + .vitem &*inbound_srs&~{*&<&'local&~part'&>&*}{*&<&'secret'&>&*}*& + The first argument should be the recipient local prt as is was received. + The second argument is the site secret. + + If the messages is not for an SRS-encoded recipient the condition will + return false. If it is, the condition will return true and the variable + &$srs_recipient$& will be set to the decoded (original) value. + .endlist + + Example usage: + .code + #macro + SRS_SECRET = + + #routers + + outbound: + driver = dnslookup + # if outbound, and forwarding has been done, use an alternate transport + domains = ! +my_domains + transport = ${if eq {$local_part@$domain} \ + {$original_local_part@$original_domain} \ + {remote_smtp} {remote_forwarded_smtp}} + + inbound_srs: + driver = redirect + senders = : + domains = +my_domains + # detect inbound bounces which are SRS'd, and decode them + condition = ${if inbound_srs {$local_part} {SRS_SECRET}} + data = $srs_recipient + + inbound_srs_failure: + driver = redirect + senders = : + domains = +my_domains + # detect inbound bounces which look SRS'd but are invalid + condition = ${if inbound_srs {$local_part} {}} + allow_fail + data = :fail: Invalid SRS recipient address + + #... further routers here + + + # transport; should look like the non-forward outbound + # one, plus the max_rcpt and return_path options + remote_forwarded_smtp: + driver = smtp + # modify the envelope from, for mails that we forward + max_rcpt = 1 + return_path = ${srs_encode {SRS_SECRET} {$return_path} {$original_domain}} + .endd + + + .wen + + + .section DMARC SECDMARC .cindex DMARC verification @@@ -41069,8 -41487,10 +41433,8 @@@ during domain parsing. Maintained by Mo the most current version can be downloaded from a link at &url(https://publicsuffix.org/list/public_suffix_list.dat). See also the util/renew-opendmarc-tlds.sh script. -.new The default for the option is unset. If not set, DMARC processing is disabled. -.wen The &%dmarc_history_file%& option, if set @@@ -41345,8 -41765,8 +41709,8 @@@ A possible solution is # Or do some kind of IP lookup in a flat file or database # LIMIT = ${lookup{$sender_host_address}iplsearch{/etc/exim/proxy_limits}} - defer message = Too many connections from this IP right now - ratelimit = LIMIT / 5s / per_conn / strict + defer ratelimit = LIMIT / 5s / per_conn / strict + message = Too many connections from this IP right now .endd @@@ -41599,7 -42019,9 +41963,7 @@@ Events have names which correspond to t The name is placed in the variable &$event_name$& and the event action expansion must check this, as it will be called for every possible event type. -.new The current list of events is: -.wen .display &`dane:fail after transport `& per connection &`msg:complete after main `& per message diff --combined doc/doc-txt/ChangeLog index 585deb042,e8f704839..a4526ca5c --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@@ -3,6 -3,14 +3,14 @@@ affect Exim's operation, with an unchan options, and new features, see the NewStuff file next to this ChangeLog. -Since Exim version 4.94 ----------------------- ++Exim version 4.95 ++----------------- + + JH/01 Bug 1329: Fix format of Maildir-format filenames to match other mail- + related applications. Previously an "H" was used where available info + says that "M" should be, so change to match. + + Exim version 4.94 ----------------- @@@ -199,14 -207,6 +207,14 @@@ JH/42 Internationalisation: change the transport. The change does mean that addresses needing conversion will be converted when previously a delivery failure would occur. +JH/43 Fix possible long line in DSN. Previously when a very long SMTP error + response was received it would be used unchecked in a fail-DSN, violating + standards on line-length limits. Truncate if needed. + +HS/01 Remove parameters of the link to www.open-spf.org. The linked form + doesn't work. (Additionally add a new main config option to configure the + spf_smtp_comment) + Exim version 4.93 ----------------- diff --combined doc/doc-txt/NewStuff index 43e170e11,9797e97db..5769a9733 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@@ -6,6 -6,30 +6,30 @@@ Before a formal release, there may be q test from the snapshots or the Git before the documentation is updated. Once the documentation is updated, this file is reduced to a short list. + Version 4.95 + ------------ + + 1. The fast-ramp two phase queue run support, previously experimental, is + now supported by default. + + 2. The native SRS support, previously experimental, is now supported. It is + not built unless specified in the Local/Makefile. + + 3. TLS resumption support, previously experimental, is now supported and + included in default builds. + + 4. Single-key LMDB lookups, previously experimental, are now supported. + The support is not built unless specified in the Local/Makefile. + + 5. Option "message_linelength_limit" on the smtp transport to enforce (by + default) the RFC 998 character limit. + + 6. An option to ignore the cache on a lookup. + + 7. Quota checking during reception (i.e. at SMTP time) for appendfile- + transport-managed quotas. + + Version 4.94 ------------ @@@ -17,7 -41,7 +41,7 @@@ 3. A msg:defer event. - 4. Client-side support in the gsasl authenticator. Tested against the + 4. Client-side support in the gsasl authenticator. Tested against the plaintext driver for PLAIN; only against itself for SCRAM-SHA-1 and SCRAM-SHA-1-PLUS methods. @@@ -71,9 -95,6 +95,9 @@@ 21. bounce_message_file and warn_message_file are now expanded before use. +22. New main config option spf_smtp_comment_template to customise the + $spf_smtp_comment variable + Version 4.93 @@@ -114,7 -135,7 +138,7 @@@ 15: Support under OpenSSL for writing NSS-style key files for packet-capture decode. The environment variable SSLKEYLOGFILE is used; if an absolute path it must indicate a file under the spool directory; if relative the the spool - directory is prepended. Works on the server side only. Support under + directory is prepended. Works on the server side only. Support under GnuTLS was already there, being done purely by the library (server side only, and exim must be run as root). diff --combined doc/doc-txt/OptionLists.txt index 8b2dee352,cfb3cd0f0..183f6b722 --- a/doc/doc-txt/OptionLists.txt +++ b/doc/doc-txt/OptionLists.txt @@@ -382,6 -382,7 +382,7 @@@ message_body_newlines bo message_body_visible integer 500 main message_id_header_domain string* unset main 4.11 message_id_header_text string* unset main + message_linelength_limit integer 998 smtp 4.94 message_logs boolean true main 4.10 message_prefix string* + appendfile 4.00 replaces prefix string* unset pipe 4.00 replaces prefix @@@ -443,6 -444,7 +444,7 @@@ qualify_recipient st qualify_single boolean true dnslookup 4.00 query string* + iplookup 4.00 queue_domains domain list unset main 4.00 + queue_fasst_ramp boolean false main 4.95 queue_list_requires_admin boolean true main 1.95 queue_only boolean false main queue_only_file string unset main 2.05 @@@ -553,10 -555,6 +555,10 @@@ smtp_reserve_hosts ho smtp_return_error_details boolean false main 4.11 socket string* unset lmtp 4.11 spamd_address string* + main 4.50 with content scan +spf_guess string "v=spf1 a/24 mx/24 ptr ?all" + main 4.91 with SUPPORT_SPF +spf_smtp_comment_template string* "Please see http://www.open-spf.org/Why" + main 4.94 with SUPPORT_SPF split_spool_directory boolean false main 1.70 spool_directory string ++ main spool_wireformat boolean false main 4.90 @@@ -606,6 -604,8 +608,8 @@@ tls_privatekey st tls_remember_emstp boolean false main 4.21 tls_require_ciphers string* unset smtp 4.00 replaces tls_verify_ciphers string* unset main 4.33 + tls_resumption_hosts host list* unset main 4.95 + host list* unset smtp 4.95 tls_sni string* unset main 4.80 tls_tempfail_tryclear boolean true smtp 4.05 tls_try_verify_hosts host list unset main 4.00 diff --combined src/src/EDITME index e568bdbb1,d7be01cd6..13dc49414 --- a/src/src/EDITME +++ b/src/src/EDITME @@@ -13,11 -13,12 +13,11 @@@ # Things that depend on the operating system have default settings in # OS/Makefile-Default, but these are overridden for some OS by files -# called called OS/Makefile-. You can further override these by -# creating files called Local/Makefile-, and -# Local/Makefile- (where "" stands for the name of -# your operating system - look at the names in the OS directory to see -# which names are recognized, and "" is derived from the -# environment variable "build") +# called OS/Makefile-. You can further override these settings by +# creating files Local/Makefile-, and Local/Makefile-. +# The suffix "" stands for the name of your operating system - look +# at the names in the OS directory to see which names are recognized, +# and "" is the content of the environment variable "build". # However, if you are building Exim for a single OS only, you don't need to # worry about setting up Local/Makefile-. Any build-time configuration @@@ -276,6 -277,9 +276,9 @@@ SPOOL_DIRECTORY=/var/spool/exi # specified in INCLUDE. + # Uncomment the following line to remove support for TLS Resumption + # DISABLE_TLS_RESUME=yes + ############################################################################### # THESE ARE THINGS YOU PROBABLY WANT TO SPECIFY # @@@ -411,6 -415,8 +414,8 @@@ LOOKUP_DNSDB=ye # LOOKUP_IBASE=yes # LOOKUP_JSON=yes # LOOKUP_LDAP=yes + # LOOKUP_LMDB=yes + # LOOKUP_MYSQL=yes # LOOKUP_MYSQL_PC=mariadb # LOOKUP_NIS=yes @@@ -487,7 -493,8 +492,8 @@@ SUPPORT_DANE=ye # You do not need to use this for any lookup information added via pkg-config. # LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include - # LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3 + # LOOKUP_INCLUDE +=-I /usr/local/include + # LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3 -llmdb #------------------------------------------------------------------------------ @@@ -560,7 -567,6 +566,6 @@@ DISABLE_MAL_MKS=ye # DISABLE_DNSSEC=yes # To disable support for Events set DISABLE_EVENT to "yes" - # DISABLE_EVENT=yes @@@ -569,6 -575,14 +574,14 @@@ # SUPPORT_PIPE_CONNECT=yes + # Uncomment the following to remove the fast-ramp two-phase-queue-run support + # DISABLE_QUEUE_RAMP=yes + + # Uncomment the following lines to add SRS (Sender Rewriting Scheme) support + # using only native facilities. See EXPERIMENTAL_SRS_ALT for an alternative. + # SUPPORT_SRS=yes + + #------------------------------------------------------------------------------ # Compiling Exim with experimental features. These are documented in # experimental-spec.txt. "Experimental" means that the way these features are @@@ -580,19 -594,16 +593,16 @@@ # EXPERIMENTAL_DCC=yes - # Uncomment the following lines to add SRS (Sender rewriting scheme) support. + # Uncomment the following lines to add SRS (Sender rewriting scheme) support + # using the implementation in linbsrs_alt. # You need to have libsrs_alt installed on your system (srs.mirtol.com). # Depending on where it is installed you may have to edit the CFLAGS and # LDFLAGS lines. - # EXPERIMENTAL_SRS=yes + # EXPERIMENTAL_SRS_ALT=yes # CFLAGS += -I/usr/local/include # LDFLAGS += -lsrs_alt - # Uncomment the following lines to add SRS (Sender rewriting scheme) support - # using only native facilities. - # EXPERIMENTAL_SRS_NATIVE=yes - # Uncomment the following line to add DMARC checking capability, implemented # using libopendmarc libraries. You must have SPF and DKIM support enabled also. # SUPPORT_DMARC=yes @@@ -618,22 -629,9 +628,9 @@@ # Uncomment the following to include extra information in fail DSN message (bounces) # EXPERIMENTAL_DSN_INFO=yes - # Uncomment the following to add LMDB lookup support - # You need to have LMDB installed on your system (https://github.com/LMDB/lmdb) - # Depending on where it is installed you may have to edit the CFLAGS and LDFLAGS lines. - # EXPERIMENTAL_LMDB=yes - # CFLAGS += -I/usr/local/include - # LDFLAGS += -llmdb - # Uncomment the following line to add queuefile transport support # EXPERIMENTAL_QUEUEFILE=yes - # Uncomment the following line to include support for TLS Resumption - # EXPERIMENTAL_TLS_RESUME=yes - - # Uncomment the following to include the fast-ramp two-phase-queue-run support - # EXPERIMENTAL_QUEUE_RAMP=yes - ############################################################################### # THESE ARE THINGS YOU MIGHT WANT TO SPECIFY # ############################################################################### diff --combined src/src/configure.default index 3423ee0af,733a37615..946137fc9 --- a/src/src/configure.default +++ b/src/src/configure.default @@@ -169,7 -169,16 +169,16 @@@ acl_smtp_data = acl_check_dat # tls_privatekey = /etc/ssl/exim.pem # For OpenSSL, prefer EC- over RSA-authenticated ciphers - # tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT + .ifdef _HAVE_OPENSSL + tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT + .endif + + # Don't offer resumption to (most) MUAs, who we don't want to reuse + # tickets. Once the TLS extension for vended ticket numbers comes + # though, re-examine since resumption on a single-use ticket is still a benefit. + .ifdef _HAVE_TLS_RESUME + tls_resumption_hosts = ${if inlist {$received_port}{587:465} {:}{*}} + .endif # In order to support roaming users who wish to send email from anywhere, # you may want to make Exim listen on other ports as well as port 25, in @@@ -507,8 -516,8 +516,8 @@@ acl_check_rcpt # examples of how you can get Exim to perform a DNS black list lookup at this # point. The first one denies, whereas the second just warns. # - # deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text - # dnslists = black.list.example + # deny dnslists = black.list.example + # message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text # # warn dnslists = black.list.example # add_header = X-Warning: $sender_host_address is in a black list at $dnslist_domain @@@ -578,9 -587,9 +587,9 @@@ acl_check_data # Deny if the message contains an overlong line. Per the standards # we should never receive one such via SMTP. # - deny message = maximum allowed line length is 998 octets, \ + deny condition = ${if > {$max_received_linelength}{998}} + message = maximum allowed line length is 998 octets, \ got $max_received_linelength - condition = ${if > {$max_received_linelength}{998}} # Deny if the headers contain badly-formed addresses. # @@@ -801,13 -810,15 +810,12 @@@ begin transport # This transport is used for delivering messages over SMTP connections. - # Refuse to send any message with over-long lines, which could have - # been received other than via SMTP. The use of message_size_limit to - # enforce this is a red herring. remote_smtp: driver = smtp - message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} + .ifdef _HAVE_TLS_RESUME + tls_resumption_hosts = * -#endif -.ifdef _HAVE_PRDR - hosts_try_prdr = * + .endif # This transport is used for delivering messages to a smarthost, if the @@@ -819,7 -830,6 +827,6 @@@ smarthost_smtp: driver = smtp - message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} multi_domain # .ifdef _HAVE_TLS @@@ -845,7 -855,13 +852,10 @@@ .ifdef _HAVE_GNUTLS tls_require_ciphers = SECURE192:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1 .endif + .ifdef _HAVE_TLS_RESUME + tls_resumption_hosts = * + .endif .endif -.ifdef _HAVE_PRDR - hosts_try_prdr = * -.endif # This transport is used for local delivery to user mailboxes in traditional diff --combined src/src/exim.c index a60488e95,4e7aae69a..2f4149f6f --- a/src/src/exim.c +++ b/src/src/exim.c @@@ -931,6 -931,9 +931,9 @@@ g = string_cat(NULL, US"Support for:") #ifdef USE_OPENSSL g = string_cat(g, US" OpenSSL"); #endif + #ifndef DISABLE_TLS_RESUME + g = string_cat(g, US" TLS_resume"); + #endif #ifdef SUPPORT_TRANSLATE_IP_ADDRESS g = string_cat(g, US" translate_ip_address"); #endif @@@ -946,6 -949,9 +949,9 @@@ #ifndef DISABLE_DKIM g = string_cat(g, US" DKIM"); #endif + #ifdef SUPPORT_DMARC + g = string_cat(g, US" DMARC"); + #endif #ifndef DISABLE_DNSSEC g = string_cat(g, US" DNSSEC"); #endif @@@ -967,14 -973,17 +973,17 @@@ #ifdef SUPPORT_PROXY g = string_cat(g, US" PROXY"); #endif + #ifndef DISABLE_QUEUE_RAMP + g = string_cat(g, US" Experimental_Queue_Ramp"); + #endif #ifdef SUPPORT_SOCKS g = string_cat(g, US" SOCKS"); #endif #ifdef SUPPORT_SPF g = string_cat(g, US" SPF"); #endif - #ifdef SUPPORT_DMARC - g = string_cat(g, US" DMARC"); + #if defined(SUPPORT_SRS) + g = string_cat(g, US" SRS"); #endif #ifdef TCP_FASTOPEN tcp_init(); @@@ -992,21 -1001,12 +1001,12 @@@ #ifdef EXPERIMENTAL_DSN_INFO g = string_cat(g, US" Experimental_DSN_info"); #endif - #ifdef EXPERIMENTAL_LMDB - g = string_cat(g, US" Experimental_LMDB"); - #endif - #ifdef EXPERIMENTAL_QUEUE_RAMP - g = string_cat(g, US" Experimental_Queue_Ramp"); - #endif #ifdef EXPERIMENTAL_QUEUEFILE g = string_cat(g, US" Experimental_QUEUEFILE"); #endif - #if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE) + #if defined(EXPERIMENTAL_SRS_ALT) g = string_cat(g, US" Experimental_SRS"); #endif - #ifdef EXPERIMENTAL_TLS_RESUME - g = string_cat(g, US" Experimental_TLS_resume"); - #endif g = string_cat(g, US"\n"); g = string_cat(g, US"Lookups (built-in):"); @@@ -1034,7 -1034,7 +1034,7 @@@ #if defined(LOOKUP_LDAP) && LOOKUP_LDAP!=2 g = string_cat(g, US" ldap ldapdn ldapm"); #endif - #ifdef EXPERIMENTAL_LMDB + #ifdef LOOKUP_LMDB g = string_cat(g, US" lmdb"); #endif #if defined(LOOKUP_MYSQL) && LOOKUP_MYSQL!=2 @@@ -1618,6 -1618,7 +1618,7 @@@ BOOL removed_privilege = FALSE BOOL usage_wanted = FALSE; BOOL verify_address_mode = FALSE; BOOL verify_as_sender = FALSE; + BOOL rcpt_verify_quota = FALSE; BOOL version_printed = FALSE; uschar *alias_arg = NULL; uschar *called_as = US""; @@@ -2790,6 -2791,13 +2791,13 @@@ on the second character (the one after else badarg = TRUE; break; + /* -MCq: do a quota check on the given recipient for the given size + of message. Separate from -MC. */ + case 'q': rcpt_verify_quota = TRUE; + if (++i < argc) message_size = Uatoi(argv[i]); + else badarg = TRUE; + break; + /* -MCS: set the smtp_use_size flag; this is useful only when it precedes -MC (see above) */ @@@ -3504,54 -3512,40 +3512,40 @@@ END_ARG if (usage_wanted) exim_usage(called_as); /* Arguments have been processed. Check for incompatibilities. */ - if (( - (smtp_input || extract_recipients || recipients_arg < argc) && - (f.daemon_listen || queue_interval >= 0 || bi_option || - test_retry_arg >= 0 || test_rewrite_arg >= 0 || - filter_test != FTEST_NONE || (msg_action_arg > 0 && !one_msg_action)) - ) || - ( - msg_action_arg > 0 && - (f.daemon_listen || queue_interval > 0 || list_options || - (checking && msg_action != MSG_LOAD) || - bi_option || test_retry_arg >= 0 || test_rewrite_arg >= 0) - ) || - ( - (f.daemon_listen || queue_interval > 0) && - (sender_address != NULL || list_options || list_queue || checking || - bi_option) - ) || - ( - f.daemon_listen && queue_interval == 0 - ) || - ( - f.inetd_wait_mode && queue_interval >= 0 - ) || - ( - list_options && - (checking || smtp_input || extract_recipients || - filter_test != FTEST_NONE || bi_option) - ) || - ( - verify_address_mode && - (f.address_test_mode || smtp_input || extract_recipients || - filter_test != FTEST_NONE || bi_option) - ) || - ( - f.address_test_mode && (smtp_input || extract_recipients || - filter_test != FTEST_NONE || bi_option) - ) || - ( - smtp_input && (sender_address != NULL || filter_test != FTEST_NONE || - extract_recipients) - ) || - ( - deliver_selectstring != NULL && queue_interval < 0 - ) || - ( - msg_action == MSG_LOAD && - (!expansion_test || expansion_test_message != NULL) - ) + if ( ( (smtp_input || extract_recipients || recipients_arg < argc) + && ( f.daemon_listen || queue_interval >= 0 || bi_option + || test_retry_arg >= 0 || test_rewrite_arg >= 0 + || filter_test != FTEST_NONE + || msg_action_arg > 0 && !one_msg_action + ) ) + || ( msg_action_arg > 0 + && ( f.daemon_listen || queue_interval > 0 || list_options + || checking && msg_action != MSG_LOAD + || bi_option || test_retry_arg >= 0 || test_rewrite_arg >= 0 + ) ) + || ( (f.daemon_listen || queue_interval > 0) + && ( sender_address || list_options || list_queue || checking + || bi_option + ) ) + || f.daemon_listen && queue_interval == 0 + || f.inetd_wait_mode && queue_interval >= 0 + || ( list_options + && ( checking || smtp_input || extract_recipients + || filter_test != FTEST_NONE || bi_option + ) ) + || ( verify_address_mode + && ( f.address_test_mode || smtp_input || extract_recipients + || filter_test != FTEST_NONE || bi_option + ) ) + || ( f.address_test_mode + && ( smtp_input || extract_recipients || filter_test != FTEST_NONE + || bi_option + ) ) + || ( smtp_input + && (sender_address || filter_test != FTEST_NONE || extract_recipients) + ) + || deliver_selectstring && queue_interval < 0 + || msg_action == MSG_LOAD && (!expansion_test || expansion_test_message) ) exim_fail("exim: incompatible command-line options or arguments\n"); @@@ -4172,7 -4166,7 +4166,7 @@@ if (!f.admin_user || queue_name_dest && prod_requires_admin || debugset && !f.running_in_test_harness ) - exim_fail("exim:%s permission denied\n", debugset? " debugging" : ""); + exim_fail("exim:%s permission denied\n", debugset ? " debugging" : ""); } /* If the real user is not root or the exim uid, the argument for passing @@@ -4181,11 -4175,13 +4175,13 @@@ running with the -N option for any deli one that supplied an input message, or we are using a patched exim for regression testing. */ - if (real_uid != root_uid && real_uid != exim_uid && - (continue_hostname != NULL || - (f.dont_deliver && - (queue_interval >= 0 || f.daemon_listen || msg_action_arg > 0) - )) && !f.running_in_test_harness) + if ( real_uid != root_uid && real_uid != exim_uid + && ( continue_hostname + || ( f.dont_deliver + && (queue_interval >= 0 || f.daemon_listen || msg_action_arg > 0) + ) ) + && !f.running_in_test_harness + ) exim_fail("exim: Permission denied\n"); /* If the caller is not trusted, certain arguments are ignored when running for @@@ -4207,9 -4203,9 +4203,9 @@@ Exim exits if the syntax is bad. * else { - if (sender_host_address != NULL) + if (sender_host_address) sender_host_port = check_port(sender_host_address); - if (interface_address != NULL) + if (interface_address) interface_port = check_port(interface_address); } @@@ -4296,18 -4292,20 +4292,20 @@@ retained only for starting the daemon. situation (controlled by the TRUE below), in order to be as close as possible to the state Exim usually runs in. */ - if (!unprivileged && /* originally had root AND */ - !removed_privilege && /* still got root AND */ - !f.daemon_listen && /* not starting the daemon */ - queue_interval <= 0 && /* (either kind of daemon) */ - ( /* AND EITHER */ - deliver_drop_privilege || /* requested unprivileged */ - ( /* OR */ - queue_interval < 0 && /* not running the queue */ - (msg_action_arg < 0 || /* and */ - msg_action != MSG_DELIVER) && /* not delivering and */ - (!checking || !f.address_test_mode) /* not address checking */ - ) ) ) + if ( !unprivileged /* originally had root AND */ + && !removed_privilege /* still got root AND */ + && !f.daemon_listen /* not starting the daemon */ + && queue_interval <= 0 /* (either kind of daemon) */ + && ( /* AND EITHER */ + deliver_drop_privilege /* requested unprivileged */ + || ( /* OR */ + queue_interval < 0 /* not running the queue */ + && ( msg_action_arg < 0 /* and */ + || msg_action != MSG_DELIVER /* not delivering */ + ) /* and */ + && (!checking || !f.address_test_mode) /* not address checking */ + && !rcpt_verify_quota /* and not quota checking */ + ) ) ) exim_setugid(exim_uid, exim_gid, TRUE, US"privilege not needed"); /* When we are retaining a privileged uid, we still change to the exim gid. */ @@@ -4326,10 -4324,8 +4324,10 @@@ els if (!(unprivileged || removed_privilege)) exim_fail("exim: changing group failed: %s\n", strerror(errno)); else + { DEBUG(D_any) debug_printf("changing group to %ld failed: %s\n", (long int)exim_gid, strerror(errno)); + } } /* Handle a request to scan a file for malware */ @@@ -4338,8 -4334,7 +4336,7 @@@ if (malware_test_file #ifdef WITH_CONTENT_SCAN int result; set_process_info("scanning file for malware"); - result = malware_in_file(malware_test_file); - if (result == FAIL) + if ((result = malware_in_file(malware_test_file)) == FAIL) { printf("No malware found.\n"); exit(EXIT_SUCCESS); @@@ -4428,6 -4423,18 +4425,18 @@@ needed in transports so we lost the opt #endif } + /* Handle a request to check quota */ + if (rcpt_verify_quota) + if (real_uid != root_uid && real_uid != exim_uid) + exim_fail("exim: Permission denied\n"); + else if (recipients_arg >= argc) + exim_fail("exim: missing recipient for quota check\n"); + else + { + verify_quota(argv[recipients_arg]); + exim_exit(EXIT_SUCCESS); + } + /* Handle the -brt option. This is for checking out retry configurations. The next three arguments are a domain name or a complete address, and optionally two error numbers. All it does is to call the function that @@@ -4862,8 -4869,8 +4871,8 @@@ if ( !smtp_input && !sender_addres sender, or if a sender other than <> is set, override with the originator's login (which will get qualified below), except when checking things. */ - if (sender_address == NULL /* No sender_address set */ - || /* OR */ + if ( !sender_address /* No sender_address set */ + || /* OR */ (sender_address[0] != 0 && /* Non-empty sender address, AND */ !checking)) /* Not running tests, including filter tests */ { @@@ -4914,7 -4921,6 +4923,6 @@@ if (verify_address_mode || f.address_te } if (recipients_arg < argc) - { while (recipients_arg < argc) { /* Supplied addresses are tainted since they come from a user */ @@@ -4930,7 -4936,6 +4938,6 @@@ while (*++s == ',' || isspace(*s)) ; } } - } else for (;;) { diff --combined src/src/expand.c index 26f7f10ac,732e20f97..b014533c9 --- a/src/src/expand.c +++ b/src/src/expand.c @@@ -131,7 -131,7 +131,7 @@@ static uschar *item_table[] = US"run", US"sg", US"sort", - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS US"srs_encode", #endif US"substr", @@@ -166,7 -166,7 +166,7 @@@ enum EITEM_RUN, EITEM_SG, EITEM_SORT, - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS EITEM_SRS_ENCODE, #endif EITEM_SUBSTR, @@@ -334,7 -334,7 +334,7 @@@ static uschar *cond_table[] = US"gei", US"gt", US"gti", - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS US"inbound_srs", #endif US"inlist", @@@ -387,7 -387,7 +387,7 @@@ enum ECOND_STR_GEI, ECOND_STR_GT, ECOND_STR_GTI, - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS ECOND_INBOUND_SRS, #endif ECOND_INLIST, @@@ -752,16 -752,16 +752,16 @@@ static var_entry var_table[] = { "spool_directory", vtype_stringptr, &spool_directory }, { "spool_inodes", vtype_pinodes, (void *)TRUE }, { "spool_space", vtype_pspace, (void *)TRUE }, - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT { "srs_db_address", vtype_stringptr, &srs_db_address }, { "srs_db_key", vtype_stringptr, &srs_db_key }, { "srs_orig_recipient", vtype_stringptr, &srs_orig_recipient }, { "srs_orig_sender", vtype_stringptr, &srs_orig_sender }, #endif - #if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE) + #if defined(EXPERIMENTAL_SRS_ALT) || defined(SUPPORT_SRS) { "srs_recipient", vtype_stringptr, &srs_recipient }, #endif - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT { "srs_status", vtype_stringptr, &srs_status }, #endif { "thisaddress", vtype_stringptr, &filter_thisaddress }, @@@ -779,7 -779,7 +779,7 @@@ { "tls_in_ourcert", vtype_cert, &tls_in.ourcert }, { "tls_in_peercert", vtype_cert, &tls_in.peercert }, { "tls_in_peerdn", vtype_stringptr, &tls_in.peerdn }, - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME { "tls_in_resumption", vtype_int, &tls_in.resumption }, #endif #ifndef DISABLE_TLS @@@ -797,7 -797,7 +797,7 @@@ { "tls_out_ourcert", vtype_cert, &tls_out.ourcert }, { "tls_out_peercert", vtype_cert, &tls_out.peercert }, { "tls_out_peerdn", vtype_stringptr, &tls_out.peerdn }, - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME { "tls_out_resumption", vtype_int, &tls_out.resumption }, #endif #ifndef DISABLE_TLS @@@ -2066,8 -2066,7 +2066,8 @@@ switch (vp->type case vtype_string_func: { stringptr_fn_t * fn = (stringptr_fn_t *) val; - return fn(); + uschar* s = fn(); + return s ? s : US""; } case vtype_pspace: @@@ -2439,7 -2438,7 +2439,7 @@@ els - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS /* Do an hmac_md5. The result is _not_ nul-terminated, and is sized as the smaller of a full hmac_md5 result (16 bytes) or the supplied output buffer. @@@ -2514,7 -2513,7 +2514,7 @@@ for (int i = 0, j = len; i < MD5_HASHLE } return; } - #endif /*EXPERIMENTAL_SRS_NATIVE*/ + #endif /*SUPPORT_SRS*/ /************************************************* @@@ -3444,7 -3443,7 +3444,7 @@@ switch(cond_type = identify_operator(&s return s; } - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS case ECOND_INBOUND_SRS: /* ${if inbound_srs {local_part}{secret} {yes}{no}} */ { @@@ -3536,7 -3535,7 +3536,7 @@@ srs_result if (yield) *yield = (boolvalue == testfor); return s; } - #endif /*EXPERIMENTAL_SRS_NATIVE*/ + #endif /*SUPPORT_SRS*/ /* Unknown condition */ @@@ -6187,12 -6186,11 +6187,12 @@@ while (*s != 0 case 2: case 3: goto EXPAND_FAILED; } - for (uschar sep = *sub[0], c; c = *sub[1]; sub[1]++) + if (*sub[1]) for (uschar sep = *sub[0], c; c = *sub[1]; sub[1]++) { if (c == sep) yield = string_catn(yield, sub[1], 1); yield = string_catn(yield, sub[1], 1); } + else yield = string_catn(yield, US" ", 1); continue; } @@@ -6785,7 -6783,7 +6785,7 @@@ continue; } - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS case EITEM_SRS_ENCODE: /* ${srs_encode {secret} {return_path} {orig_domain}} */ { @@@ -6839,7 -6837,7 +6839,7 @@@ yield = string_cat(yield, sub[2]); continue; } - #endif /*EXPERIMENTAL_SRS_NATIVE*/ + #endif /*SUPPORT_SRS*/ } /* EITEM_* switch */ /* Control reaches here if the name is not recognized as one of the more diff --combined src/src/globals.c index fc3086f72,1a4e3c8ed..1b2333053 --- a/src/src/globals.c +++ b/src/src/globals.c @@@ -137,7 -137,7 +137,7 @@@ uschar *tls_ocsp_file = NULL uschar *tls_privatekey = NULL; BOOL tls_remember_esmtp = FALSE; uschar *tls_require_ciphers = NULL; - # ifdef EXPERIMENTAL_TLS_RESUME + # ifndef DISABLE_TLS_RESUME uschar *tls_resumption_hosts = NULL; # endif uschar *tls_try_verify_hosts = NULL; @@@ -382,7 -382,7 +382,7 @@@ BOOL prod_requires_admin = TRUE BOOL proxy_session = FALSE; #endif - #ifdef EXPERIMENTAL_QUEUE_RAMP + #ifndef DISABLE_QUEUE_RAMP BOOL queue_fast_ramp = FALSE; #endif BOOL queue_list_requires_admin = TRUE; @@@ -407,7 -407,7 +407,7 @@@ BOOL spf_result_guessed = FALSE #endif BOOL split_spool_directory = FALSE; BOOL spool_wireformat = FALSE; - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT BOOL srs_usehash = TRUE; BOOL srs_usetimestamp = TRUE; #endif @@@ -596,7 -596,7 +596,7 @@@ address_item address_defaults = .extra_headers = NULL, .remove_headers = NULL, .variables = NULL, - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT .srs_sender = NULL, #endif .ignore_error = FALSE, @@@ -1499,16 -1499,12 +1499,16 @@@ uschar *spf_header_comment = NULL uschar *spf_received = NULL; uschar *spf_result = NULL; uschar *spf_smtp_comment = NULL; +uschar *spf_smtp_comment_template + /* Used to be: "Please%_see%_http://www.open-spf.org/Why?id=%{S}&ip=%{C}&receiver=%{R}" */ + = US"Please%_see%_http://www.open-spf.org/Why"; + #endif FILE *spool_data_file = NULL; uschar *spool_directory = US SPOOL_DIRECTORY "\0<--------------Space to patch spool_directory->"; - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT uschar *srs_config = NULL; uschar *srs_db_address = NULL; uschar *srs_db_key = NULL; @@@ -1521,7 -1517,7 +1521,7 @@@ uschar *srs_recipient = NULL uschar *srs_secrets = NULL; uschar *srs_status = NULL; #endif - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS uschar *srs_recipient = NULL; #endif int string_datestamp_offset= -1; diff --combined src/src/globals.h index c80c8532f,3dfbbc2b1..0c85c1150 --- a/src/src/globals.h +++ b/src/src/globals.h @@@ -92,7 -92,7 +92,7 @@@ typedef struct uschar *cipher; /* Cipher used */ const uschar *cipher_stdname; /* Cipher used, RFC version */ const uschar *ver; /* TLS version */ - + BOOL on_connect; /* For older MTAs that don't STARTTLS */ uschar *on_connect_ports; /* Ports always tls-on-connect */ void *ourcert; /* Certificate we presented, binary */ @@@ -107,7 -107,7 +107,7 @@@ OCSP_FAILED, /* verify failed */ OCSP_VFIED /* verified */ } ocsp; /* Stapled OCSP status */ - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME unsigned resumption; /* Session resumption */ BOOL host_resumable:1; BOOL ticket_received:1; @@@ -134,7 -134,7 +134,7 @@@ extern uschar *tls_ocsp_file; extern uschar *tls_privatekey; /* Private key file */ extern BOOL tls_remember_esmtp; /* For YAEB */ extern uschar *tls_require_ciphers; /* So some can be avoided */ - # ifdef EXPERIMENTAL_TLS_RESUME + # ifndef DISABLE_TLS_RESUME extern uschar *tls_resumption_hosts; /* TLS session resumption */ # endif extern uschar *tls_try_verify_hosts; /* Optional client verification */ @@@ -792,7 -792,7 +792,7 @@@ extern uschar *prvscheck_result; extern const uschar *qualify_domain_recipient; /* Domain to qualify recipients with */ extern uschar *qualify_domain_sender; /* Domain to qualify senders with */ extern uschar *queue_domains; /* Queue these domains */ - #ifdef EXPERIMENTAL_QUEUE_RAMP + #ifndef DISABLE_QUEUE_RAMP extern BOOL queue_fast_ramp; /* 2-phase queue-run overlap */ #endif extern BOOL queue_list_requires_admin; /* TRUE if -bp requires admin */ @@@ -943,6 -943,7 +943,7 @@@ extern int smtp_load_reserve; extern int smtp_mailcmd_count; /* Count of MAIL commands */ extern int smtp_max_synprot_errors;/* Max syntax/protocol errors */ extern int smtp_max_unknown_commands; /* As it says */ + extern uschar *smtp_names[]; /* decode for command codes */ extern uschar *smtp_notquit_reason; /* Global for disconnect reason */ extern FILE *smtp_out; /* Incoming SMTP output file */ extern uschar *smtp_ratelimit_hosts; /* Rate limit these hosts */ @@@ -982,14 -983,12 +983,14 @@@ extern uschar *spf_received; extern uschar *spf_result; /* spf result in string form */ extern BOOL spf_result_guessed; /* spf result is of best-guess operation */ extern uschar *spf_smtp_comment; /* spf comment to include in SMTP reply */ +extern uschar *spf_smtp_comment_template; + /* template to construct the spf comment by libspf2 */ #endif extern BOOL split_spool_directory; /* TRUE to use multiple subdirs */ extern FILE *spool_data_file; /* handle for -D file */ extern uschar *spool_directory; /* Name of spool directory */ extern BOOL spool_wireformat; /* can write wireformat -D files */ - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT extern uschar *srs_config; /* SRS config secret:max age:hash length:use timestamp:use hash */ extern uschar *srs_db_address; /* SRS db address */ extern uschar *srs_db_key; /* SRS db key */ @@@ -1004,7 -1003,7 +1005,7 @@@ extern uschar *srs_status; extern BOOL srs_usehash; /* SRS use hash flag */ extern BOOL srs_usetimestamp; /* SRS use timestamp flag */ #endif - #ifdef EXPERIMENTAL_SRS_NATIVE + #ifdef SUPPORT_SRS extern uschar *srs_recipient; /* SRS recipient */ #endif extern BOOL strict_acl_vars; /* ACL variables have to be set before being used */ diff --combined src/src/readconf.c index 0d0769c88,7b474f51d..a8f13350a --- a/src/src/readconf.c +++ b/src/src/readconf.c @@@ -262,7 -262,7 +262,7 @@@ static optionlist optionlist_config[] { "qualify_domain", opt_stringptr, {&qualify_domain_sender} }, { "qualify_recipient", opt_stringptr, {&qualify_domain_recipient} }, { "queue_domains", opt_stringptr, {&queue_domains} }, - #ifdef EXPERIMENTAL_QUEUE_RAMP + #ifndef DISABLE_QUEUE_RAMP { "queue_fast_ramp", opt_bool, {&queue_fast_ramp} }, #endif { "queue_list_requires_admin",opt_bool, {&queue_list_requires_admin} }, @@@ -326,7 -326,6 +326,7 @@@ #endif #ifdef SUPPORT_SPF { "spf_guess", opt_stringptr, {&spf_guess} }, + { "spf_smtp_comment_template",opt_stringptr, {&spf_smtp_comment_template} }, #endif { "split_spool_directory", opt_bool, {&split_spool_directory} }, { "spool_directory", opt_stringptr, {&spool_directory} }, @@@ -335,7 -334,7 +335,7 @@@ { "sqlite_dbfile", opt_stringptr, {&sqlite_dbfile} }, { "sqlite_lock_timeout", opt_int, {&sqlite_lock_timeout} }, #endif - #ifdef EXPERIMENTAL_SRS + #ifdef EXPERIMENTAL_SRS_ALT { "srs_config", opt_stringptr, {&srs_config} }, { "srs_hashlength", opt_int, {&srs_hashlength} }, { "srs_hashmin", opt_int, {&srs_hashmin} }, @@@ -379,7 -378,7 +379,7 @@@ { "tls_privatekey", opt_stringptr, {&tls_privatekey} }, { "tls_remember_esmtp", opt_bool, {&tls_remember_esmtp} }, { "tls_require_ciphers", opt_stringptr, {&tls_require_ciphers} }, - # ifdef EXPERIMENTAL_TLS_RESUME + # ifndef DISABLE_TLS_RESUME { "tls_resumption_hosts", opt_stringptr, {&tls_resumption_hosts} }, # endif { "tls_try_verify_hosts", opt_stringptr, {&tls_try_verify_hosts} }, diff --combined src/src/smtp_in.c index 526164c46,ce27c5f3e..8b0902b5d --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@@ -227,7 -227,7 +227,7 @@@ static smtp_cmd_list *cmd_list_end /* This list of names is used for performing the smtp_no_mail logging action. It must be kept in step with the SCH_xxx enumerations. */ - static uschar *smtp_names[] = + uschar * smtp_names[] = { US"NONE", US"AUTH", US"DATA", US"BDAT", US"EHLO", US"ETRN", US"EXPN", US"HELO", US"HELP", US"MAIL", US"NOOP", US"QUIT", US"RCPT", US"RSET", @@@ -1801,7 -1801,7 +1801,7 @@@ s_tlslog(gstring * g if (LOGGING(tls_cipher) && tls_in.cipher) { g = string_append(g, 2, US" X=", tls_in.cipher); - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME if (LOGGING(tls_resumption) && tls_in.resumption & RESUME_USED) g = string_catn(g, US"*", 1); #endif @@@ -1816,29 -1816,6 +1816,29 @@@ return g } #endif + + +static gstring * +s_connhad_log(gstring * g) +{ +uschar * sep = smtp_connection_had[SMTP_HBUFF_SIZE-1] != SCH_NONE + ? US" C=..." : US" C="; + +for (int i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++) + if (smtp_connection_had[i] != SCH_NONE) + { + g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); + sep = US","; + } +for (int i = 0; i < smtp_ch_index; i++) + { + g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); + sep = US","; + } +return g; +} + + /************************************************* * Log lack of MAIL if so configured * *************************************************/ @@@ -1854,7 -1831,7 +1854,7 @@@ Returns: nothin void smtp_log_no_mail(void) { -uschar * sep, * s; +uschar * s; gstring * g = NULL; if (smtp_mailcmd_count > 0 || !LOGGING(smtp_no_mail)) @@@ -1870,7 -1847,20 +1870,7 @@@ if (sender_host_authenticated g = s_tlslog(g); #endif -sep = smtp_connection_had[SMTP_HBUFF_SIZE-1] != SCH_NONE ? US" C=..." : US" C="; - -for (int i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++) - if (smtp_connection_had[i] != SCH_NONE) - { - g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); - sep = US","; - } - -for (int i = 0; i < smtp_ch_index; i++) - { - g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); - sep = US","; - } +g = s_connhad_log(g); if (!(s = string_from_gstring(g))) s = US""; @@@ -2068,6 -2058,7 +2068,7 @@@ sending_ip_address = NULL return_path = sender_address = NULL; deliver_localpart_data = deliver_domain_data = recipient_data = sender_data = NULL; /* Can be set by ACL */ + recipient_verify_failure = NULL; deliver_localpart_parent = deliver_localpart_orig = NULL; deliver_domain_parent = deliver_domain_orig = NULL; callout_address = NULL; @@@ -3112,17 -3103,15 +3113,17 @@@ synprot_error(int type, int code, uscha int yield = -1; log_write(type, LOG_MAIN, "SMTP %s error in \"%s\" %s %s", - (type == L_smtp_syntax_error)? "syntax" : "protocol", + type == L_smtp_syntax_error ? "syntax" : "protocol", string_printing(smtp_cmd_buffer), host_and_ident(TRUE), errmess); if (++synprot_error_count > smtp_max_synprot_errors) { yield = 1; log_write(0, LOG_MAIN|LOG_REJECT, "SMTP call from %s dropped: too many " - "syntax or protocol errors (last command was \"%s\")", - host_and_ident(FALSE), string_printing(smtp_cmd_buffer)); + "syntax or protocol errors (last command was \"%s\", %s)", + host_and_ident(FALSE), string_printing(smtp_cmd_buffer), + string_from_gstring(s_connhad_log(NULL)) + ); } if (code > 0) @@@ -4170,10 -4159,8 +4171,10 @@@ while (done <= 0 if (++synprot_error_count > smtp_max_synprot_errors) { log_write(0, LOG_MAIN|LOG_REJECT, "SMTP call from %s dropped: too many " - "syntax or protocol errors (last command was \"%s\")", - host_and_ident(FALSE), string_printing(smtp_cmd_buffer)); + "syntax or protocol errors (last command was \"%s\", %s)", + host_and_ident(FALSE), string_printing(smtp_cmd_buffer), + string_from_gstring(s_connhad_log(NULL)) + ); done = 1; } diff --combined src/src/tls-openssl.c index 8c9d8aa69,673768a56..a1d299b69 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@@ -116,7 -116,7 +116,7 @@@ change this guard and punt the issue fo # define DISABLE_OCSP #endif - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME # if OPENSSL_VERSION_NUMBER < 0x0101010L # error OpenSSL version too old for session-resumption # endif @@@ -292,7 -292,7 +292,7 @@@ for (struct exim_openssl_option * o = e builtin_macro_create(buf); } - # ifdef EXPERIMENTAL_TLS_RESUME + # ifndef DISABLE_TLS_RESUME builtin_macro_create_var(US"_RESUME_DECODE", RESUME_DECODE_STRING ); # endif # ifdef SSL_OP_NO_TLSv1_3 @@@ -422,7 -422,7 +422,7 @@@ static int tls_server_stapling_cb(SSL * /* Daemon-called, before every connection, key create/rotate */ - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME static void tk_init(void); static int tls_exdata_idx = -1; #endif @@@ -430,7 -430,7 +430,7 @@@ void tls_daemon_init(void) { - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME tk_init(); #endif return; @@@ -891,7 -891,7 +891,7 @@@ fclose(fp) #endif - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME /* Manage the keysets used for encrypting the session tickets, on the server. */ typedef struct { /* Session ticket encryption key */ @@@ -2176,12 -2176,12 +2176,12 @@@ availability of the option value macro if (!tls_openssl_options_parse(openssl_options, &init_options)) return tls_error(US"openssl_options parsing failed", host, NULL, errstr); - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME tlsp->resumption = RESUME_SUPPORTED; #endif if (init_options) { - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME /* Should the server offer session resumption? */ if (!host && verify_check_host(&tls_resumption_hosts) == OK) { @@@ -2685,12 -2685,12 +2685,12 @@@ else if (verify_check_host(&tls_try_ver server_verify_optional = TRUE; } - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME SSL_CTX_set_tlsext_ticket_key_cb(server_ctx, ticket_key_callback); /* despite working, appears to always return failure, so ignoring */ #endif #ifdef OPENSSL_HAVE_NUM_TICKETS - # ifdef EXPERIMENTAL_TLS_RESUME + # ifndef DISABLE_TLS_RESUME SSL_CTX_set_num_tickets(server_ctx, tls_in.host_resumable ? 1 : 0); # else SSL_CTX_set_num_tickets(server_ctx, 0); /* send no TLS1.3 stateful-tickets */ @@@ -2796,7 -2796,7 +2796,7 @@@ DEBUG(D_tls) debug_printf("SSL_accept w ERR_clear_error(); /* Even success can leave errors in the stack. Seen with anon-authentication ciphersuite negotiated. */ - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME if (SSL_session_reused(server_ssl)) { tls_in.resumption |= RESUME_USED; @@@ -2983,7 -2983,7 +2983,7 @@@ return DEFER - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME /* On the client, get any stashed session for the given IP from hints db and apply it to the ssl-connection for attempted resumption. */ @@@ -3145,7 -3145,7 +3145,7 @@@ if (SSL_session_reused(exim_client_ctx- tlsp->resumption |= RESUME_USED; } } - #endif /* EXPERIMENTAL_TLS_RESUME */ + #endif /* !DISABLE_TLS_RESUME */ /************************************************* @@@ -3294,7 -3294,7 +3294,7 @@@ els client_static_cbinfo, errstr) != OK) return FALSE; - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME tls_client_ctx_resume_prehandshake(exim_client_ctx, tlsp, ob, host); #endif @@@ -3365,7 -3365,7 +3365,7 @@@ if (request_ocsp } #endif - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME if (!tls_client_ssl_resume_prehandshake(exim_client_ctx->ssl, tlsp, host, errstr)) return FALSE; @@@ -3406,7 -3406,7 +3406,7 @@@ DEBUG(D_tls #endif } - #ifdef EXPERIMENTAL_TLS_RESUME + #ifndef DISABLE_TLS_RESUME tls_client_resume_posthandshake(exim_client_ctx, tlsp); #endif @@@ -3458,7 -3458,6 +3458,7 @@@ int inbytes DEBUG(D_tls) debug_printf("Calling SSL_read(%p, %p, %u)\n", server_ssl, ssl_xfer_buffer, ssl_xfer_buffer_size); +ERR_clear_error(); if (smtp_receive_timeout > 0) ALARM(smtp_receive_timeout); inbytes = SSL_read(server_ssl, CS ssl_xfer_buffer, MIN(ssl_xfer_buffer_size, lim)); @@@ -3608,7 -3607,6 +3608,7 @@@ int error DEBUG(D_tls) debug_printf("Calling SSL_read(%p, %p, %u)\n", ssl, buff, (unsigned int)len); +ERR_clear_error(); inbytes = SSL_read(ssl, CS buff, len); error = SSL_get_error(ssl, inbytes); @@@ -3698,7 -3696,6 +3698,7 @@@ if ((more || corked) for (int left = len; left > 0;) { DEBUG(D_tls) debug_printf("SSL_write(%p, %p, %d)\n", ssl, buff, left); + ERR_clear_error(); outbytes = SSL_write(ssl, CS buff, left); error = SSL_get_error(ssl, outbytes); DEBUG(D_tls) debug_printf("outbytes=%d error=%d\n", outbytes, error); diff --combined test/runtest index 05af33325,1e206f5d0..e4cf7ad6d --- a/test/runtest +++ b/test/runtest @@@ -916,7 -916,7 +916,7 @@@ RESET_AFTER_EXTRA_LINE_READ s/renamed tmp\/\d+\.[^.]+\.(\S+) as new\/\d+\.[^.]+\.(\S+)/renamed tmp\/MAILDIR.$1 as new\/MAILDIR.$1/; # Maildir file names in general - s/\b\d+\.H\d+P\d+\b/dddddddddd.HddddddPddddd/; + s/\b\d+\.M\d+P\d+\b/dddddddddd.HddddddPddddd/; # Maildirsize data while (/^\d+S,\d+C\s*$/) @@@ -1324,9 -1324,6 +1324,9 @@@ next if /^Waiting for MySQL server to answer/; next if /mysqladmin: CREATE DATABASE failed; .* database exists/; + # Postgres version-dependent differences + s/^initdb: warning: (enabling "trust" authentication for local connections)$/\nWARNING: $1/; + # Not all builds include DMARC next if /^DMARC: no (dmarc_tld_file|sender_host_address)$/ ; diff --combined test/stderr/2610 index 925fb914b,4cc8801f7..657f115e9 --- a/test/stderr/2610 +++ b/test/stderr/2610 @@@ -1,6 -1,3 +1,6 @@@ +### start a db server +### wait for db startup, set password on the root user +### create testdb and extra users Exim version x.yz .... configuration file is TESTSUITE/test-config admin user @@@ -14,6 -11,7 +14,7 @@@ dropping to exim gid; retaining priv ui database lookup required for select name from them where id='ph10'; MySQL query: "select name from them where id='ph10';" opts 'NULL' MYSQL new connection: host=127.0.0.1 port=1223 socket=NULL database=test user=root + creating new cache entry lookup yielded: Philip Hazel search_open: mysql "NULL" cached open @@@ -35,6 -33,7 +36,7 @@@ MySQL query: "select name from them where id='xxxx';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed search_open: mysql "NULL" cached open @@@ -46,6 -45,7 +48,7 @@@ database lookup required for select name from them where id='nothing'; MySQL query: "select name from them where id='nothing';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: search_open: mysql "NULL" cached open @@@ -57,6 -57,7 +60,7 @@@ database lookup required for select id,name from them where id='nothing'; MySQL query: "select id,name from them where id='nothing';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: id=nothing name="" search_open: mysql "NULL" cached open @@@ -82,6 -83,7 +86,7 @@@ MySQL query: "select * from them where id='quote';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed search_open: mysql "NULL" cached open @@@ -94,6 -96,7 +99,7 @@@ MySQL query: "select * from them where id='filter';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed search_open: mysql "NULL" cached open @@@ -105,6 -108,7 +111,7 @@@ database lookup required for select * from them where id='quote2'; MySQL query: "select * from them where id='quote2';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: name="\"stquot" id=quote2 search_open: mysql "NULL" cached open @@@ -117,6 -121,7 +124,7 @@@ MySQL query: "select * from them where id='nlonly';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed search_open: mysql "NULL" cached open @@@ -138,6 -143,7 +146,7 @@@ database lookup required for servers=127.0.0.1::1223:x; select name from them where id='ph10'; MySQL query: "servers=127.0.0.1::1223:x; select name from them where id='ph10';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: Philip Hazel search_open: mysql "NULL" cached open @@@ -149,6 -155,7 +158,7 @@@ database lookup required for servers=127.0.0.1::1223/test/root/:x; select name from them where id='ph10'; MySQL query: "servers=127.0.0.1::1223/test/root/:x; select name from them where id='ph10';" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: Philip Hazel search_open: mysql "NULL" cached open @@@ -160,17 -167,19 +170,19 @@@ database lookup required for servers=ip4.ip4.ip4.ip4::1223/test/root/:127.0.0.1::1223; select name from them where id='ph10'; MySQL query: "servers=ip4.ip4.ip4.ip4::1223/test/root/:127.0.0.1::1223; select name from them where id='ph10';" opts 'NULL' MYSQL new connection: host=ip4.ip4.ip4.ip4 port=1223 socket=NULL database=test user=root + creating new cache entry lookup yielded: Philip Hazel search_open: mysql "NULL" cached open search_find: file="NULL" - key="servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" partial=-1 affix=NULL starflags=0 opts=NULL + key="servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" partial=-1 affix=NULL starflags=0 opts=NULL LRU list: internal_search_find: file="NULL" - type=mysql key="servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" opts=NULL - database lookup required for servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10'; - MySQL query: "servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" opts 'NULL' + type=mysql key="servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" opts=NULL + database lookup required for servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10'; + MySQL query: "servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" opts 'NULL' MYSQL new connection: host=localhost port=0 socket=TESTSUITE/mysql/sock database=test user=root + creating new cache entry lookup yielded: Philip Hazel search_open: mysql "NULL" cached open @@@ -182,6 -191,7 +194,7 @@@ database lookup required for SELECT name FROM them WHERE id IN ('ph10', 'aaaa'); MySQL query: "SELECT name FROM them WHERE id IN ('ph10', 'aaaa');" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: Philip Hazel Aristotle search_open: mysql "NULL" @@@ -194,6 -204,7 +207,7 @@@ database lookup required for SELECT * FROM them WHERE id IN ('ph10', 'aaaa'); MySQL query: "SELECT * FROM them WHERE id IN ('ph10', 'aaaa');" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root + creating new cache entry lookup yielded: name="Philip Hazel" id=ph10 name=Aristotle id=aaaa search_open: mysql "NULL" @@@ -257,22 -268,24 +271,24 @@@ processing "warn" (TESTSUITE/test-confi MySQL query: "select name from them where id = 'c'" opts 'NULL' MYSQL new connection: host=127.0.0.1 port=1223 socket=NULL database=test user=root MYSQL: no data found + creating new cache entry lookup failed check set acl_m0 = ok: ${lookup mysql {select name from them where id = '$local_part'}} = ok: search_open: mysql "NULL" cached open search_find: file="NULL" - key="select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/" + key="select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/pass" LRU list: internal_search_find: file="NULL" - type=mysql key="select name from them where id = 'c'" opts="servers=127.0.0.1::1223/test/root/" + type=mysql key="select name from them where id = 'c'" opts="servers=127.0.0.1::1223/test/root/pass" cached data found but wrong opts; database lookup required for select name from them where id = 'c' - MySQL query: "select name from them where id = 'c'" opts 'servers=127.0.0.1::1223/test/root/' + MySQL query: "select name from them where id = 'c'" opts 'servers=127.0.0.1::1223/test/root/pass' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + replacing old cache entry lookup failed -check set acl_m0 = ok: ${lookup mysql,servers=127.0.0.1::1223/test/root/ {select name from them where id = '$local_part'}} +check set acl_m0 = ok: ${lookup mysql,servers=127.0.0.1::1223/test/root/pass {select name from them where id = '$local_part'}} = ok: search_open: mysql "NULL" cached open @@@ -285,22 -298,23 +301,23 @@@ MySQL query: "select name from them where id = 'c'" opts 'servers=127.0.0.1::1223' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + replacing old cache entry lookup failed check set acl_m0 = ok: ${lookup mysql,servers=127.0.0.1::1223 {select name from them where id = '$local_part'}} = ok: search_open: mysql "NULL" cached open search_find: file="NULL" - key="servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts=NULL + key="servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts=NULL LRU list: internal_search_find: file="NULL" - type=mysql key="servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" opts=NULL - database lookup required for servers=127.0.0.1::1223/test/root/; select name from them where id = 'c' - MySQL query: "servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" opts 'NULL' - lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted + type=mysql key="servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" opts=NULL + database lookup required for servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c' + MySQL query: "servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" opts 'NULL' + lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted warn: condition test deferred in ACL "check_recipient" LOG: MAIN - H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted + H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted processing "warn" (TESTSUITE/test-config 36) check set acl_m0 = ok: hostlist check hosts = net-mysql;select * from them where id='$local_part' @@@ -315,43 -329,44 +332,44 @@@ database lookup required for select * f MySQL query: "select * from them where id='c'" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed host in "net-mysql;select * from them where id='c'"? no (end of list) warn: condition test failed in ACL "check_recipient" processing "warn" (TESTSUITE/test-config 39) check set acl_m0 = FAIL: hostlist -check hosts = <& net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='$local_part' +check hosts = <& net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='$local_part' search_open: mysql "NULL" cached open search_find: file="NULL" - key="servers=127.0.0.1::1223/test/root/; select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts=NULL + key="servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts=NULL LRU list: internal_search_find: file="NULL" - type=mysql key="servers=127.0.0.1::1223/test/root/; select * from them where id='c'" opts=NULL -database lookup required for servers=127.0.0.1::1223/test/root/; select * from them where id='c' -MySQL query: "servers=127.0.0.1::1223/test/root/; select * from them where id='c'" opts 'NULL' -lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted -host in "<& net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='c'"? list match deferred for net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='c' + type=mysql key="servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" opts=NULL +database lookup required for servers=127.0.0.1::1223/test/root/pass; select * from them where id='c' +MySQL query: "servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" opts 'NULL' +lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted +host in "<& net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'"? list match deferred for net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='c' warn: condition test deferred in ACL "check_recipient" LOG: MAIN - H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted + H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted processing "warn" (TESTSUITE/test-config 44) check set acl_m0 = FAIL: hostlist -check hosts = <& net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='$local_part' +check hosts = <& net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='$local_part' search_open: mysql "NULL" cached open search_find: file="NULL" - key=" select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/" + key=" select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/pass" LRU list: internal_search_find: file="NULL" - type=mysql key=" select * from them where id='c'" opts="servers=127.0.0.1::1223/test/root/" + type=mysql key=" select * from them where id='c'" opts="servers=127.0.0.1::1223/test/root/pass" database lookup required for select * from them where id='c' -MySQL query: " select * from them where id='c'" opts 'servers=127.0.0.1::1223/test/root/' -lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted -host in "<& net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='c'"? list match deferred for net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='c' +MySQL query: " select * from them where id='c'" opts 'servers=127.0.0.1::1223/test/root/pass' +lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted +host in "<& net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'"? list match deferred for net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='c' warn: condition test deferred in ACL "check_recipient" LOG: MAIN - H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted + H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted processing "accept" (TESTSUITE/test-config 47) check domains = +local_domains d in "@"? no (end of list) @@@ -370,6 -385,7 +388,7 @@@ database lookup required for select * f MySQL query: "select * from them where id='10.0.0.0'" opts 'NULL' MYSQL using cached connection for 127.0.0.1:1223/test/root MYSQL: no data found + creating new cache entry lookup failed host in "net-mysql;select * from them where id='10.0.0.0'"? no (end of list) host in "+relay_hosts"? no (end of list) @@@ -483,6 -499,7 +502,7 @@@ processing address_dat database lookup required for select name from them where id='ph10' MySQL query: "select name from them where id='ph10'" opts 'NULL' MYSQL new connection: host=127.0.0.1 port=1223 socket=NULL database=test user=root + creating new cache entry lookup yielded: Philip Hazel calling r1 router r1 router called for ph10@myhost.test.ex @@@ -527,6 -544,7 +547,7 @@@ appendfile transport entere database lookup required for select id from them where id='ph10' MySQL query: "select id from them where id='ph10'" opts 'NULL' MYSQL new connection: host=127.0.0.1 port=1223 socket=NULL database=test user=root + creating new cache entry lookup yielded: ph10 appendfile: mode=600 notify_comsat=0 quota=0 warning=0 file=TESTSUITE/test-mail/ph10 format=unix