Testsuite: munging change for new message-id format
[exim.git] / test / aux-fixed / event-logger-acl
1 ev_tcp:
2     accept condition = ${if eq {$event_name}{tcp:connect}}
3            logwrite = . [$host_address]:$host_port
4     accept condition = ${if eq {$event_name}{tcp:close}}
5            logwrite = . [$sending_ip_address] -> \
6                         [$host_address]:$host_port
7     accept logwrite =   UNEXPECTED $event_name
8
9 ev_smtp:
10     warn
11            logwrite = . [$sending_ip_address] -> \
12                         [$host_address]:$host_port
13     accept condition = ${if eq {$event_name}{smtp:connect}}
14            logwrite = . banner <$event_data>
15     accept condition = ${if eq {$event_name}{smtp:ehlo}}
16            logwrite = . ehlo-resp <$event_data>
17     accept logwrite =   UNEXPECTED $event_name
18
19 ev_msg_fail:
20     accept condition = ${if eq {$event_name}{msg:fail:delivery}}
21            logwrite = . \
22             refused by fdqn <$host> \
23             local_part <$local_part> \
24             domain <$domain> \
25             errstr <$event_data> \
26
27     accept logwrite = . \
28             local_part <$local_part> \
29             domain <$domain> \
30             reason <$event_data>
31
32 ev_msg_log:
33     accept logwrite = . \
34             $acl_arg1 \
35             ip <$host_address> \
36             port <$host_port> \
37             fqdn <$host> \
38             local_part <$local_part> \
39             domain <$domain> \
40             $acl_arg2 \
41             router <$router_name> \
42             transport <$transport_name>
43
44 ev_msg:
45     accept condition = ${if eq {fail} {${listextract{2}{$event_name}}}}
46            acl = ev_msg_fail
47
48     accept condition = ${if eq {$event_name}{msg:complete}}
49            logwrite = . finished: $message_exim_id
50
51     accept condition = ${if eq {$domain}{expansionfail}}
52            logwrite = $this_expansion_will_fail
53
54     accept condition = ${if eq {$event_name}{msg:delivery}}
55            acl = ev_msg_log delivery "confirmation <$event_data>"
56
57     accept condition = ${if eq {$event_name}{msg:defer}}
58            acl = ev_msg_log "message deferral" \
59                         "errno <$event_defer_errno> errstr <$event_data>"
60
61     accept condition = ${if eq {$event_name}{msg:host:defer}}
62            acl = ev_msg_log "host deferral" \
63                         "errno <$event_defer_errno> errstr <$event_data>"
64
65     accept condition = ${if eq {$event_name}{msg:rcpt:defer}}
66            set acl_m_ev_lkup =  ${eval:$event_defer_errno & 0xff}
67            set acl_m_ev_lkup =  ${if = {$acl_m_ev_lkup}{65} {A} \
68                                 { ${if = {$acl_m_ev_lkup}{77} {MX} \
69                                   {$acl_m_ev_lkup}}}}
70            set acl_m_ev_code =  4${eval:$event_defer_errno >>8}
71            acl = ev_msg_log "rcpt deferral" \
72                         "err <$event_defer_errno>:<$acl_m_ev_lkup:$acl_m_ev_code> \
73                         errstr <$event_data>"
74
75     accept condition = ${if eq {$event_name}{msg:rcpt:host:defer}}
76     accept logwrite =   UNEXPECTED $event_name
77
78 ev_auth:
79     accept condition = ${if eq {$event_name}{auth:fail}}
80            logwrite = . \
81                       "auth fail" \
82                       event_data <$event_data> \
83                       sender_host_authenticated <$sender_host_authenticated> \
84                       authenticated_fail_id <$authenticated_fail_id>
85
86     accept logwrite =   UNEXPECTED $event_name
87
88 logger:
89     warn   logwrite = event $event_name
90            set acl_m1 = ${listextract{1}{$event_name}}
91     accept condition =  ${if inlist{$acl_m1}{tcp:smtp:msg:auth}}
92            acl =        ev_$acl_m1
93     accept logwrite =   UNEXPECTED $event_name