Doc: clarify the syntax of the "begin <section>"
[exim.git] / test / confs / 3400
CommitLineData
afda344b
PH
1# Exim test configuration 3400
2
3exim_path = EXIM_PATH
4host_lookup_order = bydns
5primary_hostname = myhost.test.ex
afda344b
PH
6spool_directory = DIR/spool
7log_file_path = DIR/spool/log/%slog
8gecos_pattern = ""
9gecos_name = CALLER_NAME
10
11# ----- Main settings -----
12
13domainlist local_domains = test.ex : *.test.ex
14
15hostlist auth_hosts = 10.0.0.1
16hostlist relay_hosts = 10.0.0.4
17hostlist auth_relay_hosts = 10.0.0.3 : 10.0.0.4
18
c46782ef 19acl_smtp_connect = check_connect
afda344b
PH
20acl_smtp_etrn = check_etrn
21acl_smtp_expn = check_expn
22acl_smtp_rcpt = check_recipient
23acl_smtp_vrfy = check_vrfy
24auth_advertise_hosts = +auth_hosts : !+relay_hosts : +auth_relay_hosts : \
25 10.0.0.5
26smtp_accept_max_nonmail = 20
27system_filter = DIR/aux-fixed/TESTNUM.filter
28trusted_users = CALLER
29
30
31# ----- ACL -----
32
33begin acl
34
c46782ef
PH
35check_connect:
36 warn hosts = 10.0.0.6
37 control = allow_auth_unadvertised
38 accept
39
afda344b
PH
40check_recipient:
41 warn hosts = 10.0.0.5
42 message = authentication-failed: $authentication_failed
43 accept hosts = 10.0.0.5
44 accept hosts = :
45 deny hosts = +auth_hosts
46 message = authentication required
47 !authenticated = *
48 accept domains = +local_domains
49 accept hosts = +relay_hosts
50 accept hosts = +auth_relay_hosts
51 endpass
52 message = authentication required
53 authenticated = *
54 deny message = relay not permitted
55
56check_etrn:
57 deny hosts = +auth_hosts
58 message = authentication required
59 !authenticated = *
60 require hosts = 10.0.0.0/24
61 warn log_message = accepted ETRN $smtp_command_argument
62 accept
63
64check_expn:
65 deny hosts = +auth_hosts
66 message = authentication required
67 !authenticated = *
68 accept hosts = 10.0.0.0/24
69
70check_vrfy:
71 deny hosts = +auth_hosts
72 message = authentication required
73 !authenticated = *
74 accept
75
76
77# ----- Authentication -----
78
79begin authenticators
80
81mylogin:
82 driver = plaintext
83 public_name = mylogin
84 server_debug_print = +++MYLOGIN \$1="$1" \$2=\"$2" \$3="$3"
85 server_condition = "\
86 ${if match{$1}{^(\\\\S+)\\\\s+(\\\\S+)\\$}\
87 {${if and {{eq{$1}{userx}}{eq{$2}{secret}}}{yes}{no}}}{no}}"
88
89plain:
90 driver = plaintext
91 public_name = PLAIN
92 server_condition = "\
f78eb7c6
PH
93 ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
94 server_set_id = $auth2
afda344b
PH
95
96extended_plain:
97 driver = plaintext
98 public_name = EXPLAIN
99 server_prompts = :
100 server_condition = "\
f78eb7c6
PH
101 ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
102 server_set_id = $auth2
afda344b
PH
103
104expanded_prompt_plain:
105 driver = plaintext
106 public_name = EXPANDED
107 server_prompts = $primary_hostname
108 server_condition = "\
f78eb7c6
PH
109 ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
110 server_set_id = $auth2
afda344b
PH
111
112expanded_prompt_plain_fail:
113 driver = plaintext
114 public_name = EXPANDFAIL
115 server_prompts = $nonexistent
116 server_condition = "\
f78eb7c6
PH
117 ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
118 server_set_id = $auth2
afda344b
PH
119
120defer:
121 driver = plaintext
122 public_name = DEFER
123 server_condition = "account suspended"
f78eb7c6 124 server_set_id = $auth2
afda344b
PH
125
126login:
127 driver = plaintext
128 public_name = LOGIN
129 server_prompts = "User Name : Password "
130 server_condition = "\
f78eb7c6
PH
131 ${if and {{eq{$auth1}{userx}}{eq{$auth2}{secret}}}{yes}{no}}"
132 server_set_id = $auth1
afda344b
PH
133
134
135# ----- Routers -----
136
137begin routers
138
139fail_remote_domains:
140 driver = redirect
141 domains = ! +local_domains
142 data = :fail: unrouteable mail domain "$domain"
143
144localuser:
145 driver = accept
146 local_parts = userx
147 transport = appendfile
148
149
150# ----- Transports -----
151
152begin transports
153
154appendfile:
155 driver = appendfile
156 delivery_date_add
157 envelope_to_add
158 file = DIR/test-mail/$local_part
159 return_path_add
160 user = CALLER
161
162
163# End