diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-07 21:51:13 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-08 01:13:42 +0100 |
commit | 6e69d78e612ade9d9bb052abeb4b113984995710 (patch) | |
tree | 263fd648e6e14598614248079160ff480d72152c | |
parent | 55240832db97f7a16fd6ef2e2bb8d899897a1347 (diff) |
Testsuite: cutthrough vs. callout cache
-rw-r--r-- | test/confs/5402 | 39 | ||||
-rw-r--r--[l---------] | test/confs/5403 | 71 | ||||
l--------- | test/confs/5404 | 1 | ||||
-rw-r--r-- | test/log/5402 | 3 | ||||
-rw-r--r-- | test/log/5404 (renamed from test/log/5403) | 0 | ||||
-rw-r--r-- | test/scripts/5400-cutthrough/5402 | 49 | ||||
-rw-r--r-- | test/scripts/5400-cutthrough/5403 | 42 | ||||
-rw-r--r-- | test/scripts/5400-cutthrough/5404 | 30 | ||||
-rw-r--r-- | test/stderr/5403 (renamed from test/stderr/5402) | 0 | ||||
-rw-r--r-- | test/stdout/5402 | 58 | ||||
-rw-r--r-- | test/stdout/5403 | 59 | ||||
-rw-r--r-- | test/stdout/5404 | 40 |
12 files changed, 278 insertions, 114 deletions
diff --git a/test/confs/5402 b/test/confs/5402 index e480b64b5..2c1038015 100644 --- a/test/confs/5402 +++ b/test/confs/5402 @@ -1,4 +1,4 @@ -# Exim test configuration 5400 +# Exim test configuration 5402 exim_path = EXIM_PATH keep_environment = @@ -10,44 +10,33 @@ gecos_pattern = "" gecos_name = CALLER_NAME tls_advertise_hosts = -log_selector = +received_recipients - # ----- Main settings ----- domainlist local_domains = test.ex : *.test.ex -acl_smtp_rcpt = ar - +acl_smtp_rcpt = acl_rcpt -# ----- ACLs ----- +# ----- ACLs ------- begin acl -ar: - warn control = cutthrough_delivery - logwrite = rcpt for $local_part@$domain - warn condition = ${if eq {verify}{$local_part}} - verify = recipient/callout=use_sender - accept +acl_rcpt: +.ifdef OPT + warn control = cutthrough_delivery +.endif + accept verify = recipient/callout=use_sender + # ----- Routers ----- begin routers -dns: - driver = dnslookup - domains = localhost.test.ex : localhost4.test.ex : thishost.test.ex - self = send - transport = smtp - all: driver = manualroute domains = ! +local_domains - route_list = special.com HOSTIPV4 ; * 127.0.0.1 + route_list = * 127.0.0.1 self = send - transport = ${if eq {special_tpt}{$local_part} {smtp2}{smtp}} - headers_remove = X-hdr-rtr - headers_add = X-hdr-rtr-new: $h_X-hdr-rtr:+++ + transport = smtp no_more @@ -59,12 +48,6 @@ smtp: driver = smtp interface = HOSTIPV4 port = PORT_S - headers_add = ${if def:h_X-hdr-rtr {X-hdr-tpt-new: new} {}} - -smtp2: - driver = smtp - interface = HOSTIPV4 - port = PORT_S # End diff --git a/test/confs/5403 b/test/confs/5403 index 8f6811b7e..70ec647d0 120000..100644 --- a/test/confs/5403 +++ b/test/confs/5403 @@ -1 +1,70 @@ -5400
\ No newline at end of file +# Exim test configuration 5403 + +exim_path = EXIM_PATH +keep_environment = +host_lookup_order = bydns +primary_hostname = myhost.test.ex +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME +tls_advertise_hosts = + +log_selector = +received_recipients + +# ----- Main settings ----- + +domainlist local_domains = test.ex : *.test.ex + +acl_smtp_rcpt = ar + + +# ----- ACLs ----- + +begin acl + +ar: + warn control = cutthrough_delivery + logwrite = rcpt for $local_part@$domain + warn condition = ${if eq {verify}{$local_part}} + verify = recipient/callout=use_sender + accept + +# ----- Routers ----- + +begin routers + +dns: + driver = dnslookup + domains = localhost.test.ex : localhost4.test.ex : thishost.test.ex + self = send + transport = smtp + +all: + driver = manualroute + domains = ! +local_domains + route_list = special.com HOSTIPV4 ; * 127.0.0.1 + self = send + transport = ${if eq {special_tpt}{$local_part} {smtp2}{smtp}} + headers_remove = X-hdr-rtr + headers_add = X-hdr-rtr-new: $h_X-hdr-rtr:+++ + no_more + + +# ----- Transports ----- + +begin transports + +smtp: + driver = smtp + interface = HOSTIPV4 + port = PORT_S + headers_add = ${if def:h_X-hdr-rtr {X-hdr-tpt-new: new} {}} + +smtp2: + driver = smtp + interface = HOSTIPV4 + port = PORT_S + + +# End diff --git a/test/confs/5404 b/test/confs/5404 new file mode 120000 index 000000000..8f6811b7e --- /dev/null +++ b/test/confs/5404 @@ -0,0 +1 @@ +5400
\ No newline at end of file diff --git a/test/log/5402 b/test/log/5402 new file mode 100644 index 000000000..add3b3e03 --- /dev/null +++ b/test/log/5402 @@ -0,0 +1,3 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 >> dest@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/log/5403 b/test/log/5404 index 9505825f4..9505825f4 100644 --- a/test/log/5403 +++ b/test/log/5404 diff --git a/test/scripts/5400-cutthrough/5402 b/test/scripts/5400-cutthrough/5402 index 3e6f3189e..1113c6d32 100644 --- a/test/scripts/5400-cutthrough/5402 +++ b/test/scripts/5400-cutthrough/5402 @@ -1,42 +1,49 @@ -# cutthrough_delivery and -bhc +# cutthrough_delivery vs. recipient-verify cache entry need_ipv4 -munge loopback -no_msglog_check # -# Despite config for cutthrough should not make onward conn -server -t -2 PORT_S +# Set up callout cache +# +server PORT_S +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +QUIT +250 OK **** -exim -bhc 1.2.3.4 +exim -bs -odf EHLO myhost.test.ex MAIL FROM:<CALLER@myhost.test.ex> -RCPT TO:<plain@domain.com> -DATA - -. +RCPT TO:<dest@domain.com> QUIT **** # -# Onward conn made for r-verify but cleared before DATA +# Send message with cutthrough +# server PORT_S -220 server ready +220 ESMTP EHLO 250 OK -MAIL -250 OK -RCPT +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +. 250 OK QUIT -220 OK -*eof +250 OK **** -exim -bhc 1.2.3.4 +exim -DOPT=CUTTHROUGH -bs -odf EHLO myhost.test.ex MAIL FROM:<CALLER@myhost.test.ex> -RCPT TO:<verify@domain.com> +RCPT TO:<dest@domain.com> DATA . QUIT **** -# -# End diff --git a/test/scripts/5400-cutthrough/5403 b/test/scripts/5400-cutthrough/5403 index dbe7ef3c5..3e6f3189e 100644 --- a/test/scripts/5400-cutthrough/5403 +++ b/test/scripts/5400-cutthrough/5403 @@ -1,30 +1,42 @@ -# cutthrough_delivery with MAIL SIZE= +# cutthrough_delivery and -bhc need_ipv4 munge loopback +no_msglog_check # -server PORT_S -220 ESMTP -EHLO -250-OK -250 SIZE 65536 -MAIL FROM:<fred@myhost.test.ex> SIZE=1123 -250 Sender OK -RCPT TO: -250 Recipient OK +# Despite config for cutthrough should not make onward conn +server -t -2 PORT_S +**** +exim -bhc 1.2.3.4 +EHLO myhost.test.ex +MAIL FROM:<CALLER@myhost.test.ex> +RCPT TO:<plain@domain.com> DATA -354 Send data + . -250 OK QUIT +**** +# +# Onward conn made for r-verify but cleared before DATA +server PORT_S +220 server ready +EHLO +250 OK +MAIL 250 OK +RCPT +250 OK +QUIT +220 OK +*eof **** -exim -bs +exim -bhc 1.2.3.4 EHLO myhost.test.ex -MAIL FROM:<fred@myhost.test.ex> SIZE=99 -RCPT TO:<userx@domain.com> +MAIL FROM:<CALLER@myhost.test.ex> +RCPT TO:<verify@domain.com> DATA . QUIT **** +# # End diff --git a/test/scripts/5400-cutthrough/5404 b/test/scripts/5400-cutthrough/5404 new file mode 100644 index 000000000..dbe7ef3c5 --- /dev/null +++ b/test/scripts/5400-cutthrough/5404 @@ -0,0 +1,30 @@ +# cutthrough_delivery with MAIL SIZE= +need_ipv4 +munge loopback +# +server PORT_S +220 ESMTP +EHLO +250-OK +250 SIZE 65536 +MAIL FROM:<fred@myhost.test.ex> SIZE=1123 +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +. +250 OK +QUIT +250 OK +**** +exim -bs +EHLO myhost.test.ex +MAIL FROM:<fred@myhost.test.ex> SIZE=99 +RCPT TO:<userx@domain.com> +DATA + +. +QUIT +**** +# End diff --git a/test/stderr/5402 b/test/stderr/5403 index 49d3574fe..49d3574fe 100644 --- a/test/stderr/5402 +++ b/test/stderr/5403 diff --git a/test/stdout/5402 b/test/stdout/5402 index c0548bae7..1aa55964e 100644 --- a/test/stdout/5402 +++ b/test/stdout/5402 @@ -1,29 +1,14 @@ - -**** SMTP testing session as if from host 1.2.3.4 -**** but without any ident (RFC 1413) callback. -**** This is not for real! - 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-250-myhost.test.ex Hello myhost.test.ex [1.2.3.4]
+250-myhost.test.ex Hello CALLER at myhost.test.ex
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250 HELP
250 OK
250 Accepted
-354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaX-0005vi-00
- -**** SMTP testing: that is not a real message id! - 221 myhost.test.ex closing connection
- -**** SMTP testing session as if from host 1.2.3.4 -**** but without any ident (RFC 1413) callback. -**** This is not for real! - 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-250-myhost.test.ex Hello myhost.test.ex [1.2.3.4]
+250-myhost.test.ex Hello CALLER at myhost.test.ex
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
@@ -31,25 +16,44 @@ 250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaY-0005vi-00
- -**** SMTP testing: that is not a real message id! - +250 OK id=10HmaX-0005vi-00
221 myhost.test.ex closing connection
******** SERVER ******** Listening on port 1224 ... -Server timed out -Listening on port 1224 ... Connection request from [ip4.ip4.ip4.ip4] -220 server ready +220 ESMTP EHLO myhost.test.ex 250 OK MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<dest@domain.com> +250 Recipient OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex 250 OK -RCPT TO:<verify@domain.com> +MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<dest@domain.com> +250 Recipient OK +DATA +354 Send data +Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from <CALLER@myhost.test.ex>) + id 10HmaX-0005vi-00 + for dest@domain.com; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> +From: CALLER_NAME <CALLER@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. 250 OK QUIT -220 OK -Expected EOF read from client +250 OK End of script diff --git a/test/stdout/5403 b/test/stdout/5403 index aa2bdcaab..c0548bae7 100644 --- a/test/stdout/5403 +++ b/test/stdout/5403 @@ -1,5 +1,10 @@ + +**** SMTP testing session as if from host 1.2.3.4 +**** but without any ident (RFC 1413) callback. +**** This is not for real! + 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-250-myhost.test.ex Hello CALLER at myhost.test.ex
+250-myhost.test.ex Hello myhost.test.ex [1.2.3.4]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
@@ -8,33 +13,43 @@ 250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=10HmaX-0005vi-00
+ +**** SMTP testing: that is not a real message id! + +221 myhost.test.ex closing connection
+ +**** SMTP testing session as if from host 1.2.3.4 +**** but without any ident (RFC 1413) callback. +**** This is not for real! + +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello myhost.test.ex [1.2.3.4]
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaY-0005vi-00
+ +**** SMTP testing: that is not a real message id! + 221 myhost.test.ex closing connection
******** SERVER ******** Listening on port 1224 ... +Server timed out +Listening on port 1224 ... Connection request from [ip4.ip4.ip4.ip4] -220 ESMTP +220 server ready EHLO myhost.test.ex -250-OK -250 SIZE 65536 -MAIL FROM:<fred@myhost.test.ex> SIZE=ssss -250 Sender OK -RCPT TO:<userx@domain.com> -250 Recipient OK -DATA -354 Send data -Received: from CALLER (helo=myhost.test.ex) - by myhost.test.ex with local-esmtp (Exim x.yz) - (envelope-from <CALLER@myhost.test.ex>) - id 10HmaX-0005vi-00 - for userx@domain.com; Tue, 2 Mar 1999 09:44:33 +0000 -Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> -From: CALLER_NAME <CALLER@myhost.test.ex> -Date: Tue, 2 Mar 1999 09:44:33 +0000 -X-hdr-rtr-new: +++ - -. 250 OK -QUIT +MAIL FROM:<CALLER@myhost.test.ex> 250 OK +RCPT TO:<verify@domain.com> +250 OK +QUIT +220 OK +Expected EOF read from client End of script diff --git a/test/stdout/5404 b/test/stdout/5404 new file mode 100644 index 000000000..aa2bdcaab --- /dev/null +++ b/test/stdout/5404 @@ -0,0 +1,40 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at myhost.test.ex
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+221 myhost.test.ex closing connection
+ +******** SERVER ******** +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex +250-OK +250 SIZE 65536 +MAIL FROM:<fred@myhost.test.ex> SIZE=ssss +250 Sender OK +RCPT TO:<userx@domain.com> +250 Recipient OK +DATA +354 Send data +Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from <CALLER@myhost.test.ex>) + id 10HmaX-0005vi-00 + for userx@domain.com; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> +From: CALLER_NAME <CALLER@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 +X-hdr-rtr-new: +++ + +. +250 OK +QUIT +250 OK +End of script |