summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-10-16 18:08:33 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-10-16 18:10:31 +0100
commit91d08eb383184828de154a118152a334e74f7668 (patch)
treee3e0b0e41cb7b22e305aeb27f4fe08e697ddfc00
parentf267271de69d5c6c090e16ebd64041b50a844852 (diff)
Fix sender-verify callout to not use trigger-message SIZE
Broken-by: 9094b84b4cce
-rw-r--r--src/src/verify.c2
-rw-r--r--test/confs/02272
-rw-r--r--test/scripts/0000-Basic/022721
-rw-r--r--test/stderr/022716
-rw-r--r--test/stdout/022723
5 files changed, 63 insertions, 1 deletions
diff --git a/src/src/verify.c b/src/src/verify.c
index 11f1e10eb..ff9a5a5c0 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -756,7 +756,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount.
: 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
diff --git a/test/confs/0227 b/test/confs/0227
index 1ca729551..ed988ac85 100644
--- a/test/confs/0227
+++ b/test/confs/0227
@@ -26,6 +26,8 @@ check_recipient:
!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
diff --git a/test/scripts/0000-Basic/0227 b/test/scripts/0000-Basic/0227
index 59adba788..a67dab2eb 100644
--- a/test/scripts/0000-Basic/0227
+++ b/test/scripts/0000-Basic/0227
@@ -203,6 +203,27 @@ MAIL FROM:<ok@localhost1>
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
diff --git a/test/stderr/0227 b/test/stderr/0227
index e07b2ba55..016b9a3e3 100644
--- a/test/stderr/0227
+++ b/test/stderr/0227
@@ -210,6 +210,22 @@ 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
SMTP<< 250 OK
SMTP>> MAIL FROM:<>
diff --git a/test/stdout/0227 b/test/stdout/0227
index 46057c824..d63f14e90 100644
--- a/test/stdout/0227
+++ b/test/stdout/0227
@@ -79,6 +79,15 @@
550 Sender verify failed
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.6]
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+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 OK
550-Callout verification failed:
550 550 Recipient not liked
@@ -238,6 +247,20 @@ End of script
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:<>