summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-01-26 14:02:31 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-01-26 16:35:55 +0000
commit9438970c97adda0afb9b825b5beff5276a1d613d (patch)
tree72e9032fbef76da227c6dc31234e58e61c233011 /test
parente851856fc72bf126f7b649a007fb7040140d5d3c (diff)
ACL: control = queue/first_pass_route
Diffstat (limited to 'test')
-rw-r--r--test/confs/059954
-rw-r--r--test/log/00554
-rw-r--r--test/log/05444
-rw-r--r--test/log/059945
-rw-r--r--test/scripts/0000-Basic/059976
-rw-r--r--test/stderr/00554
-rw-r--r--test/stderr/05444
-rw-r--r--test/stdout/059974
8 files changed, 257 insertions, 8 deletions
diff --git a/test/confs/0599 b/test/confs/0599
new file mode 100644
index 000000000..54667124d
--- /dev/null
+++ b/test/confs/0599
@@ -0,0 +1,54 @@
+# Exim test configuration 0599
+# control = queue/first_pass_route
+
+.include DIR/aux-var/std_conf_prefix
+
+
+# ----- Main settings -----
+
+domainlist local_domains = @
+
+acl_smtp_rcpt = check_rcpt
+
+trusted_users = CALLER
+queue_run_in_order
+
+
+# ----- ACL -----
+
+begin acl
+
+check_rcpt:
+ accept senders = HOSTIPV4
+
+ accept local_parts = ^queue_only.*
+ control = queue_only
+
+ accept local_parts = ^first_pass_route.*
+ control = queue/first_pass_route
+
+# ----- Routers -----
+
+begin routers
+
+discard_remote_source:
+ driver = redirect
+ condition = ${if !eq {$sender_host_address}{127.0.0.1}}
+ data = :blackhole:
+
+outbound:
+ driver = accept
+ transport = smtp
+
+
+# ----- Transports -----
+
+begin transports
+
+smtp:
+ driver = smtp
+ hosts = HOSTIPV4
+ port = PORT_D
+ allow_localhost
+
+# End
diff --git a/test/log/0055 b/test/log/0055
index a3f151d45..51d31aa3d 100644
--- a/test/log/0055
+++ b/test/log/0055
@@ -19,7 +19,7 @@
1999-03-02 09:44:33 10HmbB-0005vi-00 *> xxx@ten-1.test.ex R=lookuphost T=smtp H=ten-1.test.ex [V4NET.0.0.1] C="delivery bypassed by -N option"
1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@myhost.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbC-0005vi-00 == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+1999-03-02 09:44:33 10HmbC-0005vi-00 == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
1999-03-02 09:44:33 Start queue run: pid=pppp
1999-03-02 09:44:33 10HmbC-0005vi-00 *> xxx@ten-2.test.ex R=lookuphost T=smtp H=ten-2.test.ex [V4NET.0.0.2] C="delivery bypassed by -N option"
1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
@@ -33,7 +33,7 @@
1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp -qq
1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@myhost.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbF-0005vi-00 == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+1999-03-02 09:44:33 10HmbF-0005vi-00 == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
1999-03-02 09:44:33 10HmbF-0005vi-00 *> xxx@ten-2.test.ex R=lookuphost T=smtp H=ten-2.test.ex [V4NET.0.0.2] C="delivery bypassed by -N option"
1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@myhost.ex U=CALLER P=local S=sss
diff --git a/test/log/0544 b/test/log/0544
index 9d519bb84..a8361a13a 100644
--- a/test/log/0544
+++ b/test/log/0544
@@ -1,3 +1,3 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain1.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
-1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain2.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain1.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
+1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain2.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
diff --git a/test/log/0599 b/test/log/0599
new file mode 100644
index 000000000..cef4d7471
--- /dev/null
+++ b/test/log/0599
@@ -0,0 +1,45 @@
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => queue_only_1@test.ex R=outbound T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => queue_only_2@test.ex R=outbound T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <queue_only_1@test.ex> R=discard_remote_source
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <queue_only_2@test.ex> R=discard_remote_source
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => first_pass_route_1@test.ex R=outbound T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbD-0005vi-00 => first_pass_route_2@test.ex R=outbound T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4]* C="250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex H=(me) [127.0.0.1] P=smtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex H=(me) [127.0.0.1] P=smtp S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex H=the.local.host.name [ip4.ip4.ip4.ip4] P=esmtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex H=the.local.host.name [ip4.ip4.ip4.ip4] P=esmtp S=sss
+1999-03-02 09:44:33 10HmbA-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@test.ex H=(me) [127.0.0.1] P=smtp S=sss
+1999-03-02 09:44:33 10HmbB-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@test.ex H=(me) [127.0.0.1] P=smtp S=sss
+1999-03-02 09:44:33 10HmbD-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbB-0005vi-00 == first_pass_route_1@test.ex R=outbound T=smtp defer (0): SMTP delivery explicitly queued
+1999-03-02 09:44:33 10HmbD-0005vi-00 == first_pass_route_2@test.ex R=outbound T=smtp defer (0): SMTP delivery explicitly queued
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@test.ex H=the.local.host.name [ip4.ip4.ip4.ip4] P=esmtp S=sss
+1999-03-02 09:44:33 10HmbC-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <first_pass_route_1@test.ex> R=discard_remote_source
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@test.ex H=the.local.host.name [ip4.ip4.ip4.ip4] P=esmtp S=sss
+1999-03-02 09:44:33 10HmbE-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <first_pass_route_2@test.ex> R=discard_remote_source
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
diff --git a/test/scripts/0000-Basic/0599 b/test/scripts/0000-Basic/0599
new file mode 100644
index 000000000..aa712de2f
--- /dev/null
+++ b/test/scripts/0000-Basic/0599
@@ -0,0 +1,76 @@
+# control = queue/first_pass_route
+#
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+# First, control=queue_only - we expact the queue run to make separate connections
+client 127.0.0.1 PORT_D
+??? 220
+HELO me
+??? 250
+MAIL FROM:<CALLER@test.ex>
+??? 250
+RCPT TO:<queue_only_1@test.ex>
+??? 250
+DATA
+??? 354
+Subject: 1
+.
+??? 250
+RSET
+??? 250
+MAIL FROM:<CALLER@test.ex>
+??? 250
+RCPT TO:<queue_only_2@test.ex>
+??? 250
+DATA
+??? 354
+Subject: 2
+.
+??? 250
+QUIT
+****
+exim -q
+****
+exim -q
+****
+#
+# Second, control=queue/first_pass_route - we expect the queue run to make only one
+# connection, and put both messages over it
+client 127.0.0.1 PORT_D
+??? 220
+HELO me
+??? 250
+MAIL FROM:<CALLER@test.ex>
+??? 250
+RCPT TO:<first_pass_route_1@test.ex>
+??? 250
+DATA
+??? 354
+Subject: 1
+.
+??? 250
+RSET
+??? 250
+MAIL FROM:<CALLER@test.ex>
+??? 250
+RCPT TO:<first_pass_route_2@test.ex>
+??? 250
+DATA
+??? 354
+Subject: 2
+.
+??? 250
+QUIT
+****
+# give time for the background routing in the exim daemon to complete
+sleep 1
+# then run the queue
+exim -q
+****
+exim -q
+****
+#
+#
+killdaemon
+no_msglog_check
diff --git a/test/stderr/0055 b/test/stderr/0055
index c9729ad2e..e3789a44c 100644
--- a/test/stderr/0055
+++ b/test/stderr/0055
@@ -28,7 +28,7 @@ LOG: MAIN
<= CALLER@myhost.ex U=CALLER P=local S=sss
delivering 10HmbC-0005vi-00
LOG: MAIN
- == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+ == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
LOG: queue_run MAIN
Start queue run: pid=pppp
delivering 10HmbC-0005vi-00 (queue run pid ppppp)
@@ -58,7 +58,7 @@ LOG: MAIN
<= CALLER@myhost.ex U=CALLER P=local S=sss
delivering 10HmbF-0005vi-00
LOG: MAIN
- == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+ == xxx@ten-2.test.ex R=lookuphost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
delivering 10HmbF-0005vi-00
LOG: MAIN
*> xxx@ten-2.test.ex R=lookuphost T=smtp H=ten-2.test.ex [V4NET.0.0.2] C="delivery bypassed by -N option"
diff --git a/test/stderr/0544 b/test/stderr/0544
index 4f4e07b02..026c28623 100644
--- a/test/stderr/0544
+++ b/test/stderr/0544
@@ -130,9 +130,9 @@ dropping to exim gid; retaining priv uid
╰─────result: domain1.ex
╰──(tainted)
LOG: MAIN
- == userx@domain1.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+ == userx@domain1.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
LOG: MAIN
- == userx@domain2.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set
+ == userx@domain2.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue
╭considering: ${if or {{ !eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}}
╭considering: $h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}}
├──expanding: $h_list-id:$h_list-post:$h_list-subscribe:
diff --git a/test/stdout/0599 b/test/stdout/0599
new file mode 100644
index 000000000..ee9dd950a
--- /dev/null
+++ b/test/stdout/0599
@@ -0,0 +1,74 @@
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> HELO me
+??? 250
+<<< 250 the.local.host.name Hello me [127.0.0.1]
+>>> MAIL FROM:<CALLER@test.ex>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<queue_only_1@test.ex>
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: 1
+>>> .
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> RSET
+??? 250
+<<< 250 Reset OK
+>>> MAIL FROM:<CALLER@test.ex>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<queue_only_2@test.ex>
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: 2
+>>> .
+??? 250
+<<< 250 OK id=10HmaZ-0005vi-00
+>>> QUIT
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> HELO me
+??? 250
+<<< 250 the.local.host.name Hello me [127.0.0.1]
+>>> MAIL FROM:<CALLER@test.ex>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<first_pass_route_1@test.ex>
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: 1
+>>> .
+??? 250
+<<< 250 OK id=10HmbB-0005vi-00
+>>> RSET
+??? 250
+<<< 250 Reset OK
+>>> MAIL FROM:<CALLER@test.ex>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<first_pass_route_2@test.ex>
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: 2
+>>> .
+??? 250
+<<< 250 OK id=10HmbD-0005vi-00
+>>> QUIT
+End of script