summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2014-08-27 17:00:39 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2014-08-27 17:00:39 +0100
commit14a465c3f0ae93b383f57f12b2ac8709ac0d55b6 (patch)
treedf75da618ff9850038996f7c998e6068e6e557da /test
parent0e941a381173bcd17d96fab5c5c1a5c9b4b82ddc (diff)
Further TPDA events
msg:complete msg:fail:internal msg:fail:delivery
Diffstat (limited to 'test')
-rw-r--r--test/confs/570030
-rw-r--r--test/log/570041
-rw-r--r--test/scripts/5700-tpt-post-dlv-action/570032
-rw-r--r--test/stdout/570013
4 files changed, 110 insertions, 6 deletions
diff --git a/test/confs/5700 b/test/confs/5700
index 0856bb056..65a1b59ba 100644
--- a/test/confs/5700
+++ b/test/confs/5700
@@ -13,6 +13,8 @@ gecos_name = CALLER_NAME
acl_smtp_rcpt = accept
acl_smtp_data = accept
+delivery_event_action = ${acl {logger}}
+
# ----- ACL -----
@@ -32,11 +34,29 @@ ev_smtp:
[$host_address]:$host_port
logwrite = . banner <$tpda_data>
+ev_msg_fail:
+ accept condition = ${if eq {$tpda_event}{msg:fail:delivery}}
+ logwrite = . \
+ refused by fdqn <$host> \
+ local_part <$local_part> \
+ domain <$domain> \
+
+ accept logwrite = . \
+ local_part <$local_part> \
+ domain <$domain> \
+ reason <$tpda_data>
+
ev_msg:
- accept condition = ${if !eq {$acl_arg2}{domain1}}
+ accept condition = ${if eq {fail} {${listextract{2}{$tpda_event}}}}
+ acl = ev_msg_fail
+
+ accept condition = ${if eq {$tpda_event}{msg:complete}}
+ logwrite = . finished: $message_exim_id
+
+ accept condition = ${if !eq {$domain}{domain1}}
logwrite = $this_expansion_will_fail
- accept condition = ${if eq {$acl_arg1}{msg:delivery}}
+ accept condition = ${if eq {$tpda_event}{msg:delivery}}
logwrite = . \
delivery \
ip <$host_address> \
@@ -48,7 +68,7 @@ ev_msg:
router <$router_name> \
transport <$transport_name>
- accept condition = ${if eq {$acl_arg1}{msg:host:defer}}
+ accept condition = ${if eq {$tpda_event}{msg:host:defer}}
logwrite = . \
deferral \
ip <$host_address> \
@@ -68,7 +88,7 @@ logger:
accept condition = ${if eq {smtp} {${listextract{1}{$tpda_event}}}}
acl = ev_smtp
accept condition = ${if eq {msg} {${listextract{1}{$tpda_event}}}}
- acl = ev_msg $tpda_event $acl_arg2
+ acl = ev_msg
# ----- Routers -----
@@ -97,6 +117,6 @@ smtp:
port = PORT_S
command_timeout = 1s
final_timeout = 1s
- tpda_event_action = ${acl {logger} {$tpda_event} {$domain} }
+ tpda_event_action = ${acl {logger}}
# End
diff --git a/test/log/5700 b/test/log/5700
index 150aef773..2bebd8cff 100644
--- a/test/log/5700
+++ b/test/log/5700
@@ -11,6 +11,8 @@
1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:delivery
1999-03-02 09:44:33 10HmaY-0005vi-00 . delivery ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> confirmation <250 OK> router <others> transport <smtp>
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 10HmaY-0005vi-00 . finished: 10HmaY-0005vi-00
1999-03-02 09:44:33 End queue run: pid=pppp -qqf
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
1999-03-02 09:44:33 Start queue run: pid=pppp -qqf
@@ -26,6 +28,8 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand tpda_event_action msg:delivery in smtp: error from acl "logger"
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 10HmaX-0005vi-00 . finished: 10HmaX-0005vi-00
1999-03-02 09:44:33 End queue run: pid=pppp -qqf
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaZ-0005vi-00 event tcp:connect
@@ -43,4 +47,41 @@
1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss
1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <CALLER@the.local.host.name> R=dump_bounces
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 10HmbA-0005vi-00 . finished: 10HmbA-0005vi-00
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 10HmaZ-0005vi-00 . finished: 10HmaZ-0005vi-00
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp -qqf
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1]:-1
+1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224
+1999-03-02 09:44:33 10HmbB-0005vi-00 . banner <220 ESMTP>
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224
+1999-03-02 09:44:33 10HmbB-0005vi-00 ** userx@domain1 R=others T=smtp: SMTP error from remote mail server after RCPT TO:<userx@domain1>: host 127.0.0.1 [127.0.0.1]: 550 GO AWAY
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:fail:delivery
+1999-03-02 09:44:33 10HmbB-0005vi-00 . refused by fdqn <127.0.0.1> local_part <userx> domain <domain1>
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <CALLER@the.local.host.name> R=dump_bounces
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbC-0005vi-00 . finished: 10HmbC-0005vi-00
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbB-0005vi-00 . finished: 10HmbB-0005vi-00
+1999-03-02 09:44:33 End queue run: pid=pppp -qqf
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbD-0005vi-00 cancelled by CALLER
+1999-03-02 09:44:33 10HmbD-0005vi-00 event msg:fail:internal
+1999-03-02 09:44:33 10HmbD-0005vi-00 . local_part <userx> domain <domain1> reason <delivery cancelled by administrator>
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= <> R=10HmbD-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <CALLER@the.local.host.name> R=dump_bounces
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbE-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbE-0005vi-00 . finished: 10HmbE-0005vi-00
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbD-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbD-0005vi-00 . finished: 10HmbD-0005vi-00
diff --git a/test/scripts/5700-tpt-post-dlv-action/5700 b/test/scripts/5700-tpt-post-dlv-action/5700
index b85231b6e..f7cd8272c 100644
--- a/test/scripts/5700-tpt-post-dlv-action/5700
+++ b/test/scripts/5700-tpt-post-dlv-action/5700
@@ -1,4 +1,4 @@
-# Arbtirary expansion after transport
+# Arbitrary expansion after transport
# (EXPERIMENTAL_TPDA)
#
need_ipv4
@@ -62,3 +62,33 @@ A message which will hit a timeout at the destination server
.
****
#
+#
+#
+#
+#
+exim -odq userx@domain1
+A message which will get refused
+****
+server PORT_S
+220 ESMTP
+EHLO
+250-OK
+250 HELP
+MAIL
+250 OK
+RCPT
+550 GO AWAY
+QUIT
+220 OK
+****
+exim -qqf
+****
+#
+#
+#
+#
+exim -odq userx@domain1
+A message we will cancel from the queue
+****
+exim -odi -Mg $msg1
+****
diff --git a/test/stdout/5700 b/test/stdout/5700
index a45b44c87..b185dca05 100644
--- a/test/stdout/5700
+++ b/test/stdout/5700
@@ -58,3 +58,16 @@ Connection request from [127.0.0.1]
EHLO the.local.host.name
*sleep 4
End of script
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 ESMTP
+EHLO the.local.host.name
+250-OK
+250 HELP
+MAIL FROM:<CALLER@the.local.host.name>
+250 OK
+RCPT TO:<userx@domain1>
+550 GO AWAY
+QUIT
+220 OK
+End of script