From ffbc20ed9c9ed09a68ff0a608f623c3c83d521a8 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Fri, 28 Sep 2018 19:04:55 +0100 Subject: [PATCH] Events: Fire msg:fail:delivery event even when error is being ignored. Bug 2314 --- doc/doc-txt/ChangeLog | 5 +++ src/src/deliver.c | 18 ++++++-- test/aux-fixed/5702.filter | 3 ++ test/aux-fixed/5703.filter | 3 ++ test/aux-fixed/event-logger-acl | 74 ++++++++++++++++++++++++++++++++ test/confs/5700 | 75 +-------------------------------- test/confs/5701 | 40 ++++++++++++++++++ test/confs/5702 | 43 +++++++++++++++++++ test/confs/5703 | 43 +++++++++++++++++++ test/log/5700 | 6 ++- test/log/5701 | 20 +++++++++ test/log/5702 | 20 +++++++++ test/log/5703 | 32 ++++++++++++++ test/scripts/5700-events/5700 | 2 +- test/scripts/5700-events/5701 | 19 +++++++++ test/scripts/5700-events/5702 | 26 ++++++++++++ test/scripts/5700-events/5703 | 20 +++++++++ test/stdout/5700 | 4 +- test/stdout/5702 | 31 ++++++++++++++ test/stdout/5703 | 17 ++++++++ 20 files changed, 419 insertions(+), 82 deletions(-) create mode 100644 test/aux-fixed/5702.filter create mode 100644 test/aux-fixed/5703.filter create mode 100644 test/aux-fixed/event-logger-acl create mode 100644 test/confs/5701 create mode 100644 test/confs/5702 create mode 100644 test/confs/5703 create mode 100644 test/log/5701 create mode 100644 test/log/5702 create mode 100644 test/log/5703 create mode 100644 test/scripts/5700-events/5701 create mode 100644 test/scripts/5700-events/5702 create mode 100644 test/scripts/5700-events/5703 create mode 100644 test/stdout/5702 create mode 100644 test/stdout/5703 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 8d64dd4b0..0f50318f7 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -129,6 +129,11 @@ JH/27 Fix logging of proxy address. Previously, a pointless "PRX=[]:0" would be included in delivery lines for non-proxied connections, when compiled with SUPPORT_SOCKS and running with proxy logging enabled. +JH/28 Bug 2314: Fire msg:fail:delivery event even when error is being ignored. + Developement by Matthias Kurz, tweaked by JH. While in that bit of code, + move the existing event to fire before the normal logging of message + failure so that custom logging is bracketed by normal logging. + Exim version 4.91 ----------------- diff --git a/src/src/deliver.c b/src/src/deliver.c index 9ab740288..bba343c55 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -890,6 +890,7 @@ deliver_host = addr->host_used ? addr->host_used->name : NULL; addr->host_used || Ustrcmp(addr->transport->driver_name, "smtp") == 0 || Ustrcmp(addr->transport->driver_name, "lmtp") == 0 + || Ustrcmp(addr->transport->driver_name, "autoreply") == 0 ? addr->message : NULL); deliver_host_port = save_port; @@ -1383,6 +1384,16 @@ failure_log(address_item * addr, uschar * driver_kind, uschar * now) void * reset_point; gstring * g = reset_point = string_get(256); +#ifndef DISABLE_EVENT +/* Message failures for which we will send a DSN get their event raised +later so avoid doing it here. */ + +if ( !addr->prop.ignore_error + && !(addr->dsn_flags & (rf_dsnflags & ~rf_notify_failure)) + ) + msg_event_raise(US"msg:fail:delivery", addr); +#endif + /* Build up the log line for the message and main logs */ /* Create the address string for logging. Must not do this earlier, because @@ -1431,10 +1442,6 @@ else log_write(0, LOG_MAIN, "** %s", g->s); -#ifndef DISABLE_EVENT -msg_event_raise(US"msg:fail:delivery", addr); -#endif - store_reset(reset_point); return; } @@ -7445,6 +7452,9 @@ while (addr_failed) addr_failed = addr->next; if (addr->return_filename) Uunlink(addr->return_filename); +#ifndef DISABLE_EVENT + msg_event_raise(US"msg:fail:delivery", addr); +#endif log_write(0, LOG_MAIN, "%s%s%s%s: error ignored", addr->address, !addr->parent ? US"" : US" <", 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 diff --git a/test/confs/5700 b/test/confs/5700 index e1ce38eae..774e76605 100644 --- a/test/confs/5700 +++ b/test/confs/5700 @@ -15,80 +15,7 @@ event_action = ${acl {logger}} begin acl -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}{domain1}} - 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 +.include DIR/aux-fixed/event-logger-acl # ----- Routers ----- diff --git a/test/confs/5701 b/test/confs/5701 new file mode 100644 index 000000000..ff050ffb8 --- /dev/null +++ b/test/confs/5701 @@ -0,0 +1,40 @@ +# Exim test configuration 5701 + +.include DIR/aux-var/std_conf_prefix + +# ----- Main settings ----- + +event_action = ${acl {logger}} + +# ----- ACL ----- + +begin acl + +.include DIR/aux-fixed/event-logger-acl + +# ----- Routers ----- + +begin routers + +router_filter: + driver = redirect + reply_transport = reply + local_parts = userx-filter + allow_filter + data = #Exim filter\n seen mail text "This is an autoreply." + user = EXIMUSER + +others: + driver = redirect + data = :blackhole: + +# ----- Transports ----- + +begin transports + +reply: + driver = autoreply + to = $reply_address + event_action = ${acl {logger}} + +# End diff --git a/test/confs/5702 b/test/confs/5702 new file mode 100644 index 000000000..dfc063fa7 --- /dev/null +++ b/test/confs/5702 @@ -0,0 +1,43 @@ +# Exim test configuration 5702 + +.include DIR/aux-var/std_conf_prefix + +# ----- Main settings ----- + +event_action = ${acl {logger}} + +# ----- ACL ----- + +begin acl + +.include DIR/aux-fixed/event-logger-acl + +# ----- Routers ----- + +begin routers + +route_userx: + driver = redirect + local_parts = userx + allow_filter + file = DIR/aux-fixed/TESTNUM.filter + user = EXIMUSER + no_more + +route_smtp: + driver = manualroute + route_list = * 127.0.0.1 byname + self = send + transport = smtp + no_more + +# ----- Transports ----- + +begin transports + +smtp: + driver = smtp + port = PORT_S + event_action = ${acl {logger}} + +# End diff --git a/test/confs/5703 b/test/confs/5703 new file mode 100644 index 000000000..267f5fc8d --- /dev/null +++ b/test/confs/5703 @@ -0,0 +1,43 @@ +# Exim test configuration 5703 + +.include DIR/aux-var/std_conf_prefix + +# ----- Main settings ----- + +event_action = ${acl {logger}} + +# ----- ACL ----- + +begin acl + +.include DIR/aux-fixed/event-logger-acl + +# ----- Routers ----- + +begin routers + +route_userx: + driver = redirect + local_parts = userx + allow_filter + file = DIR/aux-fixed/TESTNUM.filter + user = EXIMUSER + no_more + +route_smtp: + driver = manualroute + route_list = * 127.0.0.1 byname + self = send + transport = smtp + no_more + +# ----- Transports ----- + +begin transports + +smtp: + driver = smtp + port = PORT_S + event_action = ${acl {logger}} + +# End diff --git a/test/log/5700 b/test/log/5700 index eda35bca7..6edadc9ce 100644 --- a/test/log/5700 +++ b/test/log/5700 @@ -23,7 +23,7 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 . banner <220 ESMTP> 1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:close 1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 -1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain2 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@expansionfail R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:delivery 1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger" @@ -44,6 +44,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 . host deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part domain errno errstr router transport 1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@domain1 R=others T=smtp defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after EHLO the.local.host.name 1999-03-02 09:44:33 10HmaZ-0005vi-00 ** userx@domain1: retry timeout exceeded +1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaZ-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr 1999-03-02 09:44:33 10HmaZ-0005vi-00 userx@domain1: error ignored 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:complete @@ -62,6 +64,8 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 1999-03-02 09:44:33 10HmbA-0005vi-00 == userx@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 NOT RIGHT NOW 1999-03-02 09:44:33 10HmbA-0005vi-00 ** userx@domain1: retry timeout exceeded +1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmbA-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr : 450 NOT RIGHT NOW: retry timeout exceeded> 1999-03-02 09:44:33 10HmbA-0005vi-00 userx@domain1: error ignored 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed 1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:complete diff --git a/test/log/5701 b/test/log/5701 new file mode 100644 index 000000000..7dfde51bd --- /dev/null +++ b/test/log/5701 @@ -0,0 +1,20 @@ +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 10HmaX-0005vi-00 ** >**bad-reply** R=router_filter T=reply: filter autoreply generated syntactically invalid recipient +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 . refused by fdqn <> local_part <>**bad-reply**> domain <> errstr +1999-03-02 09:44:33 10HmaX-0005vi-00 >**bad-reply** : 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 10HmaX-0005vi-00 . finished: 10HmaX-0005vi-00 +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 => :blackhole: R=others +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 10HmaY-0005vi-00 => >userx@domain1 R=router_filter T=reply +1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:delivery +1999-03-02 09:44:33 10HmaY-0005vi-00 . delivery ip <> port <0> fqdn <> local_part <>userx@domain1> domain confirmation <> router transport +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 diff --git a/test/log/5702 b/test/log/5702 new file mode 100644 index 000000000..66e2b9003 --- /dev/null +++ b/test/log/5702 @@ -0,0 +1,20 @@ +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 +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1]:1111 +1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 +1999-03-02 09:44:33 10HmaX-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:close +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 +1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain1 R=route_smtp T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 . delivery ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part domain confirmation <250 OK> router transport +1999-03-02 09:44:33 10HmaX-0005vi-00 ** usery@domain1 R=route_smtp T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 Not that one +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr : 550 Not that one> +1999-03-02 09:44:33 10HmaX-0005vi-00 usery@domain1 : 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 10HmaX-0005vi-00 . finished: 10HmaX-0005vi-00 +1999-03-02 09:44:33 End queue run: pid=pppp -qqf diff --git a/test/log/5703 b/test/log/5703 new file mode 100644 index 000000000..ab707c051 --- /dev/null +++ b/test/log/5703 @@ -0,0 +1,32 @@ +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 +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1]:1111 +1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 +1999-03-02 09:44:33 10HmaX-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:close +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr : 550 Not that one> +1999-03-02 09:44:33 10HmaX-0005vi-00 ** usery@domain1 R=route_smtp T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 Not that one +1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmaY-0005vi-00 . [127.0.0.1]:1111 +1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:close +1999-03-02 09:44:33 10HmaY-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 +1999-03-02 09:44:33 10HmaY-0005vi-00 H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to initial connection +1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:host:defer +1999-03-02 09:44:33 10HmaY-0005vi-00 . host deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part domain errno <-18> errstr router transport +1999-03-02 09:44:33 10HmaY-0005vi-00 == CALLER@the.local.host.name R=route_smtp T=smtp defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to initial connection +1999-03-02 09:44:33 10HmaY-0005vi-00 ** CALLER@the.local.host.name: retry timeout exceeded +1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaY-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr +1999-03-02 09:44:33 10HmaY-0005vi-00 CALLER@the.local.host.name: error ignored +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 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 diff --git a/test/scripts/5700-events/5700 b/test/scripts/5700-events/5700 index 42735dbc7..89b0c5cd5 100644 --- a/test/scripts/5700-events/5700 +++ b/test/scripts/5700-events/5700 @@ -29,7 +29,7 @@ exim -qqf # # # -exim -odq userx@domain2 +exim -odq userx@expansionfail A deliverable message which will hit a coding error in the config **** server PORT_S diff --git a/test/scripts/5700-events/5701 b/test/scripts/5700-events/5701 new file mode 100644 index 000000000..50e1c27c3 --- /dev/null +++ b/test/scripts/5700-events/5701 @@ -0,0 +1,19 @@ +# Events for syntactically invalid generated recipient on autoreply +# +exim -odi userx-filter@domain1 +Subject: Bad from +From: "something" x@y + +This is a test with a syntactically bad From: line and we process it +with a filter and fire events. +**** +# +# +# +# +exim -odi userx-filter@domain1 +Subject: Good from +From: "User X" + +This is a test we process with a filter and fire events. +**** diff --git a/test/scripts/5700-events/5702 b/test/scripts/5700-events/5702 new file mode 100644 index 000000000..b970ec090 --- /dev/null +++ b/test/scripts/5700-events/5702 @@ -0,0 +1,26 @@ +# Raise msg:fail:delivery when an error, originated by a filter, gets ignored. +# +exim -odq userx@domain1 +Also try to deliver this message to usery via a filter deliver command. +However that fails. But because of the noerror cmd the error just gets ignored. +**** +server PORT_S +220 ESMTP +EHLO +250-OK +250 HELP +MAIL +250 OK +RCPT +250 OK +RCPT +550 Not that one +DATA +354 More... +. +250 OK +QUIT +220 OK +**** +exim -qqf +**** diff --git a/test/scripts/5700-events/5703 b/test/scripts/5700-events/5703 new file mode 100644 index 000000000..54fd48544 --- /dev/null +++ b/test/scripts/5700-events/5703 @@ -0,0 +1,20 @@ +# Raise msg:fail:delivery when an error of a failed bounce gets ignored. +# +exim -odq userx@domain1 +Try to deliver this message to usery via a filter deliver "redirect". +However that fails. Later the bounce also fails. +**** +server PORT_S 2 +220 ESMTP +EHLO +250-OK +250 HELP +MAIL +250 OK +RCPT +550 Not that one +QUIT +220 OK +**** +exim -qqf +**** diff --git a/test/stdout/5700 b/test/stdout/5700 index 066f6ceec..98ba767c1 100644 --- a/test/stdout/5700 +++ b/test/stdout/5700 @@ -37,14 +37,14 @@ EHLO the.local.host.name 250 HELP MAIL FROM:<> 250 OK -RCPT TO: +RCPT TO: 250 OK DATA 354 More... Received: from CALLER by the.local.host.name with local (Exim x.yz) (envelope-from ) id 10HmaX-0005vi-00 - for userx@domain2; Tue, 2 Mar 1999 09:44:33 +0000 + for userx@expansionfail; Tue, 2 Mar 1999 09:44:33 +0000 Message-Id: From: CALLER_NAME Date: Tue, 2 Mar 1999 09:44:33 +0000 diff --git a/test/stdout/5702 b/test/stdout/5702 new file mode 100644 index 000000000..de07377f9 --- /dev/null +++ b/test/stdout/5702 @@ -0,0 +1,31 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +EHLO the.local.host.name +250-OK +250 HELP +MAIL FROM: +250 OK +RCPT TO: +250 OK +RCPT TO: +550 Not that one +DATA +354 More... +Received: from CALLER by the.local.host.name with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00 + for userx@domain1; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +Also try to deliver this message to usery via a filter deliver command. +However that fails. But because of the noerror cmd the error just gets ignored. +. +250 OK +QUIT +220 OK +End of script diff --git a/test/stdout/5703 b/test/stdout/5703 new file mode 100644 index 000000000..c171ca3b5 --- /dev/null +++ b/test/stdout/5703 @@ -0,0 +1,17 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +EHLO the.local.host.name +250-OK +250 HELP +MAIL FROM: +250 OK +RCPT TO: +550 Not that one +QUIT +220 OK +Listening on port 1224 ... +Connection request from [127.0.0.1] +End of script -- 2.25.1