[exim-cvs] Testsuite: rework testcases for DSN RCPT options

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Testsuite: rework testcases for DSN RCPT options
Gitweb: https://git.exim.org/exim.git/commitdiff/ba97ac87b13f2f7380621ca998174b25cc7b2532
Commit:     ba97ac87b13f2f7380621ca998174b25cc7b2532
Parent:     068f180d1c1bc1349c5a786ea7af214b2b24dcc6
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Nov 6 15:18:05 2018 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Nov 6 15:18:05 2018 +0000


    Testsuite: rework testcases for DSN RCPT options
---
 test/confs/0618              |  5 ++++
 test/log/0618                | 61 +++++++++++++++++++++++++++++---------------
 test/scripts/0000-Basic/0618 | 42 +++++++++++++++++++++++++-----
 test/stdout/0618             |  4 +--
 4 files changed, 83 insertions(+), 29 deletions(-)


diff --git a/test/confs/0618 b/test/confs/0618
index 2a2d8a9..db4bd30 100644
--- a/test/confs/0618
+++ b/test/confs/0618
@@ -44,6 +44,11 @@ rcpt:

begin routers

+r_dump:
+  driver =    redirect
+  domains =    dump.ex
+  data =    :blackhole:
+
 r1:
   driver =    accept
   condition =    ${if eq {127.0.0.1}{$sender_host_address}}
diff --git a/test/log/0618 b/test/log/0618
index 9707711..25ef4e7 100644
--- a/test/log/0618
+++ b/test/log/0618
@@ -1,3 +1,4 @@
+1999-03-02 09:44:33 rej/never
 1999-03-02 09:44:33 Start queue run: pid=pppp
 1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:connect
 1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:connect
@@ -7,6 +8,9 @@
 1999-03-02 09:44:33 10HmaX-0005vi-00 rmt_reject@???: error ignored
 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
 1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:complete
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 accept/success
+1999-03-02 09:44:33 Start queue run: pid=pppp
 1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:connect
 1999-03-02 09:44:33 10HmaY-0005vi-00 event smtp:connect
 1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:close
@@ -14,12 +18,21 @@
 1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:delivery
 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
 1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:complete
-1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:connect
-1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect
-1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:host:defer
-1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:defer
-1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:close
-1999-03-02 09:44:33 10HmbA-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+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 10HmaZ-0005vi-00 => rmt_accept <rmt_accept@???> R=r1 T=tofile
+1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:delivery
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss for b@???
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:complete
+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 10HmbA-0005vi-00 => :blackhole: <b@???> R=r_dump
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:complete
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 defer/delay
+1999-03-02 09:44:33 Start queue run: pid=pppp
 1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:connect
 1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect
 1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:host:defer
@@ -27,37 +40,43 @@
 1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close
 1999-03-02 09:44:33 10HmbB-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
 1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 defer/never
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 == rmt_defer@??? routing defer (-51): retry time not reached
+1999-03-02 09:44:33 10HmbC-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbC-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbC-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbC-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 playout
 1999-03-02 09:44:33 Start queue run: pid=pppp
-1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:connect
-1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect
-1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:host:defer
-1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:defer
-1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:close
-1999-03-02 09:44:33 10HmbA-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
-1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbA-0005vi-00 U=EXIMUSER P=local S=sss for c@???
 1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:connect
 1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect
 1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:host:defer
 1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:defer
 1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close
 1999-03-02 09:44:33 10HmbB-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => rmt_accept <rmt_accept@???> R=r1 T=tofile
-1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:delivery
-1999-03-02 09:44:33 10HmbD-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss for b@???
-1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss for c@???
+1999-03-02 09:44:33 10HmbC-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbC-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbC-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbC-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
 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 1225
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
1999-03-02 09:44:33 10HmaX-0005vi-00 <= a@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@???
-1999-03-02 09:44:33 10HmaY-0005vi-00 <= b@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_accept@???
-1999-03-02 09:44:33 10HmbA-0005vi-00 <= c@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
-1999-03-02 09:44:33 10HmbB-0005vi-00 <= d@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<a@???> rejected RCPT <rmt_reject@???>
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= b@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_accept@???
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= b@??? H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss for rmt_accept@???
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= c@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= d@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
diff --git a/test/scripts/0000-Basic/0618 b/test/scripts/0000-Basic/0618
index c093228..f841177 100644
--- a/test/scripts/0000-Basic/0618
+++ b/test/scripts/0000-Basic/0618
@@ -16,6 +16,8 @@ killdaemon
# Server does advertise when told. Client requests no bounces, and this one gets a reject.
exim -DSERVER=server -DOPT=y -bd -oX PORT_D
****
+exim -z rej/never
+****
client HOSTIPV4 PORT_D
??? 220
EHLO testclient
@@ -37,7 +39,12 @@ Subject: test
QUIT
??? 221
****
-# Client requests delivery notification; the server supports DSN to takes responsibility
+exim -q
+****
+#
+# Client requests delivery notification; the server supports DSN so takes responsibility
+exim -z accept/success
+****
client HOSTIPV4 PORT_D
??? 220
EHLO testclient
@@ -57,9 +64,22 @@ Subject: test
QUIT
??? 221
****
-# Client requests notification of deferral. First time of trying, the
-# queue-time probably has not hit the 1st retry time yet, so no DSN will
-# be sent and the message remains queued.
+# MSA send msg to MDA
+exim -q
+****
+# deliver msg at MDA
+exim -q
+****
+# deliver notification from MDA
+exim -q
+****
+#
+# Client requests notification of deferral. First time of trying, we get
+# a defer but queue-time probably has not hit the 1st retry time yet, so no DSN
+# will be sent and the message remains queued. Later, after a sleep, we will
+# try again.
+exim -z defer/delay
+****
client HOSTIPV4 PORT_D
??? 220
EHLO testclient
@@ -79,7 +99,12 @@ Subject: test
QUIT
??? 221
****
+exim -q
+****
+#
# Clients requests no DSNs, and this one gets deferred
+exim -z defer/never
+****
client HOSTIPV4 PORT_D
??? 220
EHLO testclient
@@ -99,11 +124,16 @@ Subject: test
QUIT
??? 221
****
-# This attemmpt the set of all the above, for the first time.
exim -q
****
sleep 3
-# Second time, for the queued deferrals. Final delivery for the acceptance.
+#
+#
+#
+# Second time, for the queued deferrals.
+# We should see the notify for c@??? but not d@???
+exim -z playout
+****
exim -q
****
killdaemon
diff --git a/test/stdout/0618 b/test/stdout/0618
index a04553a..0fbac17 100644
--- a/test/stdout/0618
+++ b/test/stdout/0618
@@ -94,7 +94,7 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
>>> Subject: test
>>> .

??? 250
-<<< 250 OK id=10HmbA-0005vi-00
+<<< 250 OK id=10HmbB-0005vi-00
>>> QUIT

??? 221
<<< 221 myhost.test.ex closing connection
@@ -123,7 +123,7 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
>>> Subject: test
>>> .

??? 250
-<<< 250 OK id=10HmbB-0005vi-00
+<<< 250 OK id=10HmbC-0005vi-00
>>> QUIT

??? 221
<<< 221 myhost.test.ex closing connection