chiark / gitweb /
base.m4: Allow `adm' users to administrate the server.
[exim-config] / base.m4
CommitLineData
185b5456
MW
1### -*-m4-*-
2###
3### Basic settings for distorted.org.uk Exim configuration
4###
5### (c) 2012 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This program is free software; you can redistribute it and/or modify
11### it under the terms of the GNU General Public License as published by
12### the Free Software Foundation; either version 2 of the License, or
13### (at your option) any later version.
14###
15### This program is distributed in the hope that it will be useful,
16### but WITHOUT ANY WARRANTY; without even the implied warranty of
17### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18### GNU General Public License for more details.
19###
20### You should have received a copy of the GNU General Public License
21### along with this program; if not, write to the Free Software Foundation,
22### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24###--------------------------------------------------------------------------
25### Global settings.
26
27SECTION(global, priv)m4_dnl
67bb86db 28admin_groups = root : adm
185b5456
MW
29prod_requires_admin = false
30
31SECTION(global, logging)m4_dnl
32log_file_path = : syslog
33log_selector = \
34 +smtp_confirmation \
35 +tls_peerdn
36log_timezone = true
37syslog_duplication = false
38syslog_timestamp = false
39
40SECTION(global, daemon)m4_dnl
41local_interfaces = <; CONF_interfaces
42extra_local_interfaces = <; 0.0.0.0 ; ::
43
44SECTION(global, resource)m4_dnl
45deliver_queue_load_max = 8
46queue_only_load = 12
47smtp_accept_max = 16
48smtp_accept_queue = 32
49smtp_accept_reserve = 4
50smtp_load_reserve = 10
51smtp_reserve_hosts = +trusted
52
53SECTION(global, policy)m4_dnl
54host_lookup = *
55
56SECTION(global, users)m4_dnl
57gecos_name = $1
58gecos_pattern = ([^,:]*)
59
60SECTION(global, incoming)m4_dnl
61received_header_text = Received: \
62 ${if def:sender_rcvhost {from $sender_rcvhost\n\t} \
63 {${if def:sender_ident \
64 {from ${quote_local_part:$sender_ident} }}\
65 ${if def:sender_helo_name \
66 {(helo=$sender_helo_name)\n\t}}}}\
67 by $primary_hostname \
68 ${if def:received_protocol \
69 {with $received_protocol \
70 ${if def:tls_cipher {(cipher=$tls_cipher)\n\t}}}}\
71 (Exim $version_number)\n\t\
72 ${if def:sender_address \
73 {(envelope-from <$sender_address>\
74 ${if def:authenticated_id \
75 {; auth=$authenticated_id}})\n\t}}\
76 id $message_exim_id\
77 ${if def:received_for {\n\tfor $received_for}}
78
79SECTION(global, smtp)m4_dnl
80smtp_return_error_details = true
81accept_8bitmime = true
82
83SECTION(global, process)m4_dnl
84extract_addresses_remove_arguments = false
85headers_charset = utf-8
86qualify_domain = CONF_master_domain
87
88SECTION(global, bounce)m4_dnl
89delay_warning = 1h : 24h : 2d
90
91DIVERT(null)
92###--------------------------------------------------------------------------
93### Access control lists.
94
95SECTION(global, acl-after)
96SECTION(global, acl)m4_dnl
97acl_smtp_helo = helo
98SECTION(acl, misc)m4_dnl
99helo:
100 require message = The other one has bells on
101 verify = helo
102
103 accept
104
105SECTION(global, acl)m4_dnl
106acl_smtp_mail = mail
107SECTION(acl, mail)m4_dnl
108mail:
109
110 ## Always allow the empty sender, so that we can receive bounces.
111 accept senders = :
112
113 ## Ensure that the sender is routable. This is important to prevent
114 ## undeliverable bounces.
115 require message = Invalid sender; \
116 ($sender_verify_failure; $acl_verify_message)
117 verify = sender
118
119 ## If this is directly from a client then hack on it for a while.
120 warn condition = ${if eq{$acl_c_mode}{submission}}
121 control = submission
122
123SECTION(acl, mail-tail)m4_dnl
124 ## And we're done.
125 accept
126
127SECTION(global, acl)m4_dnl
128acl_smtp_connect = connect
129SECTION(acl, connect)m4_dnl
130connect:
131SECTION(acl, connect-tail)m4_dnl
e12c9586 132 ## Configure variables according to the submission mode.
185b5456 133 warn acl = check_submission
e12c9586
MW
134
135 ## Done.
185b5456
MW
136 accept
137
138check_submission:
139 ## See whether this message needs hacking on.
140 accept !hosts = +localnet
141 !condition = ${if ={$received_port}{CONF_submission_port}}
142 set acl_c_mode = relay
143
144 ## Remember to apply submission controls.
145 warn set acl_c_mode = submission
146
147 ## Done.
148 accept
149
150SECTION(global, acl)m4_dnl
151acl_smtp_rcpt = rcpt
152SECTION(acl, rcpt)m4_dnl
153rcpt:
154
155 ## Reject if the client isn't allowed to relay and the recipient
156 ## isn't in one of our known domains.
157 deny message = Relaying not permitted
158 !hosts = CONF_relay_clients
159 !authenticated = *
160 !domains = +known
161
162 ## Ensure that the recipient is routable.
163 require message = Invalid recipient \
164 ($recipient_verify_failure; $acl_verify_message)
165 verify = recipient
166
167SECTION(acl, rcpt-tail)m4_dnl
168 ## Everything checks out OK: let this one go through.
169 accept
170
171SECTION(global, acl)m4_dnl
172acl_smtp_data = data
173SECTION(acl, data)m4_dnl
174data:
175
176SECTION(acl, data-tail)m4_dnl
177 accept
178
179SECTION(global, acl)m4_dnl
180acl_smtp_expn = expn_vrfy
181acl_smtp_vrfy = expn_vrfy
182SECTION(acl)m4_dnl
183expn_vrfy:
184 accept hosts = +trusted
185 deny message = Suck it and see
186
187DIVERT(null)
188###--------------------------------------------------------------------------
189### Common options for forwarding routers.
190
191## We're pretty permissive here.
192m4_define(<:FILTER_BASE:>,
193 <:driver = redirect
194 modemask = 002
195 check_owner = false
196 check_group = false
197 allow_filter = true
198 allow_defer = true
199 allow_fail = true
200 forbid_blackhole = false
201 check_ancestor = true:>)
202
203## Common options for forwarding routers at verification time.
204m4_define(<:FILTER_VERIFY:>,
205 <:verify_only = true
206 user = CONF_filter_user
207 forbid_filter_dlfunc = true
208 forbid_filter_logwrite = true
209 forbid_filter_perl = true
210 forbid_filter_readsocket = true
211 forbid_filter_run = true
212 file_transport = dummy
213 directory_transport = dummy
214 pipe_transport = dummy
215 reply_transport = dummy:>)
216
217## Transports for redirection filters.
218m4_define(<:FILTER_TRANSPORTS:>,
219 <:file_transport = mailbox
220 directory_transport = maildir
221 pipe_transport = pipe
222 reply_transport = reply:>)
223
224DIVERT(null)
225###--------------------------------------------------------------------------
226### Some standard transports.
227
228m4_define(<:USER_DELIVERY:>,
229 <:delivery_date_add = true
230 envelope_to_add = true
231 return_path_add = true:>)
232
233SECTION(transports)m4_dnl
234## A standard transport for remote delivery. Try to do TLS, and don't worry
235## too much if it's not very secure: the alternative is sending in plaintext
236## anyway.
237smtp:
238 driver = smtp
239 tls_require_ciphers = CONF_acceptable_ciphers
240 tls_dh_min_bits = 1020
241 tls_tempfail_tryclear = true
242
243## Transport to a local SMTP server; use TLS and perform client
244## authentication.
245smtp_local:
246 driver = smtp
247 hosts_require_tls = *
248 tls_certificate = CONF_sysconf_dir/client.cert
249 tls_privatekey = CONF_sysconf_dir/client.key
250 tls_verify_certificates = CONF_ca_dir/ca.cert
251 tls_require_ciphers = CONF_good_ciphers
252 tls_dh_min_bits = 3070
253 tls_tempfail_tryclear = false
254 authenticated_sender = ${if def:authenticated_id \
255 ${authenticated_id@CONF_master_domain} \
256 fail}
257
258## A standard transport for local delivery.
259deliver:
260 driver = appendfile
261 file = /var/mail/$local_part
262 USER_DELIVERY
263
264## Transports for user filters.
265mailbox:
266 driver = appendfile
267 USER_DELIVERY
268
269maildir:
270 driver = appendfile
271 maildir_format = true
272 USER_DELIVERY
273
274pipe:
275 driver = pipe
276 return_output = true
277
278## A special dummy transport for use during address verification.
279dummy:
280 driver = appendfile
281 file = /dev/null
282
283DIVERT(null)
284###--------------------------------------------------------------------------
285### Retry configuration.
286
287SECTION(retry, default)m4_dnl
288## Default.
289* * \
290 F,2h,15m; G,16h,2h,1.5; F,4d,6h
291
292DIVERT(null)
293###----- That's all, folks --------------------------------------------------