Move connect ACL before TLS-on-connect
[exim.git] / test / confs / 5711
1 # Exim test configuration 5711
2
3 .include DIR/aux-var/tls_conf_prefix
4
5 primary_hostname = myhost.test.ex
6
7 # ----- Main settings -----
8
9 acl_smtp_connect = check_conn
10 acl_smtp_quit =    accept logwrite = ACL quit
11 acl_smtp_notquit = accept logwrite = ACL notquit
12
13 tls_advertise_hosts = *
14 tls_certificate = DIR/aux-fixed/cert1
15
16 host_reject_connection = ${acl {hrc}}
17 event_action = ${acl {tls_fail}}
18
19 log_selector = +pid
20
21 # ------ ACL ------
22
23 begin acl
24
25 hrc:
26   warn          logwrite = eval host_reject_connection
27   accept        condition = ${if eq {$received_port}{PORT_D}}
28                 # no mesage= hence host_reject_connection should be empty
29   deny          condition = ${if eq {$received_port}{PORT_D2}}
30                 message = *
31                 # PORT_D2 gets a host_reject_connection
32
33 check_conn:
34   warn          logwrite =      ACL conn
35   deny          condition =     ${if eq {$received_port}{PORT_D3}}
36                 log_message =   we dislike you
37                 # PORT_D3 gets a conn ACL fail
38   accept
39
40 tls_fail:
41   warn          logwrite =  EV $event_name
42   accept        condition = ${if eq {tls:fail:connect}{$event_name}}
43                 logwrite =  EVDATA: $event_data
44   accept
45
46
47 # End