Fix sender-verify callout to not use trigger-message SIZE
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 16 Oct 2016 17:08:33 +0000 (18:08 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 16 Oct 2016 17:10:31 +0000 (18:10 +0100)
Broken-by: 9094b84b4cce
src/src/verify.c
test/confs/0227
test/scripts/0000-Basic/0227
test/stderr/0227
test/stdout/0227

index 11f1e10eb2f027d3de99c954d825ee7ca9cacd44..ff9a5a5c0b19d0d96f53537bc17f41c278af1b0e 100644 (file)
@@ -756,7 +756,7 @@ can do it there for the non-rcpt-verify case.  For this we keep an addresscount.
        : 0;
       }
 
        : 0;
       }
 
-    size_str = peer_offered & PEER_OFFERED_SIZE
+    size_str = options & vopt_is_recipient && peer_offered & PEER_OFFERED_SIZE
       ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) : US"";
 
 #ifdef SUPPORT_TLS
       ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) : US"";
 
 #ifdef SUPPORT_TLS
index 1ca729551da2362b6a8db1244cfe38c440e73825..ed988ac85d81a6e15301312a4f2271d02c640b60 100644 (file)
@@ -26,6 +26,8 @@ check_recipient:
          !verify   = recipient/callout=no_cache
   deny    hosts    = V4NET.0.0.5
          !verify   = sender/callout=no_cache/check_postmaster
          !verify   = recipient/callout=no_cache
   deny    hosts    = V4NET.0.0.5
          !verify   = sender/callout=no_cache/check_postmaster
+  deny    hosts    = V4NET.0.0.6
+         !verify   = sender/callout=no_cache
   require verify   = sender
   accept  domains  = +local_domains
   deny    message  = relay not permitted
   require verify   = sender
   accept  domains  = +local_domains
   deny    message  = relay not permitted
index 59adba788b85967c48458bac91f88b169ecd9a29..a67dab2ebd9a1d9e4a3a284c94c3e8a827537f02 100644 (file)
@@ -203,6 +203,27 @@ MAIL FROM:<ok@localhost1>
 RCPT TO:<z@remote.domain>
 QUIT
 ****
 RCPT TO:<z@remote.domain>
 QUIT
 ****
+#
+server PORT_S
+220 Server ready
+EHLO
+250- wotcher
+250-SIZE
+250 OK
+MAIL FROM
+250 OK
+RCPT TO
+250 OK
+QUIT
+250 OK
+****
+sudo exim -v -bs -oMa V4NET.0.0.6
+EHLO me
+MAIL FROM:<ok@localhost1> SIZE=420000
+RCPT TO:<z@test.ex>
+QUIT
+****
+#
 server PORT_S
 220 Server ready
 LHLO
 server PORT_S
 220 Server ready
 LHLO
index e07b2ba550f8f48bda332cf9d386e6c79beb89bb..016b9a3e378ea2fcedf28e96d11056cd570837a0 100644 (file)
@@ -208,6 +208,22 @@ LOG: smtp_connection MAIN
   SMTP connection from root closed by QUIT
 LOG: smtp_connection MAIN
   SMTP connection from root
   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
+         250-SIZE
+         250 OK
+  SMTP>> MAIL FROM:<>
+  SMTP<< 250 OK
+  SMTP>> RCPT TO:<ok@localhost1>
+  SMTP<< 250 OK
+  SMTP>> QUIT
+  SMTP(close)>>
+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
 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected
   SMTP<< 220 Server ready
   SMTP>> LHLO myhost.test.ex
index 46057c82402d2e07cce118d54995e528df5f3e61..d63f14e90766047c3f8ed83af00011333c33fc6d 100644 (file)
 550 Sender verify failed\r
 221 myhost.test.ex closing connection\r
 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
 550 Sender verify failed\r
 221 myhost.test.ex closing connection\r
 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello root at me [V4NET.0.0.6]\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
 250 OK\r
 550-Callout verification failed:\r
 550 550 Recipient not liked\r
 250 OK\r
 550-Callout verification failed:\r
 550 550 Recipient not liked\r
@@ -238,6 +247,20 @@ End of script
 Listening on port 1224 ... 
 Connection request from [127.0.0.1]
 220 Server ready
 Listening on port 1224 ... 
 Connection request from [127.0.0.1]
 220 Server ready
+EHLO myhost.test.ex
+250- wotcher
+250-SIZE
+250 OK
+MAIL FROM:<>
+250 OK
+RCPT TO:<ok@localhost1>
+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:<>
 LHLO myhost.test.ex
 250 OK
 MAIL FROM:<>