From: Jeremy Harris Date: Thu, 4 Aug 2016 14:26:05 +0000 (+0100) Subject: Merge branch 'fakereject' X-Git-Tag: exim-4_88_RC1~55 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/803628d5b0b175dfa78f0b19b35213ace01207b1?hp=-c Merge branch 'fakereject' --- 803628d5b0b175dfa78f0b19b35213ace01207b1 diff --combined doc/doc-docbook/spec.xfpt index d08a7a040,152bcb238..7bd5b7f9d --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@@ -10090,21 -10090,6 +10090,21 @@@ Last:user@example.co user@example.com .endd +.new +.vitem &*${base32:*&<&'digits'&>&*}*& +.cindex "&%base32%& expansion item" +.cindex "expansion" "conversion to base 32" +The string must consist entirely of decimal digits. The number is converted to +base 32 and output as a (empty, for zero) string of characters. +Only lowercase letters are used. + +.vitem &*${base32d:*&<&'base-32&~digits'&>&*}*& +.cindex "&%base32d%& expansion item" +.cindex "expansion" "conversion to base 32" +The string must consist entirely of base-32 digits. +The number is converted to decimal and output as a string. +.wen + .vitem &*${base62:*&<&'digits'&>&*}*& .cindex "&%base62%& expansion item" .cindex "expansion" "conversion to base 62" @@@ -19888,17 -19873,12 +19888,17 @@@ list1: :include:/opt/lists/list .endd .next .cindex "address redirection" "to black hole" -Sometimes you want to throw away mail to a particular local part. Making the -&%data%& option expand to an empty string does not work, because that causes -the router to decline. Instead, the alias item +.cindex "delivery" "discard" +.cindex "delivery" "blackhole" .cindex "black hole" .cindex "abandoning mail" -&':blackhole:'& can be used. It does what its name implies. No delivery is +Sometimes you want to throw away mail to a particular local part. Making the +&%data%& option expand to an empty string does not work, because that causes +the router to decline. Instead, the alias item +.code +:blackhole: +.endd +can be used. It does what its name implies. No delivery is done, and no error message is generated. This has the same effect as specifying &_/dev/null_& as a destination, but it can be independently disabled. @@@ -31544,7 -31524,7 +31544,7 @@@ condition defers Unix and TCP socket specifications may be mixed in any order. Each element of the list is a list itself, space-separated by default -and changeable in the usual way. +and changeable in the usual way; take care to not double the separator. For TCP socket specifications a host name or IP (v4 or v6, but subject to list-separator quoting rules) address can be used, @@@ -35408,6 -35388,7 +35408,7 @@@ picked out by the distinctive two-chara timestamp. The flags are: .display &`<=`& message arrival + &`(=`& message fakereject &`=>`& normal message delivery &`->`& additional address in same delivery &`>>`& cutthrough message delivery @@@ -38078,7 -38059,7 +38079,7 @@@ senders) .section "Signing outgoing messages" "SECDKIMSIGN" .cindex "DKIM" "signing" -Signing is implemented by setting private options on the SMTP transport. +Signing is enabled by setting private options on the SMTP transport. These options take (expandable) strings as arguments. .option dkim_domain smtp string&!! unset @@@ -38135,7 -38116,7 +38136,7 @@@ used .section "Verifying DKIM signatures in incoming mail" "SECID514" .cindex "DKIM" "verification" -Verification of DKIM signatures in incoming email is implemented via the +Verification of DKIM signatures in SMTP incoming email is implemented via the &%acl_smtp_dkim%& ACL. By default, this ACL is called once for each syntactically(!) correct signature in the incoming message. A missing ACL definition defaults to accept. diff --combined doc/doc-txt/ChangeLog index d99370a7e,454d34311..11b25f875 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@@ -55,16 -55,9 +55,19 @@@ JH/13 Cutthrough: expand transport dkim empty is permissible (obviously it should depend only on data available when the cutthrough connection is made). -JH/14 Fakereject: previously logged as a norml message arrival "<="; now +JH/14 Fix logging of errors under PIPELINING. Previously the log line giving + the relevant preceding SMTP command did not note the pipelining mode. + +JH/15 Fix counting of empty lines in $body_linecount and $message_linecount. + Previously they were not counted. + +JH/16 DANE: treat a TLSA lookup response having all non-TLSA RRs, the same + as one having no matching records. Previously we deferred the message + that needed the lookup. + ++JH/17 Fakereject: previously logged as a norml message arrival "<="; now + distinguished as "(=". + Exim version 4.87 ----------------- diff --combined src/src/receive.c index 6c214152a,d17cf9b83..32154792e --- a/src/src/receive.c +++ b/src/src/receive.c @@@ -682,8 -682,7 +682,8 @@@ while ((ch = (receive_getc)()) != EOF case 1: /* After written "\n" */ if (ch == '.') { ch_state = 3; continue; } if (ch == '\r') { ch_state = 2; continue; } - if (ch != '\n') ch_state = 0; else linelength = -1; + if (ch == '\n') { body_linecount++; linelength = -1; } + else ch_state = 0; break; case 2: @@@ -3748,9 -3747,10 +3748,10 @@@ size = 256 sptr = 0; s = store_get(size); - s = string_append(s, &size, &sptr, 2, US"<= ", - (sender_address[0] == 0)? US"<>" : sender_address); - if (message_reference != NULL) + s = string_append(s, &size, &sptr, 2, + fake_response == FAIL ? US"(= " : US"<= ", + sender_address[0] == 0 ? US"<>" : sender_address); + if (message_reference) s = string_append(s, &size, &sptr, 2, US" R=", message_reference); s = add_host_info_for_log(s, &size, &sptr); @@@ -3760,7 -3760,7 +3761,7 @@@ if (LOGGING(tls_cipher) && tls_in.ciphe s = string_append(s, &size, &sptr, 2, US" X=", tls_in.cipher); if (LOGGING(tls_certificate_verified) && tls_in.cipher) s = string_append(s, &size, &sptr, 2, US" CV=", - tls_in.certificate_verified? "yes":"no"); + tls_in.certificate_verified ? "yes":"no"); if (LOGGING(tls_peerdn) && tls_in.peerdn) s = string_append(s, &size, &sptr, 3, US" DN=\"", string_printing(tls_in.peerdn), US"\""); @@@ -3772,10 -3772,10 +3773,10 @@@ if (LOGGING(tls_sni) && tls_in.sni if (sender_host_authenticated) { s = string_append(s, &size, &sptr, 2, US" A=", sender_host_authenticated); - if (authenticated_id != NULL) + if (authenticated_id) { s = string_append(s, &size, &sptr, 2, US":", authenticated_id); - if (LOGGING(smtp_mailauth) && authenticated_sender != NULL) + if (LOGGING(smtp_mailauth) && authenticated_sender) s = string_append(s, &size, &sptr, 2, US":", authenticated_sender); } } @@@ -3811,7 -3811,7 +3812,7 @@@ any characters except " \ and CR and s Therefore, make sure we use a printing-characters only version for the log. Also, allow for domain literals in the message id. */ - if (msgid_header != NULL) + if (msgid_header) { uschar *old_id; BOOL save_allow_domain_literals = allow_domain_literals; @@@ -3894,9 -3894,7 +3895,9 @@@ if (message_logs && blackholed_by == NU if (deliver_freeze) fprintf(message_log, "%s frozen by %s\n", now, frozen_by); if (queue_only_policy) fprintf(message_log, - "%s no immediate delivery: queued by %s\n", now, queued_by); + "%s no immediate delivery: queued%s%s by %s\n", now, + *queue_name ? " in " : "", *queue_name ? CS queue_name : "", + queued_by); (void)fclose(message_log); } } @@@ -4016,9 -4014,7 +4017,9 @@@ if(!smtp_reply if (deliver_freeze) log_write(0, LOG_MAIN, "frozen by %s", frozen_by); if (queue_only_policy) log_write(L_delay_delivery, LOG_MAIN, - "no immediate delivery: queued by %s", queued_by); + "no immediate delivery: queued%s%s by %s", + *queue_name ? " in " : "", *queue_name ? CS queue_name : "", + queued_by); } receive_call_bombout = FALSE; @@@ -4074,15 -4070,15 +4075,15 @@@ if (smtp_input if (!smtp_batched_input) { - if (smtp_reply == NULL) + if (!smtp_reply) { if (fake_response != OK) - smtp_respond((fake_response == DEFER)? US"450" : US"550", 3, TRUE, - fake_response_text); + smtp_respond(fake_response == DEFER ? US"450" : US"550", + 3, TRUE, fake_response_text); /* An OK response is required; use "message" text if present. */ - else if (user_msg != NULL) + else if (user_msg) { uschar *code = US"250"; int len = 3; @@@ -4129,7 -4125,8 +4130,8 @@@ nothing on success. The function moan_smtp_batch() does not return - it exits from the program with a non-zero return code. */ - else if (smtp_reply != NULL) moan_smtp_batch(NULL, "%s", smtp_reply); + else if (smtp_reply) + moan_smtp_batch(NULL, "%s", smtp_reply); } @@@ -4138,7 -4135,7 +4140,7 @@@ file has already been unlinked, and th We must now indicate that nothing was received, to prevent a delivery from starting. */ - if (blackholed_by != NULL) + if (blackholed_by) { const uschar *detail = local_scan_data ? string_printing(local_scan_data)