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