+# 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. Then, claiming time has elapsed,
+# we will look again (expecting a delay-DSN to be produced). We won't see a
+# retry since the actual retry time has not passed.
+exim -z defer/delay
+****
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<c@dump.ex>
+??? 250
+RCPT TO:<rmt_defer@test.ex> NOTIFY=delay
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+exim -q
+****
+#
+# Clients requests no DSNs, and this one gets deferred
+exim -z defer/never
+****
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<d@dump.ex>
+??? 250
+RCPT TO:<rmt_defer@test.ex> NOTIFY=never
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+exim -q
+****
+#
+#
+#
+# Second time, for the queued deferrals.
+# We should see the notify for c@dump.ex but not d@dump.ex
+exim -z playout
+****
+exim -Tqt 10s/ -q