Commit | Line | Data |
---|---|---|
afda344b PH |
1 | # Exim test configuration 0014 |
2 | ||
3 | exim_path = EXIM_PATH | |
4 | host_lookup_order = bydns | |
5 | primary_hostname = myhost.test.ex | |
afda344b PH |
6 | spool_directory = DIR/spool |
7 | log_file_path = DIR/spool/log/%slog | |
8 | gecos_pattern = "" | |
9 | gecos_name = CALLER_NAME | |
10 | ||
11 | # ----- Main settings ----- | |
12 | ||
13 | domainlist local_domains = test.ex : myhost.test.ex | |
14 | domainlist relay_domains = test.ex | |
15 | ||
16 | acl_smtp_rcpt = check_recipient | |
17 | ||
18 | trusted_users = CALLER | |
19 | ||
20 | ||
21 | # ----- ACL ----- | |
22 | ||
23 | begin acl | |
24 | ||
25 | check_recipient: | |
26 | accept hosts = : | |
27 | require verify = sender | |
28 | accept domains = +local_domains | |
29 | accept domains = +relay_domains | |
30 | deny message = relay not permitted | |
31 | ||
32 | ||
33 | # ----- Rewrite ----- | |
34 | ||
35 | begin rewrite | |
36 | ||
37 | *@*.one.two $1@one.two | |
38 | abcd@^qu aaa@bbb | |
39 | *pqr@^qu(.*) 1=$1@zz$2 | |
40 | hhhh@h.h.h.h "${if eq {$h_to:}{x@y}{yes}{no}}@j.j.j" | |
41 | ||
42 | ######################################################## | |
43 | # Fancy example of a supposed outgoing gateway rewrite # | |
44 | ######################################################## | |
45 | ||
46 | # No rewrite unless domain is *.plc.example | |
47 | ||
48 | ^(?>.*)(?<!\.plc\.example) * | |
49 | ||
50 | # Handle root specially except envelope to | |
51 | ||
52 | root@*.plc.example "admin@plc.example (root@$1)" whFq | |
53 | ||
54 | # Failure in envelope sender is bad - should fail to verify | |
55 | ||
56 | *@*.plc.example ${lookup{$local_part@$2}lsearch\ | |
57 | {DIR/aux-fixed/0014.usernames}\ | |
58 | {$value}{"$1@$2.plc.example-is-not-known"}}@plc.example Fq | |
59 | ||
60 | # Use envelope for failing header sender | |
61 | ||
62 | *@*.plc.example "${lookup{$local_part@$2}lsearch\ | |
63 | {DIR/aux-fixed/0014.usernames}{$value@plc.example}\ | |
64 | {$sender_address}}" fsrq | |
65 | ||
66 | # Other failures => `unknown' | |
67 | *@*.plc.example "${lookup{$local_part@$2}lsearch\ | |
68 | {DIR/aux-fixed/0014.usernames}{$value}{unknown}}@plc.example" | |
69 | ||
70 | ||
71 | # ----- Routers ----- | |
72 | ||
73 | begin routers | |
74 | ||
75 | fail: | |
76 | driver = manualroute | |
77 | domains = *.plc.example | |
78 | fail_verify | |
79 | route_list = * | |
80 | verify_only | |
81 | ||
82 | fail_remote_domains: | |
83 | driver = redirect | |
84 | domains = ! +local_domains | |
85 | allow_fail | |
86 | data = :fail: Unrouteable mail domain "$domain" | |
87 | ||
88 | userx: | |
89 | driver = accept | |
90 | local_parts = userx | |
91 | retry_use_local_part | |
92 | transport = appendfile | |
93 | ||
94 | ||
95 | # ----- Transports ----- | |
96 | ||
97 | begin transports | |
98 | ||
99 | appendfile: | |
100 | driver = appendfile | |
101 | file = DIR/test-mail/$local_part | |
102 | message_suffix = | |
103 | user = CALLER | |
104 | ||
105 | # End |