From 6f4d5ad3a1613f7d4502bb81eb3f4e875a71b0c9 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 15 May 2015 11:01:31 +0100 Subject: [PATCH] Callout: additional debug on cache operations --- src/src/verify.c | 6 +-- test/stderr/0376 | 104 +++++++++++++++++++++++------------------------ test/stderr/0398 | 8 ++-- test/stderr/0432 | 20 ++++----- test/stderr/0443 | 4 +- test/stderr/0462 | 16 ++++---- test/stderr/0473 | 8 ++-- test/stderr/5840 | 4 +- 8 files changed, 85 insertions(+), 85 deletions(-) diff --git a/src/src/verify.c b/src/src/verify.c index 8a408686f..93ab9112d 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -70,7 +70,7 @@ cache_record = dbfn_read_with_length(dbm_file, key, &length); if (cache_record == NULL) { - HDEBUG(D_verify) debug_printf("callout cache: no %s record found\n", type); + HDEBUG(D_verify) debug_printf("callout cache: no %s record found for %s\n", type, key); return NULL; } @@ -84,7 +84,7 @@ now = time(NULL); if (now - cache_record->time_stamp > expire) { - HDEBUG(D_verify) debug_printf("callout cache: %s record expired\n", type); + HDEBUG(D_verify) debug_printf("callout cache: %s record expired for %s\n", type, key); return NULL; } @@ -111,7 +111,7 @@ if (type[0] == 'd' && cache_record->result != ccache_reject) cache_record->random_result = ccache_unknown; } -HDEBUG(D_verify) debug_printf("callout cache: found %s record\n", type); +HDEBUG(D_verify) debug_printf("callout cache: found %s record for %s\n", type, key); return cache_record; } diff --git a/test/stderr/0376 b/test/stderr/0376 index 857295978..310e1a101 100644 --- a/test/stderr/0376 +++ b/test/stderr/0376 @@ -9,8 +9,8 @@ Verifying ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@localhost Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for localhost +callout cache: no address record found for ok@localhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -38,8 +38,8 @@ Verifying ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: found address record +callout cache: found domain record for localhost +callout cache: found address record for ok@localhost callout cache: address record is positive LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -55,8 +55,8 @@ Verifying ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: address record expired +callout cache: found domain record for localhost +callout cache: address record expired for ok@localhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused LOG: MAIN REJECT @@ -78,8 +78,8 @@ Verifying bad@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering bad@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: no address record found +callout cache: found domain record for localhost +callout cache: no address record found for bad@localhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -111,8 +111,8 @@ Verifying bad@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering bad@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: found address record +callout cache: found domain record for localhost +callout cache: found address record for bad@localhost callout cache: address record is negative LOG: MAIN REJECT H=[V4NET.0.0.1] U=root sender verify fail for @@ -132,8 +132,8 @@ Verifying ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: address record expired +callout cache: found domain record for localhost +callout cache: address record expired for ok@localhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -162,7 +162,7 @@ Verifying ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@localhost Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for localhost callout cache: domain gave initial rejection, or does not accept HELO or MAIL FROM:<> LOG: MAIN REJECT H=[V4NET.0.0.1] U=root sender verify fail for @@ -182,8 +182,8 @@ Verifying ok@otherhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost +callout cache: no address record found for ok@otherhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -222,7 +222,7 @@ Verifying ok@otherhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost callout cache: domain does not accept RCPT TO: LOG: MAIN REJECT H=[V4NET.0.0.2] U=root sender verify fail for @@ -242,8 +242,8 @@ Verifying ok@otherhost2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost2 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost2 +callout cache: no address record found for ok@otherhost2 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -278,9 +278,9 @@ Verifying ok@otherhost2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost2 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost2 callout cache: domain accepts RCPT TO: -callout cache: found address record +callout cache: found address record for ok@otherhost2 callout cache: address record is positive LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -296,8 +296,8 @@ Verifying ok@otherhost3 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost3 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost3 +callout cache: no address record found for ok@otherhost3 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -324,7 +324,7 @@ Verifying otherok@otherhost3 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering otherok@otherhost3 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost3 callout cache: domain accepts random addresses LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -340,8 +340,8 @@ Verifying ok@otherhost4 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost4 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost4 +callout cache: no address record found for ok@otherhost4 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -368,7 +368,7 @@ Verifying ok@otherhost4 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost4 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost4 callout cache: domain accepts random addresses LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -384,8 +384,8 @@ Verifying ok@otherhost41 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost41 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost41 +callout cache: no address record found for ok@otherhost41 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -426,10 +426,10 @@ Verifying ok@otherhost41 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost41 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost41 callout cache: domain rejects random addresses callout cache: domain accepts RCPT TO: -callout cache: found address record +callout cache: found address record for ok@otherhost41 callout cache: address record is positive LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -445,8 +445,8 @@ Verifying ok@otherhost21 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost21 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost21 +callout cache: no address record found for ok@otherhost21 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -481,9 +481,9 @@ Verifying ok2@otherhost21 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok2@otherhost21 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost21 callout cache: domain accepts RCPT TO: -callout cache: no address record found +callout cache: no address record found for ok2@otherhost21 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -511,8 +511,8 @@ Verifying ok@otherhost31 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost31 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost31 +callout cache: no address record found for ok@otherhost31 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -546,9 +546,9 @@ Verifying okok@otherhost31 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering okok@otherhost31 Attempting full verification using callout -callout cache: found domain record +callout cache: found domain record for otherhost31 callout cache: domain rejects random addresses -callout cache: no address record found +callout cache: no address record found for okok@otherhost31 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -576,8 +576,8 @@ Verifying okokok@otherhost31 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering okokok@otherhost31 Attempting full verification using callout -callout cache: domain record expired -callout cache: no address record found +callout cache: domain record expired for otherhost31 +callout cache: no address record found for okokok@otherhost31 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -611,8 +611,8 @@ Verifying okok@otherhost51 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering okok@otherhost51 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost51 +callout cache: no address record found for okok@otherhost51 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -642,8 +642,8 @@ Verifying okokok@otherhost52 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering okokok@otherhost52 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost52 +callout cache: no address record found for okokok@otherhost52 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -679,8 +679,8 @@ Verifying abcd@x.y.z >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering abcd@x.y.z Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for x.y.z +callout cache: no address record found for abcd@x.y.z/ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -711,8 +711,8 @@ Verifying abcd@x.y.z >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering abcd@x.y.z Attempting full verification using callout -callout cache: found domain record -callout cache: no address record found +callout cache: found domain record for x.y.z +callout cache: no address record found for abcd@x.y.z interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -740,8 +740,8 @@ Verifying ok@otherhost9 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering ok@otherhost9 Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for otherhost9 +callout cache: no address record found for ok@otherhost9 interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -778,8 +778,8 @@ Verifying z@test.ex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering z@test.ex Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for test.ex +callout cache: no address record found for z@test.ex/ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready diff --git a/test/stderr/0398 b/test/stderr/0398 index 31d3fc269..17d580669 100644 --- a/test/stderr/0398 +++ b/test/stderr/0398 @@ -122,9 +122,9 @@ EXIM_DBOPEN(TESTSUITE/spool/db/callout) returned from EXIM_DBOPEN opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR dbfn_read: key=remote -callout cache: found domain record +callout cache: found domain record for remote dbfn_read: key=qq@remote -callout cache: no address record found +callout cache: no address record found for qq@remote interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -223,9 +223,9 @@ EXIM_DBOPEN(TESTSUITE/spool/db/callout) returned from EXIM_DBOPEN opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR dbfn_read: key=remote -callout cache: found domain record +callout cache: found domain record for remote dbfn_read: key=qq@remote -callout cache: found address record +callout cache: found address record for qq@remote callout cache: address record is negative ----------- end verify ------------ l_message: $acl_verify_message diff --git a/test/stderr/0432 b/test/stderr/0432 index 918363e2e..6a7aebe15 100644 --- a/test/stderr/0432 +++ b/test/stderr/0432 @@ -83,9 +83,9 @@ EXIM_DBOPEN(TESTSUITE/spool/db/callout) returned from EXIM_DBOPEN opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR dbfn_read: key=y -callout cache: no domain record found +callout cache: no domain record found for y dbfn_read: key=x@y -callout cache: no address record found +callout cache: no address record found for x@y interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 server ready @@ -179,9 +179,9 @@ EXIM_DBOPEN(TESTSUITE/spool/db/callout) returned from EXIM_DBOPEN opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR dbfn_read: key=y -callout cache: found domain record +callout cache: found domain record for y dbfn_read: key=x@y -callout cache: found address record +callout cache: found address record for x@y callout cache: address record is positive ----------- end verify ------------ sender x@y verified ok @@ -214,8 +214,8 @@ MUNGED: ::1 will be omitted in what follows >>> get[host|ipnode]byname[2] looked up these IP addresses: >>> name=127.0.0.1 address=127.0.0.1 >>> Attempting full verification using callout ->>> callout cache: found domain record ->>> callout cache: found address record +>>> callout cache: found domain record for y +>>> callout cache: found address record for x@y >>> callout cache: address record is positive >>> ----------- end verify ------------ >>> accept: condition test succeeded in ACL "mail" @@ -240,8 +240,8 @@ MUNGED: ::1 will be omitted in what follows >>> get[host|ipnode]byname[2] looked up these IP addresses: >>> name=127.0.0.1 address=127.0.0.1 >>> Attempting full verification using callout ->>> callout cache: no domain record found ->>> callout cache: no address record found +>>> callout cache: no domain record found for b +>>> callout cache: no address record found for a@b >>> interface=NULL port=1224 >>> Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected >>> SMTP<< 220 server ready @@ -280,8 +280,8 @@ MUNGED: ::1 will be omitted in what follows >>> get[host|ipnode]byname[2] looked up these IP addresses: >>> name=127.0.0.1 address=127.0.0.1 >>> Attempting full verification using callout ->>> callout cache: no domain record found ->>> callout cache: no address record found +>>> callout cache: no domain record found for q +>>> callout cache: no address record found for p1@q >>> interface=NULL port=1224 >>> Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected >>> SMTP<< 220 server ready diff --git a/test/stderr/0443 b/test/stderr/0443 index 99dc1c6f6..853d171da 100644 --- a/test/stderr/0443 +++ b/test/stderr/0443 @@ -14,8 +14,8 @@ >>> calling r1 router >>> routed by r1 router >>> Attempting full verification using callout ->>> callout cache: no domain record found ->>> callout cache: no address record found +>>> callout cache: no domain record found for ten-1.test.ex +>>> callout cache: no address record found for x@ten-1.test.ex >>> cannot callout via null transport >>> ----------- end verify ------------ >>> accept: condition test deferred in ACL "rcpt" diff --git a/test/stderr/0462 b/test/stderr/0462 index f9133d602..0d6d719cf 100644 --- a/test/stderr/0462 +++ b/test/stderr/0462 @@ -9,8 +9,8 @@ Verifying Ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering Ok@localhost Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for localhost +callout cache: no address record found for Ok@localhost interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -41,8 +41,8 @@ Verifying Ok@localhost >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering Ok@localhost Attempting full verification using callout -callout cache: found domain record -callout cache: found address record +callout cache: found domain record for localhost +callout cache: found address record for Ok@localhost callout cache: address record is positive LOG: smtp_connection MAIN SMTP connection from root closed by QUIT @@ -58,8 +58,8 @@ Verifying NOTok@elsewhere >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering NOTok@elsewhere Attempting full verification using callout -callout cache: no domain record found -callout cache: no address record found +callout cache: no domain record found for elsewhere +callout cache: no address record found for NOTok@elsewhere interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -91,8 +91,8 @@ Verifying NOTok2@elsewhere >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering NOTok2@elsewhere Attempting full verification using callout -callout cache: found domain record -callout cache: no address record found +callout cache: found domain record for elsewhere +callout cache: no address record found for NOTok2@elsewhere interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready diff --git a/test/stderr/0473 b/test/stderr/0473 index 090335d97..257af6c38 100644 --- a/test/stderr/0473 +++ b/test/stderr/0473 @@ -9,8 +9,8 @@ Verifying r11@two.test.ex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering r11@two.test.ex Attempting full verification using callout -callout cache: found domain record -callout cache: no address record found +callout cache: found domain record for two.test.ex +callout cache: no address record found for r11@two.test.ex interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready @@ -38,8 +38,8 @@ Verifying r11@two.test.ex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering r11@two.test.ex Attempting full verification using callout -callout cache: found domain record -callout cache: no address record found +callout cache: found domain record for two.test.ex +callout cache: no address record found for r11@two.test.ex interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP timeout diff --git a/test/stderr/5840 b/test/stderr/5840 index b2097c1d8..91e80e8ea 100644 --- a/test/stderr/5840 +++ b/test/stderr/5840 @@ -15,8 +15,8 @@ >>> local host found for non-MX address >>> routed by client router >>> Attempting full verification using callout ->>> callout cache: no domain record found ->>> callout cache: no address record found +>>> callout cache: no domain record found for dane256ee.test.ex +>>> callout cache: no address record found for CALLER@dane256ee.test.ex >>> interface=NULL port=1225 >>> Connecting to dane256ee.test.ex [ip4.ip4.ip4.ip4]:1225 ... connected MUNGED: ::1 will be omitted in what follows -- 2.30.2