Commit | Line | Data |
---|---|---|
37ff4e03 | 1 | # Exim test configuration 0567 |
e7568d51 TL |
2 | |
3 | CONNECTCOND= | |
4 | ||
d4dc049f JH |
5 | .include DIR/aux-var/std_conf_prefix |
6 | ||
e7568d51 | 7 | primary_hostname = myhost.test.ex |
e7568d51 TL |
8 | |
9 | # ----- Main settings ----- | |
10 | ||
11 | acl_smtp_connect = connect | |
12 | acl_smtp_mail = mail | |
13 | acl_smtp_rcpt = rcpt | |
14 | acl_smtp_predata = predata | |
15 | acl_smtp_data = data | |
16 | acl_not_smtp = notsmtp | |
17 | ||
18 | qualify_domain = test.ex | |
19 | trusted_users = CALLER | |
20 | ||
21 | hostlist internal_headers = x-mail-2 : x-mail-3 | |
22 | ||
23 | ||
24 | # ----- ACL ----- | |
25 | ||
26 | begin acl | |
27 | ||
28 | connect: | |
29 | accept CONNECTCOND | |
30 | ||
31 | mail: | |
32 | accept remove_header = x-mail-1 | |
33 | senders = mailok@test.ex | |
34 | # Won't work because doesn't expand | |
35 | remove_header = +internal_headers | |
36 | accept | |
37 | ||
38 | rcpt: | |
39 | accept local_parts = rcptok | |
40 | remove_header = x-rcpt-4 : x-rcpt-2 | |
41 | set acl_m_hdr = x-predata-1 | |
42 | deny add_header = RCPT: denied $local_part | |
43 | ||
44 | ||
45 | predata: | |
46 | warn remove_header = x-predata-3 : $acl_m_hdr | |
47 | # Won't work because doesn't use wildcards | |
48 | accept remove_header = x-not-* | |
49 | ||
50 | data: | |
51 | warn log_message = Verified previously removed header X-Rcpt-2 | |
52 | condition = ${if eq{$h_x-rcpt-2:}{}} | |
53 | warn remove_header = x-data-1 : x-data-4 | |
54 | condition = ${if eq{$h_cond:}{accept}} | |
55 | remove_header = x-data-3 | |
56 | # Won't delete this header because condition fails before the modifier | |
57 | warn condition = ${if eq{$h_cond:}{reject}} | |
58 | remove_header = x-data-2 | |
59 | warn log_message = Verified removed header X-Data-3 in this ACL still visible | |
60 | condition = ${if !eq{$h_x-data-3:}{}} | |
61 | accept | |
62 | ||
63 | notsmtp: | |
64 | # Will remove a required header (Date) if told to | |
65 | accept remove_header = x-notsmtp-1 : date | |
66 | ||
67 | ||
68 | # ----- Routers ----- | |
69 | ||
70 | begin routers | |
71 | ||
72 | r1: | |
73 | driver = accept | |
74 | transport = t1 | |
75 | ||
76 | ||
77 | # ----- Transports ----- | |
78 | ||
79 | begin transports | |
80 | ||
81 | t1: | |
82 | driver = appendfile | |
83 | file = DIR/test-mail/$local_part | |
84 | user = CALLER | |
85 | ||
86 | # End |