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=f7302073a0de0db3750659a0f27b869ea45a0e4e Merge branch 'fakereject' --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index d08a7a040..7bd5b7f9d 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -35408,6 +35408,7 @@ picked out by the distinctive two-character flags that immediately follow the timestamp. The flags are: .display &`<=`& message arrival +&`(=`& message fakereject &`=>`& normal message delivery &`->`& additional address in same delivery &`>>`& cutthrough message delivery diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index d99370a7e..11b25f875 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -65,6 +65,9 @@ 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 --git a/src/src/receive.c b/src/src/receive.c index 6c214152a..32154792e 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -3748,9 +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 +3761,7 @@ if (LOGGING(tls_cipher) && tls_in.cipher) 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 +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 +3812,7 @@ any characters except " \ and CR and so in particular it can contain NL! 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; @@ -4074,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 +4130,8 @@ if (smtp_input) 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 +4140,7 @@ file has already been unlinked, and the header file was never written to disk. 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) diff --git a/test/log/0555 b/test/log/0555 index e223bd466..29d71cd21 100644 --- a/test/log/0555 +++ b/test/log/0555 @@ -1,2 +1,2 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 (= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss diff --git a/test/log/4010 b/test/log/4010 index 1ab5847e6..c1176fee6 100644 --- a/test/log/4010 +++ b/test/log/4010 @@ -1,6 +1,6 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex 1999-03-02 09:44:33 10HmaX-0005vi-00 => userx R=r1 T=t1 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex +1999-03-02 09:44:33 10HmaY-0005vi-00 (= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss id=41C2F849.3060203@projectile.test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 => userx R=r1 T=t1 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/scripts/0000-Basic/0555 b/test/scripts/0000-Basic/0555 index 947f1692d..c35113603 100644 --- a/test/scripts/0000-Basic/0555 +++ b/test/scripts/0000-Basic/0555 @@ -1,4 +1,4 @@ -# Long lines for fakedefer/fakereject +# Long response lines for fakedefer/fakereject exim -bs mail from:<> rcpt to: