diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/confs/5700 | 47 | ||||
-rw-r--r-- | test/log/5700 | 51 | ||||
-rw-r--r-- | test/scripts/5700-events/5700 | 20 | ||||
-rw-r--r-- | test/stdout/5700 | 19 |
4 files changed, 92 insertions, 45 deletions
diff --git a/test/confs/5700 b/test/confs/5700 index 7a060cdb6..db1aa2a6e 100644 --- a/test/confs/5700 +++ b/test/confs/5700 @@ -46,6 +46,18 @@ ev_msg_fail: 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 @@ -57,29 +69,21 @@ ev_msg: logwrite = $this_expansion_will_fail accept condition = ${if eq {$event_name}{msg:delivery}} - logwrite = . \ - delivery \ - ip <$host_address> \ - port <$host_port> \ - fqdn <$host> \ - local_part <$local_part> \ - domain <$domain> \ - confirmation <$event_data> \ - router <$router_name> \ - transport <$transport_name> + acl = ev_msg_log delivery "confirmation <$event_data>" accept condition = ${if eq {$event_name}{msg:host:defer}} - logwrite = . \ - deferral \ - ip <$host_address> \ - port <$host_port> \ - fqdn <$host> \ - local_part <$local_part> \ - domain <$domain> \ - errno <$event_defer_errno> \ - errstr <$event_data> \ - router <$router_name> \ - transport <$transport_name> + 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 @@ -105,6 +109,7 @@ others: route_list = * 127.0.0.1 byname self = send transport = smtp + errors_to = "" no_more diff --git a/test/log/5700 b/test/log/5700 index 6af2a9011..37eace605 100644 --- a/test/log/5700 +++ b/test/log/5700 @@ -41,17 +41,32 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224 1999-03-02 09:44:33 10HmaZ-0005vi-00 H=127.0.0.1 [127.0.0.1]: SMTP timeout after EHLO the.local.host.name: Connection timed out 1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:host:defer -1999-03-02 09:44:33 10HmaZ-0005vi-00 . deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> errno <110> errstr <SMTP timeout after EHLO the.local.host.name: Connection timed out> router <others> transport <smtp> +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 <userx> domain <domain1> errno <110> errstr <SMTP timeout after EHLO the.local.host.name: Connection timed out> router <others> transport <smtp> 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 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 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 1999-03-02 09:44:33 10HmaZ-0005vi-00 . finished: 10HmaZ-0005vi-00 +1999-03-02 09:44:33 10HmbA-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 10HmbA-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmbA-0005vi-00 . [127.0.0.1]:1111 +1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect +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 . banner <220 ESMTP> +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 . rcpt deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> err <12865>:<A:450> errstr <SMTP error from remote mail server after RCPT TO:<userx@domain1>: 450 NOT RIGHT NOW> router <others> transport <smtp> +1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:close +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:<userx@domain1>: 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 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 +1999-03-02 09:44:33 10HmbA-0005vi-00 . finished: 10HmbA-0005vi-00 +1999-03-02 09:44:33 End queue run: pid=pppp -qqf 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 @@ -64,24 +79,20 @@ 1999-03-02 09:44:33 10HmbB-0005vi-00 ** userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<userx@domain1>: 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 userx@domain1: error ignored 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 10HmbC-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 cancelled by CALLER +1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:fail:internal +1999-03-02 09:44:33 10HmbC-0005vi-00 . local_part <userx> domain <domain1> reason <delivery cancelled by administrator> +1999-03-02 09:44:33 10HmbD-0005vi-00 <= <> R=10HmbC-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbD-0005vi-00 => :blackhole: <CALLER@the.local.host.name> R=dump_bounces 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 +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 diff --git a/test/scripts/5700-events/5700 b/test/scripts/5700-events/5700 index f7cd8272c..8fb2010f2 100644 --- a/test/scripts/5700-events/5700 +++ b/test/scripts/5700-events/5700 @@ -1,5 +1,5 @@ # Arbitrary expansion after transport -# (EXPERIMENTAL_TPDA) +# (EXPERIMENTAL_EVENT) # need_ipv4 # @@ -67,6 +67,24 @@ A message which will hit a timeout at the destination server # # exim -odq userx@domain1 +A message which will get deferred +**** +server PORT_S +220 ESMTP +EHLO +250-OK +250 HELP +MAIL +250 OK +RCPT +450 NOT RIGHT NOW +QUIT +220 OK +**** +exim -qqf +**** +# +exim -odq userx@domain1 A message which will get refused **** server PORT_S diff --git a/test/stdout/5700 b/test/stdout/5700 index b185dca05..a8f3b7482 100644 --- a/test/stdout/5700 +++ b/test/stdout/5700 @@ -6,7 +6,7 @@ Connection request from [127.0.0.1] EHLO the.local.host.name 250-OK 250 HELP -MAIL FROM:<CALLER@the.local.host.name> +MAIL FROM:<> 250 OK RCPT TO:<userx@domain1> 250 OK @@ -32,7 +32,7 @@ Connection request from [127.0.0.1] EHLO the.local.host.name 250-OK 250 HELP -MAIL FROM:<CALLER@the.local.host.name> +MAIL FROM:<> 250 OK RCPT TO:<userx@domain2> 250 OK @@ -64,7 +64,20 @@ Connection request from [127.0.0.1] EHLO the.local.host.name 250-OK 250 HELP -MAIL FROM:<CALLER@the.local.host.name> +MAIL FROM:<> +250 OK +RCPT TO:<userx@domain1> +450 NOT RIGHT NOW +QUIT +220 OK +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:<> 250 OK RCPT TO:<userx@domain1> 550 GO AWAY |