WIP: allow_insecure_tainted_data
[users/heiko/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 logger:
79     warn   logwrite = event $event_name
80     accept condition = ${if eq {tcp} {${listextract{1}{$event_name}}}}
81            acl = ev_tcp
82     accept condition = ${if eq {smtp} {${listextract{1}{$event_name}}}}
83            acl = ev_smtp
84     accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
85            acl = ev_msg
86     accept logwrite =   UNEXPECTED $event_name