summaryrefslogtreecommitdiff
path: root/test/aux-fixed
diff options
context:
space:
mode:
authorMatthias Kurz <m.kurz@irregular.at>2018-09-28 19:04:55 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-09-28 19:07:00 +0100
commitffbc20ed9c9ed09a68ff0a608f623c3c83d521a8 (patch)
treea7dfcd265ab8fe6c6b5c3a43d48aa1b1122ecfc3 /test/aux-fixed
parenteb58ddf5828a161dec94f131ff2c5c926c868354 (diff)
Events: Fire msg:fail:delivery event even when error is being ignored. Bug 2314
Diffstat (limited to 'test/aux-fixed')
-rw-r--r--test/aux-fixed/5702.filter3
-rw-r--r--test/aux-fixed/5703.filter3
-rw-r--r--test/aux-fixed/event-logger-acl74
3 files changed, 80 insertions, 0 deletions
diff --git a/test/aux-fixed/5702.filter b/test/aux-fixed/5702.filter
new file mode 100644
index 000000000..283d823da
--- /dev/null
+++ b/test/aux-fixed/5702.filter
@@ -0,0 +1,3 @@
+# Exim filter
+
+unseen noerror deliver usery@domain1
diff --git a/test/aux-fixed/5703.filter b/test/aux-fixed/5703.filter
new file mode 100644
index 000000000..3083624a8
--- /dev/null
+++ b/test/aux-fixed/5703.filter
@@ -0,0 +1,3 @@
+# Exim filter
+
+deliver usery@domain1
diff --git a/test/aux-fixed/event-logger-acl b/test/aux-fixed/event-logger-acl
new file mode 100644
index 000000000..62cba32d6
--- /dev/null
+++ b/test/aux-fixed/event-logger-acl
@@ -0,0 +1,74 @@
+ev_tcp:
+ accept condition = ${if eq {$event_name}{tcp:connect}}
+ logwrite = . [$host_address]:$host_port
+ accept condition = ${if eq {$event_name}{tcp:close}}
+ logwrite = . [$sending_ip_address] -> \
+ [$host_address]:$host_port
+ accept
+
+ev_smtp:
+ accept
+ logwrite = . [$sending_ip_address] -> \
+ [$host_address]:$host_port
+ logwrite = . banner <$event_data>
+
+ev_msg_fail:
+ accept condition = ${if eq {$event_name}{msg:fail:delivery}}
+ logwrite = . \
+ refused by fdqn <$host> \
+ local_part <$local_part> \
+ domain <$domain> \
+ errstr <$event_data> \
+
+ accept logwrite = . \
+ local_part <$local_part> \
+ domain <$domain> \
+ reason <$event_data>
+
+ev_msg_log:
+ accept logwrite = . \
+ $acl_arg1 \
+ ip <$host_address> \
+ port <$host_port> \
+ fqdn <$host> \
+ local_part <$local_part> \
+ domain <$domain> \
+ $acl_arg2 \
+ router <$router_name> \
+ transport <$transport_name>
+
+ev_msg:
+ accept condition = ${if eq {fail} {${listextract{2}{$event_name}}}}
+ acl = ev_msg_fail
+
+ accept condition = ${if eq {$event_name}{msg:complete}}
+ logwrite = . finished: $message_exim_id
+
+ accept condition = ${if eq {$domain}{expansionfail}}
+ logwrite = $this_expansion_will_fail
+
+ accept condition = ${if eq {$event_name}{msg:delivery}}
+ acl = ev_msg_log delivery "confirmation <$event_data>"
+
+ accept condition = ${if eq {$event_name}{msg:host:defer}}
+ acl = ev_msg_log "host deferral" \
+ "errno <$event_defer_errno> errstr <$event_data>"
+
+ accept condition = ${if eq {$event_name}{msg:rcpt:defer}}
+ set acl_m_ev_lkup = ${eval:$event_defer_errno & 0xff}
+ set acl_m_ev_lkup = ${if = {$acl_m_ev_lkup}{65} {A} \
+ { ${if = {$acl_m_ev_lkup}{77} {MX} \
+ {$acl_m_ev_lkup}}}}
+ set acl_m_ev_code = 4${eval:$event_defer_errno >>8}
+ acl = ev_msg_log "rcpt deferral" \
+ "err <$event_defer_errno>:<$acl_m_ev_lkup:$acl_m_ev_code> \
+ errstr <$event_data>"
+
+logger:
+ warn logwrite = event $event_name
+ accept condition = ${if eq {tcp} {${listextract{1}{$event_name}}}}
+ acl = ev_tcp
+ accept condition = ${if eq {smtp} {${listextract{1}{$event_name}}}}
+ acl = ev_smtp
+ accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
+ acl = ev_msg