From 14de8063d82edc5bf003ed50abdea55ac542679b Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 22 Jul 2017 16:38:08 +0100 Subject: On callout avoid SIZE every time but noncacheable rcpt main-verify. Bug 2151 --- test/confs/0227 | 2 ++ test/log/0227 | 3 ++ test/rejectlog/0227 | 3 ++ test/scripts/0000-Basic/0227 | 84 ++++++++++++++++++++++++++++++++++++++++++-- test/stderr/0227 | 67 +++++++++++++++++++++++++++++++++-- test/stderr/2035 | 2 +- test/stderr/2135 | 2 +- test/stderr/5410 | 6 ++-- test/stderr/5420 | 6 ++-- test/stderr/5840 | 4 +-- test/stdout/0227 | 79 +++++++++++++++++++++++++++++++++++++++-- 11 files changed, 242 insertions(+), 16 deletions(-) (limited to 'test') diff --git a/test/confs/0227 b/test/confs/0227 index ed988ac85..fea66e16f 100644 --- a/test/confs/0227 +++ b/test/confs/0227 @@ -24,6 +24,8 @@ check_recipient: !verify = sender/callout=no_cache deny hosts = V4NET.0.0.3 !verify = recipient/callout=no_cache + deny hosts = V4NET.0.0.7 + !verify = recipient/callout=no_cache,use_sender,random deny hosts = V4NET.0.0.5 !verify = sender/callout=no_cache/check_postmaster deny hosts = V4NET.0.0.6 diff --git a/test/log/0227 b/test/log/0227 index f1e64701c..d91075fb6 100644 --- a/test/log/0227 +++ b/test/log/0227 @@ -14,6 +14,9 @@ 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : relay not permitted 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +1999-03-02 09:44:33 H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +1999-03-02 09:44:33 H=(me) [V4NET.0.0.7] U=root F= rejected RCPT : relay not permitted 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 diff --git a/test/rejectlog/0227 b/test/rejectlog/0227 index 8f5c0ad15..e44ddafbc 100644 --- a/test/rejectlog/0227 +++ b/test/rejectlog/0227 @@ -30,6 +30,9 @@ F From: abcd@x.y.z 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : relay not permitted 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +1999-03-02 09:44:33 H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +1999-03-02 09:44:33 H=(me) [V4NET.0.0.7] U=root F= rejected RCPT : relay not permitted 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 diff --git a/test/scripts/0000-Basic/0227 b/test/scripts/0000-Basic/0227 index a67dab2eb..e53c1da7f 100644 --- a/test/scripts/0000-Basic/0227 +++ b/test/scripts/0000-Basic/0227 @@ -12,11 +12,13 @@ RCPT TO QUIT 250 OK **** +# sender sudo exim -v -bs -oMa V4NET.0.0.1 MAIL FROM: RCPT TO: QUIT **** +# sender, no callout sudo exim -v -bs -oMa V4NET.0.0.2 MAIL FROM: RCPT TO: @@ -33,6 +35,7 @@ RCPT TO QUIT 250 OK **** +# sender, refused sudo exim -v -bs -oMa V4NET.0.0.1 MAIL FROM: RCPT TO: @@ -49,6 +52,7 @@ RCPT TO QUIT 250 OK **** +# sender, tmperr sudo exim -v -bs -oMa V4NET.0.0.1 MAIL FROM: RCPT TO: @@ -63,6 +67,7 @@ MAIL FROM QUIT 250 OK **** +# sender, err on mailfrom sudo exim -v -bs -oMa V4NET.0.0.1 MAIL FROM: RCPT TO: @@ -78,6 +83,7 @@ MAIL FROM QUIT 250 OK **** +# sender, err on mailfrom sudo exim -v -bs -oMa V4NET.0.0.1 MAIL FROM: RCPT TO: @@ -94,6 +100,7 @@ RCPT TO QUIT 250 OK **** +# recipient, refused sudo exim -v -bs -oMa V4NET.0.0.3 MAIL FROM: RCPT TO: @@ -111,11 +118,13 @@ RCPT TO QUIT 250 OK **** +# recipient, refused sudo exim -v -bs -oMa V4NET.0.0.3 MAIL FROM: RCPT TO: QUIT **** +# recipient, no conneect sudo exim -v -bs -oMa V4NET.0.0.3 MAIL FROM: RCPT TO: @@ -207,16 +216,17 @@ QUIT server PORT_S 220 Server ready EHLO -250- wotcher +250- wotcher sverifier 250-SIZE 250 OK -MAIL FROM +MAIL FROM:<> 250 OK RCPT TO 250 OK QUIT 250 OK **** +# sender, size known, tgt supports sixe sudo exim -v -bs -oMa V4NET.0.0.6 EHLO me MAIL FROM: SIZE=420000 @@ -226,6 +236,76 @@ QUIT # server PORT_S 220 Server ready +EHLO +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM:<> SIZE= +250 OK +RCPT TO +250 OK +QUIT +250 OK +**** +# receipient, size known, tgt supports size +sudo exim -v -bs -oMa V4NET.0.0.3 +EHLO me +MAIL FROM: SIZE=420000 +RCPT TO: +QUIT +**** +# +server PORT_S +220 Server ready +EHLO +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM:<> +250 OK +RCPT TO +250 OK +QUIT +250 OK +**** +# receipient, size unknown, tgt supports size +sudo exim -v -bs -oMa V4NET.0.0.3 +EHLO me +MAIL FROM: +RCPT TO: +QUIT +**** +# +server PORT_S +220 Server ready +EHLO +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM: +250 OK +RCPT TO: SIZE= +250 OK +RCPT TO: +250 OK +QUIT +250 OK +**** +# receipient, size known, tgt supports size, use_sender, w/random +# stdout should see SIZE on the main but not on the random receipient's MAIL FROM +sudo exim -v -bs -oMa V4NET.0.0.7 +EHLO me +MAIL FROM: SIZE=420000 +RCPT TO: +QUIT +**** +# +server PORT_S +220 Server ready LHLO 250 OK MAIL FROM diff --git a/test/stderr/0227 b/test/stderr/0227 index 6a8ee1f7e..e3282cc6f 100644 --- a/test/stderr/0227 +++ b/test/stderr/0227 @@ -222,10 +222,10 @@ LOG: smtp_connection MAIN Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready SMTP>> EHLO myhost.test.ex - SMTP<< 250- wotcher + SMTP<< 250- wotcher sverifier 250-SIZE 250 OK - SMTP>> MAIL FROM:<> SIZE=ssss + SMTP>> MAIL FROM:<> SMTP<< 250 OK SMTP>> RCPT TO: SMTP<< 250 OK @@ -236,6 +236,69 @@ LOG: smtp_connection MAIN SMTP connection from root closed by QUIT LOG: smtp_connection MAIN SMTP connection from root +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250- wotcher rverifier + 250-SIZE + 250 OK + SMTP>> MAIL FROM:<> SIZE=ssss + SMTP<< 250 OK + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +LOG: MAIN REJECT + H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +LOG: smtp_connection MAIN + SMTP connection from root +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250- wotcher rverifier + 250-SIZE + 250 OK + SMTP>> MAIL FROM:<> + SMTP<< 250 OK + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +LOG: MAIN REJECT + H=(me) [V4NET.0.0.3] U=root F= rejected RCPT : relay not permitted +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +LOG: smtp_connection MAIN + SMTP connection from root +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250- wotcher rverifier + 250-SIZE + 250 OK + SMTP>> MAIL FROM: + SMTP<< 250 OK + SMTP>> RCPT TO: + SMTP<< 550 RANDOM NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM: SIZE=ssss + SMTP<< 250 OK + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +LOG: MAIN REJECT + H=(me) [V4NET.0.0.7] U=root F= rejected RCPT : relay not permitted +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +LOG: smtp_connection MAIN + SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 220 Server ready SMTP>> LHLO myhost.test.ex diff --git a/test/stderr/2035 b/test/stderr/2035 index e37495092..dedf4ad48 100644 --- a/test/stderr/2035 +++ b/test/stderr/2035 @@ -26,7 +26,7 @@ cmd buf flush ddd bytes 250 HELP using PIPELINING not using DSN - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK diff --git a/test/stderr/2135 b/test/stderr/2135 index 5a4de14ec..ac524d2af 100644 --- a/test/stderr/2135 +++ b/test/stderr/2135 @@ -26,7 +26,7 @@ cmd buf flush ddd bytes 250 HELP using PIPELINING not using DSN - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK diff --git a/test/stderr/5410 b/test/stderr/5410 index 6a37deb6e..b4db690ab 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -119,7 +119,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK @@ -345,7 +345,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK @@ -571,7 +571,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK diff --git a/test/stderr/5420 b/test/stderr/5420 index eaa40bce8..b34440046 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -118,7 +118,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK @@ -344,7 +344,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK @@ -570,7 +570,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: SIZE=ssss + SMTP>> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes SMTP<< 250 OK diff --git a/test/stderr/5840 b/test/stderr/5840 index 5ccf7cda0..bc8aeca30 100644 --- a/test/stderr/5840 +++ b/test/stderr/5840 @@ -50,9 +50,9 @@ >>> 250 HELP >>> ip4.ip4.ip4.ip4 in hosts_avoid_pipelining? no (option unset) >>> ip4.ip4.ip4.ip4 in hosts_require_auth? no (option unset) ->>> SMTP>> MAIL FROM:<> SIZE=ssss +>>> SMTP>> MAIL FROM:<> >>> SMTP>> RCPT TO: ->>> cmd buf flush 62 bytes +>>> cmd buf flush 52 bytes >>> SMTP<< 250 OK >>> SMTP<< 250 Accepted >>> SMTP>> QUIT diff --git a/test/stdout/0227 b/test/stdout/0227 index ea8520ef1..9ee7e9f54 100644 --- a/test/stdout/0227 +++ b/test/stdout/0227 @@ -88,6 +88,33 @@ 250 Accepted 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello root at me [V4NET.0.0.3] +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +550 relay not permitted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello root at me [V4NET.0.0.3] +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +550 relay not permitted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello root at me [V4NET.0.0.7] +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +550 relay not permitted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250 OK 550-Callout verification failed: 550 550 Recipient not liked @@ -248,10 +275,10 @@ Listening on port 1224 ... Connection request from [127.0.0.1] 220 Server ready EHLO myhost.test.ex -250- wotcher +250- wotcher sverifier 250-SIZE 250 OK -MAIL FROM:<> SIZE=ssss +MAIL FROM:<> 250 OK RCPT TO: 250 OK @@ -261,6 +288,54 @@ End of script Listening on port 1224 ... Connection request from [127.0.0.1] 220 Server ready +EHLO myhost.test.ex +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM:<> SIZE=ssss +250 OK +RCPT TO: +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250- wotcher rverifier +250-SIZE +250 OK +MAIL FROM: +250 OK +RCPT TO: +550 RANDOM NOT OK +RSET +250 OK +MAIL FROM: SIZE=ssss +250 OK +RCPT TO: +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready LHLO myhost.test.ex 250 OK MAIL FROM:<> -- cgit v1.2.3