From 3f63e46192d8d9ad72e9b25602615042bcc404f6 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 25 May 2019 15:48:11 +0100 Subject: [PATCH] Callouts: simplfy logging --- src/src/transports/smtp.c | 3 +-- test/log/0227 | 2 +- test/log/0365 | 8 ++++---- test/log/0376 | 2 +- test/log/0473 | 2 +- test/log/0578 | 2 +- test/rejectlog/0227 | 2 +- test/rejectlog/0365 | 8 ++++---- test/rejectlog/0376 | 2 +- test/rejectlog/0473 | 2 +- test/rejectlog/0578 | 2 +- test/stderr/0227 | 2 +- test/stderr/0376 | 2 +- test/stderr/0578 | 2 +- test/stdout/0365 | 2 +- 15 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 5f6108219..606c646fb 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -2133,8 +2133,7 @@ if (!continue_hostname) } set_errno_nohost(sx->addrlist, errno == ETIMEDOUT ? ERRNO_CONNECTTIMEOUT : errno, - sx->verify ? string_sprintf("could not connect: %s", msg) - : NULL, + sx->verify ? msg : NULL, DEFER, FALSE); sx->send_quit = FALSE; return DEFER; diff --git a/test/log/0227 b/test/log/0227 index d91075fb6..eeabf702c 100644 --- a/test/log/0227 +++ b/test/log/0227 @@ -20,5 +20,5 @@ 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/log/0365 b/test/log/0365 index 14e9903e6..2aec8a2c8 100644 --- a/test/log/0365 +++ b/test/log/0365 @@ -1,18 +1,18 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbA-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/log/0376 b/test/log/0376 index 8c98166da..69e8326de 100644 --- a/test/log/0376 +++ b/test/log/0376 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/log/0473 b/test/log/0473 index acca9c9ed..c0940ad0a 100644 --- a/test/log/0473 +++ b/test/log/0473 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:" was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure 1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO diff --git a/test/log/0578 b/test/log/0578 index 13ae40cfc..faa062ecb 100644 --- a/test/log/0578 +++ b/test/log/0578 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED rcpt 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/rejectlog/0227 b/test/rejectlog/0227 index e44ddafbc..da5adfc84 100644 --- a/test/rejectlog/0227 +++ b/test/rejectlog/0227 @@ -36,5 +36,5 @@ F From: abcd@x.y.z 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/rejectlog/0365 b/test/rejectlog/0365 index f6953da47..cd6586cdb 100644 --- a/test/rejectlog/0365 +++ b/test/rejectlog/0365 @@ -16,7 +16,7 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: bad@domain I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA Envelope-from: @@ -37,15 +37,15 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/rejectlog/0376 b/test/rejectlog/0376 index 1702cec04..17d806f76 100644 --- a/test/rejectlog/0376 +++ b/test/rejectlog/0376 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/rejectlog/0473 b/test/rejectlog/0473 index acca9c9ed..c0940ad0a 100644 --- a/test/rejectlog/0473 +++ b/test/rejectlog/0473 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:" was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure 1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO diff --git a/test/rejectlog/0578 b/test/rejectlog/0578 index bf20a240d..f6efe3ba3 100644 --- a/test/rejectlog/0578 +++ b/test/rejectlog/0578 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED rcpt 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/stderr/0227 b/test/stderr/0227 index e3282cc6f..e1f008976 100644 --- a/test/stderr/0227 +++ b/test/stderr/0227 @@ -328,7 +328,7 @@ LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0376 b/test/stderr/0376 index 1881c80c2..5ffa0dbfb 100644 --- a/test/stderr/0376 +++ b/test/stderr/0376 @@ -63,7 +63,7 @@ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused connect: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/stderr/0578 b/test/stderr/0578 index 3a79beb9e..3a205d422 100644 --- a/test/stderr/0578 +++ b/test/stderr/0578 @@ -65,7 +65,7 @@ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused connect: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/stdout/0365 b/test/stdout/0365 index cdceac47e..17a50d08c 100644 --- a/test/stdout/0365 +++ b/test/stdout/0365 @@ -40,7 +40,7 @@ 550-Rejected after DATA: could not verify "From:" header address 550 bad@domain: Unrouteable address 250 OK -451-Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error +451-Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : Network Error 451-Could not complete sender verify callout for . 451-The mail server(s) for the domain may be temporarily unreachable, or 451-they may be permanently unreachable from this server. In the latter case, -- 2.25.1