[exim-cvs] Callouts: simplfy logging

Inizio della pagina
Delete this message
Reply to this message
Autore: Exim Git Commits Mailing List
Data:  
To: exim-cvs
Oggetto: [exim-cvs] Callouts: simplfy logging
Gitweb: https://git.exim.org/exim.git/commitdiff/3f63e46192d8d9ad72e9b25602615042bcc404f6
Commit:     3f63e46192d8d9ad72e9b25602615042bcc404f6
Parent:     84539f739b81c6b90ffdbfbdff090100470fe71b
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat May 25 15:48:11 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat May 25 16:34:35 2019 +0100


    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 5f61082..606c646 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 d91075f..eeabf70 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=<uncheckable@localhost1> rejected RCPT <z@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@???>: 550 Recipient not liked
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
-1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
diff --git a/test/log/0365 b/test/log/0365
index 14e9903..2aec8a2 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: <bad@syntax
 1999-03-02 09:44:33 10HmaY-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout
 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message
 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: 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: <bad@syntax
 1999-03-02 09:44:33 10HmbC-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout
 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message
 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: defer message
diff --git a/test/log/0376 b/test/log/0376
index 8c98166..69e8326 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@???>: (recipient): Sender verify failed
diff --git a/test/log/0473 b/test/log/0473
index acca9c9..c0940ad 100644
--- a/test/log/0473
+++ b/test/log/0473
@@ -1,5 +1,5 @@
 1999-03-02 09:44:33 U=CALLER F=<s3@???> rejected RCPT r3@???: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<s3@???>" was: 550 NOTOK
-1999-03-02 09:44:33 U=CALLER F=<s4@???> temporarily rejected RCPT r4@???: 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=<s4@???> temporarily rejected RCPT r4@???: 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=<x9@???> rejected RCPT <r9@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r9@???>: 550 NO
 1999-03-02 09:44:33 U=CALLER F=<x9@???> rejected RCPT <r9@???>: Previous (cached) callout verification failure
 1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<x9@???>: 550 NO
diff --git a/test/log/0578 b/test/log/0578
index 13ae40c..faa062e 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED rcpt
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@???>: (recipient): Sender verify failed
diff --git a/test/rejectlog/0227 b/test/rejectlog/0227
index e44ddaf..da5adfc 100644
--- a/test/rejectlog/0227
+++ b/test/rejectlog/0227
@@ -36,5 +36,5 @@ F From: abcd@???
 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@???>: 550 Recipient not liked
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
-1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
diff --git a/test/rejectlog/0365 b/test/rejectlog/0365
index f6953da..cd6586c 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: <E10HmaY-0005vi-00@???>
   Date: Tue, 2 Mar 1999 09:44:33 +0000
-1999-03-02 09:44:33 U=CALLER sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout
 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F=<nosyntax@x> rejected after DATA
 Envelope-from: <nosyntax@x>
@@ -37,15 +37,15 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz)
 F From: <unverifiable@y>
 I Message-Id: <E10HmbA-0005vi-00@???>
   Date: Tue, 2 Mar 1999 09:44:33 +0000
-1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message
 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: 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: <bad@syntax
 1999-03-02 09:44:33 10HmbC-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout
 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message
 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: defer message
diff --git a/test/rejectlog/0376 b/test/rejectlog/0376
index 1702cec..17d806f 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@???>: (recipient): Sender verify failed
diff --git a/test/rejectlog/0473 b/test/rejectlog/0473
index acca9c9..c0940ad 100644
--- a/test/rejectlog/0473
+++ b/test/rejectlog/0473
@@ -1,5 +1,5 @@
 1999-03-02 09:44:33 U=CALLER F=<s3@???> rejected RCPT r3@???: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<s3@???>" was: 550 NOTOK
-1999-03-02 09:44:33 U=CALLER F=<s4@???> temporarily rejected RCPT r4@???: 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=<s4@???> temporarily rejected RCPT r4@???: 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=<x9@???> rejected RCPT <r9@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r9@???>: 550 NO
 1999-03-02 09:44:33 U=CALLER F=<x9@???> rejected RCPT <r9@???>: Previous (cached) callout verification failure
 1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@???>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<x9@???>: 550 NO
diff --git a/test/rejectlog/0578 b/test/rejectlog/0578
index bf20a24..f6efe3b 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED rcpt
 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@???>: (recipient): Sender verify failed
diff --git a/test/stderr/0227 b/test/stderr/0227
index e3282cc..e1f0089 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 <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
 LOG: smtp_connection MAIN
diff --git a/test/stderr/0376 b/test/stderr/0376
index 1881c80..5ffa0db 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
diff --git a/test/stderr/0578 b/test/stderr/0578
index 3a79beb..3a205d4 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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@???>: Could not complete sender verify callout
diff --git a/test/stdout/0365 b/test/stdout/0365
index cdceac4..17a50d0 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 <callout@x>.
 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,