commit | author | age
|
25ece9
|
1 |
###################################################################### |
T |
2 |
# MAIN CONFIGURATION SETTINGS # |
|
3 |
###################################################################### |
|
4 |
|
|
5 |
# MySQL defines |
|
6 |
MYSQL_SERVER=localhost |
|
7 |
MYSQL_USER=root |
|
8 |
MYSQL_PASSWORD= |
|
9 |
MYSQL_DB=mailserver |
|
10 |
MYSQL_EMAILTABLE=mail_box |
|
11 |
MYSQL_DOMAINTABLE=mail_domain |
|
12 |
MYSQL_WHITETABLE=mail_whitelist |
|
13 |
MYSQL_BLACKTABLE=mail_blacklist |
|
14 |
|
|
15 |
# Server ID for Multiserver Setups |
|
16 |
MAILSERVER_ID=1 |
|
17 |
MAILSERVER_HOSTNAME=mail. |
|
18 |
MAILSERVER_IP=192.168.0.108 |
|
19 |
MAILSERVER_EXIM_BINARY=/usr/sbin/exim4 |
|
20 |
MAILSERVER_SPAMC_BINARY=/usr/bin/spamc |
|
21 |
|
|
22 |
# Mailman vars |
|
23 |
MAILMAN_HOME=/var/lib/mailman |
|
24 |
MAILMAN_WRAP=MAILMAN_HOME/mail/wrapper |
|
25 |
MAILMAN_UID=list |
|
26 |
MAILMAN_GID=list |
|
27 |
|
|
28 |
# MySQL queries |
|
29 |
# MYSQL_Q_LDOMAIN=SELECT DISTINCT domain FROM MYSQL_DOMAINTABLE WHERE domain='${quote_mysql:$domain}' AND type = 'local' |
|
30 |
# MYSQL_Q_RDOMAIN=SELECT DISTINCT domain FROM MYSQL_DOMAINTABLE WHERE domain='${quote_mysql:$domain}' AND type = 'relay' |
|
31 |
|
|
32 |
MYSQL_Q_VSCAN=SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND opt_virscan='yes' |
|
33 |
|
|
34 |
|
|
35 |
MM_HOME=${lookup mysql{SELECT mm_home FROM mail_mailman_domain WHERE domain='${quote_mysql:domain}'}} |
|
36 |
MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck |
|
37 |
MM_WRAP=${lookup mysql{SELECT mm_wrap FROM mail_mailman_domain WHERE domain='${quote_mysql:domain}'}} |
|
38 |
|
|
39 |
# MySQL connection |
|
40 |
hide mysql_servers = "MYSQL_SERVER/MYSQL_DB/MYSQL_USER/MYSQL_PASSWORD" |
|
41 |
|
|
42 |
# starting 'normal' config |
|
43 |
|
|
44 |
primary_hostname = MAILSERVER_HOSTNAME |
|
45 |
|
|
46 |
domainlist local_domains = mysql;SELECT DISTINCT domain FROM MYSQL_DOMAINTABLE WHERE domain='${quote_mysql:$domain}' AND type = 'local' |
|
47 |
domainlist relay_to_domains = mysql;SELECT DISTINCT domain FROM MYSQL_DOMAINTABLE WHERE domain='${quote_mysql:$domain}' AND (type = 'relay' OR type = 'alias') |
|
48 |
hostlist relay_from_hosts = 127.0.0.1 |
|
49 |
domainlist mmdomains = ${lookup mysql {SELECT domain FROM mail_mailman_domain}} |
|
50 |
|
|
51 |
# acl_smtp_rcpt = acl_check_rcpt |
|
52 |
|
|
53 |
qualify_domain = |
|
54 |
# qualify_recipient = |
|
55 |
|
|
56 |
# allow_domain_literals |
|
57 |
|
|
58 |
never_users = root |
|
59 |
trusted_users = mail |
|
60 |
|
|
61 |
host_lookup = * |
|
62 |
rfc1413_hosts = * |
|
63 |
rfc1413_query_timeout = 15s |
|
64 |
|
|
65 |
check_spool_space = 50M |
|
66 |
check_log_space = 20M |
|
67 |
return_size_limit = 20k |
|
68 |
message_size_limit = 20M |
|
69 |
|
|
70 |
# sender_unqualified_hosts = |
|
71 |
# recipient_unqualified_hosts = |
|
72 |
|
|
73 |
# percent_hack_domains = |
|
74 |
|
|
75 |
ignore_bounce_errors_after = 2d |
|
76 |
timeout_frozen_after = 7d |
|
77 |
|
|
78 |
deliver_queue_load_max = 8 |
|
79 |
queue_only_load = 10 |
|
80 |
remote_max_parallel = 15 |
|
81 |
|
|
82 |
#tls_certificate = |
|
83 |
#tls_privatekey = |
|
84 |
#tls_advertise_hosts = * |
|
85 |
|
|
86 |
# SSL/TLS cert and key |
|
87 |
tls_certificate = /etc/exim4/smtpd.cert |
|
88 |
tls_privatekey = /etc/exim4/smtpd.key |
|
89 |
|
|
90 |
# Advertise TLS to anyone |
|
91 |
tls_advertise_hosts = * |
|
92 |
|
|
93 |
# Require auth over SSL only. |
|
94 |
# auth_over_tls_hosts = * |
|
95 |
|
|
96 |
helo_try_verify_hosts = !+relay_from_hosts |
|
97 |
|
|
98 |
av_scanner = clamd:/var/run/clamav/clamd.ctl |
|
99 |
spamd_address = 127.0.0.1 783 |
|
100 |
|
|
101 |
acl_smtp_rcpt = acl_check_rcpt |
|
102 |
#acl_smtp_mail = acl_check_sender |
|
103 |
acl_smtp_connect = acl_check_host |
|
104 |
acl_smtp_data = acl_check_data |
|
105 |
acl_smtp_helo = acl_check_helo |
|
106 |
|
|
107 |
|
|
108 |
###################################################################### |
|
109 |
# ACL CONFIGURATION # |
|
110 |
# Specifies access control lists for incoming SMTP mail # |
|
111 |
###################################################################### |
|
112 |
|
|
113 |
begin acl |
|
114 |
|
|
115 |
acl_check_rcpt: |
|
116 |
|
|
117 |
accept hosts = : |
|
118 |
|
|
119 |
deny domains = +local_domains |
|
120 |
local_parts = ^[.] : ^.*[@%!/|] |
|
121 |
|
|
122 |
deny domains = !+local_domains |
|
123 |
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./ |
|
124 |
|
|
125 |
accept local_parts = postmaster |
|
126 |
domains = +local_domains |
|
127 |
|
|
128 |
require verify = sender |
|
129 |
|
|
130 |
# Whitelist |
|
131 |
|
|
132 |
|
|
133 |
# Blacklist |
|
134 |
deny senders = ${lookup mysql {SELECT DISTINCT address FROM MYSQL_BLACKTABLE WHERE '${quote_mysql:$sender_address}' LIKE address \ |
|
135 |
AND (recipient = '' OR recipient = '${quote_mysql:$domain}' OR recipient = '${quote_mysql:$local_part}@${quote_mysql:$domain}') \ |
|
136 |
AND active = '1' AND server_id = 'MAILSERVER_ID'}{$value}} |
|
137 |
log_message = Blacklisted. Sender: <$sender_address> Recipient: <$local_part@$domain> |
|
138 |
|
|
139 |
accept domains = +local_domains |
|
140 |
endpass |
|
141 |
verify = recipient |
|
142 |
|
|
143 |
accept domains = +relay_to_domains |
|
144 |
endpass |
|
145 |
verify = recipient |
|
146 |
|
|
147 |
accept hosts = +relay_from_hosts |
|
148 |
|
|
149 |
accept authenticated = * |
|
150 |
|
|
151 |
deny message = relay not permitted |
|
152 |
|
|
153 |
|
|
154 |
acl_check_host: |
|
155 |
accept |
|
156 |
hosts = +relay_from_hosts |
|
157 |
#deny |
|
158 |
# log_message = match host_reject.list |
|
159 |
# hosts = /etc/exim4/filters/host_reject.list |
|
160 |
|
|
161 |
accept |
|
162 |
|
|
163 |
acl_check_helo: |
|
164 |
accept hosts = +relay_from_hosts |
|
165 |
# If the HELO pretend to be this host |
|
166 |
deny condition = ${if or { \ |
|
167 |
{eq {${lc:$sender_helo_name}}{MAILSERVER_HOSTNAME}} \ |
|
168 |
{eq {${lc:$sender_helo_name}}{MAILSERVER_IP}} \ |
|
169 |
} {true}{false} } |
|
170 |
# by default we accept |
|
171 |
accept |
|
172 |
|
|
173 |
|
|
174 |
acl_check_data: |
|
175 |
|
|
176 |
accept hosts = +relay_from_hosts |
|
177 |
|
|
178 |
# if there is a windows executable as attachment then we reject |
|
179 |
deny message = This message contains an attachment of a type which we do not accept (.$found_extension) |
|
180 |
demime = bat:btm:cmd:com:cpl:dll:exe:lnk:msi:pif:prf:reg:scr:vbs:url |
|
181 |
|
|
182 |
# spamassassin |
|
183 |
warn message = X-SA-Score: $spam_score |
|
184 |
spam = nobody:true |
|
185 |
|
|
186 |
warn message = X-SA-Report: $spam_report |
|
187 |
spam = nobody:true |
|
188 |
condition = ${if >{$spam_score_int}{0}{true}{false}} |
|
189 |
|
|
190 |
warn message = X-SA-Status: Yes |
|
191 |
spam = nobody:true |
|
192 |
condition = ${if >{$spam_score_int}{50}{true}{false}} |
|
193 |
|
|
194 |
deny message = This message scored $spam_score spam points. |
|
195 |
spam = nobody:true |
|
196 |
condition = ${if >{$spam_score_int}{70}{true}{false}} |
|
197 |
|
|
198 |
# clamav |
|
199 |
deny message = This message contains a virus or other harmful content ($malware_name) |
|
200 |
demime = * |
|
201 |
malware = * |
|
202 |
log_message = Virus found in Message |
|
203 |
|
|
204 |
# accept by default |
|
205 |
accept |
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
|
|
210 |
###################################################################### |
|
211 |
# ROUTERS CONFIGURATION # |
|
212 |
# Specifies how addresses are handled # |
|
213 |
###################################################################### |
|
214 |
# THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! # |
|
215 |
# An address is passed to each router in turn until it is accepted. # |
|
216 |
###################################################################### |
|
217 |
|
|
218 |
begin routers |
|
219 |
|
|
220 |
fail_router: |
|
221 |
driver = redirect |
|
222 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND active='0'}{$value}} |
|
223 |
data = ":fail:" |
|
224 |
allow_fail |
|
225 |
|
|
226 |
domain_aliases: |
|
227 |
driver=redirect |
|
228 |
domains=${lookup mysql{SELECT domain FROM mail_domain WHERE domain='${domain}' AND type = 'alias'}} |
|
229 |
data=$local_part@${lookup mysql{SELECT destination FROM mail_domain WHERE domain='${domain}'}} |
|
230 |
|
|
231 |
mailman_router: |
|
232 |
driver = accept |
|
233 |
domains = +mmdomains |
|
234 |
require_files = MM_LISTCHK |
|
235 |
local_part_suffix_optional |
|
236 |
local_part_suffix = -admin : \ |
|
237 |
-bounces : -bounces+* : \ |
|
238 |
-confirm : -confirm+* : \ |
|
239 |
-join : -leave : \ |
|
240 |
-owner : -request : \ |
|
241 |
-subscribe : -unsubscribe |
|
242 |
transport = mailman_transport |
|
243 |
|
|
244 |
dnslookup: |
|
245 |
driver = dnslookup |
|
246 |
domains = ! +local_domains |
|
247 |
transport = remote_smtp |
|
248 |
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 |
|
249 |
no_more |
|
250 |
|
|
251 |
# Blacklists werden jetzt in den ACL geprüft |
|
252 |
#blacklist_router: |
|
253 |
# driver = manualroute |
|
254 |
# senders = ${lookup mysql {SELECT DISTINCT address FROM MYSQL_BLACKTABLE WHERE '${quote_mysql:$sender_address}' LIKE address AND recipient = '${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} |
|
255 |
# # condition = "${if !def:h_X-Spam-Flag: {1}{0}}" |
|
256 |
# # headers_add = X-Spam-Flag: YES |
|
257 |
# route_list = * localhost |
|
258 |
# # self = pass |
|
259 |
# transport = devnull_transport |
|
260 |
# verify = false |
|
261 |
|
|
262 |
#system_aliases: |
|
263 |
# driver = redirect |
|
264 |
# allow_fail |
|
265 |
# allow_defer |
|
266 |
# data = ${lookup{$local_part}lsearch{/etc/aliases}} |
|
267 |
# user = exim |
|
268 |
# file_transport = address_file |
|
269 |
# pipe_transport = address_pipe |
|
270 |
|
|
271 |
#mysql_systemalias: |
|
272 |
# driver = redirect |
|
273 |
# allow_fail |
|
274 |
# allow_defer |
|
275 |
# data = ${lookup mysql{SELECT dest FROM mail_systemalias WHERE local_part='${quote_mysql:$local_part}'}} |
|
276 |
|
|
277 |
mysql_email_alias: |
|
278 |
driver = redirect |
|
279 |
allow_fail |
|
280 |
allow_defer |
|
281 |
data = ${lookup mysql{ SELECT destination FROM mail_redirect WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}' AND type = 'alias'}} |
|
282 |
|
|
283 |
mysql_email_forward: |
|
284 |
driver = redirect |
|
285 |
data = ${lookup mysql{ SELECT destination FROM mail_redirect WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}' AND type = 'forward'}} |
|
286 |
|
|
287 |
#spamcheck_router: |
|
288 |
# driver = manualroute |
|
289 |
# domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND spamscan='yes'}{$value}} |
|
290 |
# senders = ! ${lookup mysql {SELECT DISTINCT MYSQL_WHITETABLE.address FROM MYSQL_WHITETABLE WHERE '${quote_mysql:$sender_address}' LIKE MYSQL_WHITETABLE.address}{$value}} |
|
291 |
# condition = ${if and { \ |
|
292 |
# {!eq {$received_protocol}{spam-scanned}} \ |
|
293 |
# {!eq {$received_protocol}{local}} \ |
|
294 |
# } {1}{0}} |
|
295 |
# headers_remove = X-Spam-Flag |
|
296 |
# route_list = "* localhost byname" |
|
297 |
# transport = spamcheck |
|
298 |
# verify = false |
|
299 |
|
|
300 |
#spamdelete_router: |
|
301 |
# driver = manualroute |
|
302 |
# domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND spamdelete = '1'}{$value}} |
|
303 |
# # condition = "${if eq{$h_X-Spam-Flag:}{YES} {1}{0}}" |
|
304 |
# condition = "${if match{$h_X-Spam-Flag}{YES} {1}{0}}" |
|
305 |
# route_list = "* localhost byname" |
|
306 |
# transport = devnull_transport |
|
307 |
# verify = false |
|
308 |
|
|
309 |
|
|
310 |
spamrewrite_router: |
|
311 |
driver = manualroute |
|
312 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} |
|
313 |
senders = ! ${lookup mysql {SELECT DISTINCT MYSQL_WHITETABLE.address FROM MYSQL_WHITETABLE WHERE '${quote_mysql:$sender_address}' LIKE MYSQL_WHITETABLE.address}{$value}} |
|
314 |
condition = ${if and { \ |
|
315 |
{>{$spam_score_int}{${lookup mysql {SELECT spam_rewrite_score_int FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}}}}\ |
|
316 |
{!eq {$received_protocol}{spam-rewrite}} \ |
|
317 |
{!eq {$received_protocol}{local}} \ |
|
318 |
}{true}{false}} |
|
319 |
headers_remove = Subject |
|
320 |
headers_add = Subject: ${lookup mysql {SELECT spam_rewrite_subject FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} $header_subject |
|
321 |
route_list = "* localhost byname" |
|
322 |
transport = spamrewrite_transport |
|
323 |
verify = false |
|
324 |
|
|
325 |
spamredirect_router: |
|
326 |
driver = manualroute |
|
327 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} |
|
328 |
senders = ! ${lookup mysql {SELECT DISTINCT MYSQL_WHITETABLE.address FROM MYSQL_WHITETABLE WHERE '${quote_mysql:$sender_address}' LIKE MYSQL_WHITETABLE.address}{$value}} |
|
329 |
condition = ${if >{$spam_score_int}{${lookup mysql {SELECT spam_redirect_score_int FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}}}{true}{false}} |
|
330 |
route_list = "* localhost byname" |
|
331 |
transport = spamredirect_transport |
|
332 |
verify = false |
|
333 |
|
|
334 |
spamdelete_router: |
|
335 |
driver = manualroute |
|
336 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} |
|
337 |
senders = ! ${lookup mysql {SELECT DISTINCT MYSQL_WHITETABLE.address FROM MYSQL_WHITETABLE WHERE '${quote_mysql:$sender_address}' LIKE MYSQL_WHITETABLE.address}{$value}} |
|
338 |
condition = ${if and { \ |
|
339 |
{>{$spam_score_int}{${lookup mysql {SELECT spam_delete_score_int FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}}}}\ |
|
340 |
{!eq {$received_protocol}{spam-rewrite}} \ |
|
341 |
{!eq {$received_protocol}{local}} \ |
|
342 |
}{true}{false}} |
|
343 |
route_list = "* localhost byname" |
|
344 |
transport = devnull_transport |
|
345 |
verify = false |
|
346 |
|
|
347 |
autoresponder_router: |
|
348 |
driver = accept |
|
349 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND autoresponder='yes'}{$value}} |
|
350 |
transport = autoresponder_transport |
|
351 |
unseen |
|
352 |
|
|
353 |
# cc_router: |
|
354 |
# driver = redirect |
|
355 |
# data = ${lookup mysql {SELECT cc FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}')}{$value}} |
|
356 |
# unseen |
|
357 |
|
|
358 |
# forward_router: |
|
359 |
# driver = redirect |
|
360 |
# data = ${lookup mysql {SELECT forward FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND forward != ''}{$value}} |
|
361 |
|
|
362 |
local_mailbox_router: |
|
363 |
driver = accept |
|
364 |
domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND maildir != '' AND active = '1'}{$value}} |
|
365 |
transport = local_delivery |
|
366 |
|
|
367 |
mysql_catchall_router: |
|
368 |
driver=redirect |
|
369 |
data=${lookup mysql{ SELECT destination FROM mail_domain_catchall WHERE domain='${domain}'}} |
|
370 |
allow_fail |
|
371 |
allow_defer |
|
372 |
|
|
373 |
###################################################################### |
|
374 |
# TRANSPORTS CONFIGURATION # |
|
375 |
###################################################################### |
|
376 |
# ORDER DOES NOT MATTER # |
|
377 |
# Only one appropriate transport is called for each delivery. # |
|
378 |
###################################################################### |
|
379 |
|
|
380 |
begin transports |
|
381 |
|
|
382 |
######################## |
|
383 |
# Remote smtp transport |
|
384 |
######################## |
|
385 |
|
|
386 |
remote_smtp: |
|
387 |
driver = smtp |
|
388 |
|
|
389 |
################### |
|
390 |
# Mailman transport |
|
391 |
################### |
|
392 |
|
|
393 |
mailman_transport: |
|
394 |
driver = pipe |
|
395 |
command = /var/mailman/lists.mas-services.co.uk/mail/mailman \ |
|
396 |
'${if def:local_part_suffix \ |
|
397 |
{${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \ |
|
398 |
{post}}' \ |
|
399 |
$local_part |
|
400 |
current_directory = ${lookup mysql{SELECT mm_home FROM mail_mailman_domain WHERE domain='${domain}'}} |
|
401 |
home_directory = ${lookup mysql{SELECT mm_home FROM mail_mailman_domain WHERE domain='${domain}'}} |
|
402 |
user = ${lookup mysql{SELECT mm_user FROM mail_mailman_domain WHERE domain='${domain}'}} |
|
403 |
group = ${lookup mysql{SELECT mm_group FROM mail_mailman_domain WHERE domain='${domain}'}} |
|
404 |
|
|
405 |
|
|
406 |
################################################################################# |
|
407 |
# This transport is only for rewriting the header of the message with ***SPAM*** |
|
408 |
################################################################################# |
|
409 |
|
|
410 |
spamrewrite_transport: |
|
411 |
driver = pipe |
|
412 |
command = MAILSERVER_EXIM_BINARY -oMr spam-rewrite -bS |
|
413 |
use_bsmtp = true |
|
414 |
home_directory = "/tmp" |
|
415 |
current_directory = "/tmp" |
|
416 |
user = mail |
|
417 |
group = mail |
|
418 |
log_output = true |
|
419 |
return_fail_output = true |
|
420 |
return_path_add = false |
|
421 |
message_prefix = |
|
422 |
message_suffix = |
|
423 |
|
|
424 |
###################################################### |
|
425 |
# This transport is only for redirecting SPAM messages |
|
426 |
###################################################### |
|
427 |
|
|
428 |
spamredirect_transport: |
|
429 |
driver = appendfile |
|
430 |
directory = ${lookup mysql {SELECT concat(spam_redirect_maildir,'/Maildir') FROM mail_spamfilter WHERE email='${quote_mysql:$local_part}@${quote_mysql:$domain}'}{$value}} |
|
431 |
maildir_format |
|
432 |
user = mail |
|
433 |
group = mail |
|
434 |
mode = 0660 |
|
435 |
directory_mode = 0770 |
|
436 |
|
|
437 |
########################## |
|
438 |
# Local delivery transport |
|
439 |
########################## |
|
440 |
|
|
441 |
local_delivery: |
|
442 |
driver = appendfile |
|
443 |
directory = ${lookup mysql {SELECT concat(maildir,'/Maildir') FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}')}{$value}} |
|
444 |
maildir_format |
|
445 |
user = mail |
|
446 |
group = mail |
|
447 |
quota = ${lookup mysql{select quota from MYSQL_EMAILTABLE where email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}')}{${value}M}} |
|
448 |
quota_is_inclusive = false |
|
449 |
maildir_tag = ,S=$message_size |
|
450 |
quota_size_regex = ,S=(\d+): |
|
451 |
quota_warn_threshold = 75% |
|
452 |
maildir_use_size_file = false |
|
453 |
quota_warn_message = "To: $local_part@$domain\n\ |
|
454 |
Subject: Mailbox quota warning\n\n\ |
|
455 |
This message was automatically generated by the mail delivery software.\n\n\ |
|
456 |
You are now using over 75% of your allocated mail storage quota.\n\n\ |
|
457 |
If your mailbox fills completely, further incoming messages will be automatically\n\ |
|
458 |
returned to their senders.\n\n\ |
|
459 |
Please take note of this and remove unwanted mail from your mailbox.\n" |
|
460 |
mode = 0660 |
|
461 |
directory_mode = 0770 |
|
462 |
|
|
463 |
########################## |
|
464 |
# autoresponder transport |
|
465 |
########################## |
|
466 |
|
|
467 |
autoresponder_transport: |
|
468 |
driver = autoreply |
|
469 |
to = ${sender_address} |
|
470 |
from = "vacation@${domain}" |
|
471 |
subject = "Autoresponder: ${local_part}@${domain}" |
|
472 |
text = ${lookup mysql {SELECT autoresponder_text FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}')}{$value}} |
|
473 |
|
|
474 |
########################## |
|
475 |
# devnull transport |
|
476 |
########################## |
|
477 |
|
|
478 |
devnull_transport: |
|
479 |
driver = appendfile |
|
480 |
file = /dev/null |
|
481 |
user = mail |
|
482 |
|
|
483 |
|
|
484 |
###################################################################### |
|
485 |
# RETRY CONFIGURATION # |
|
486 |
###################################################################### |
|
487 |
|
|
488 |
begin retry |
|
489 |
|
|
490 |
# This single retry rule applies to all domains and all errors. It specifies |
|
491 |
# retries every 15 minutes for 2 hours, then increasing retry intervals, |
|
492 |
# starting at 1 hour and increasing each time by a factor of 1.5, up to 16 |
|
493 |
# hours, then retries every 6 hours until 4 days have passed since the first |
|
494 |
# failed delivery. |
|
495 |
|
|
496 |
# Domain Error Retries |
|
497 |
# ------ ----- ------- |
|
498 |
|
|
499 |
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h |
|
500 |
|
|
501 |
|
|
502 |
|
|
503 |
###################################################################### |
|
504 |
# REWRITE CONFIGURATION # |
|
505 |
###################################################################### |
|
506 |
|
|
507 |
# There are no rewriting specifications in this default configuration file. |
|
508 |
begin rewrite |
|
509 |
|
|
510 |
|
|
511 |
|
|
512 |
###################################################################### |
|
513 |
# AUTHENTICATION CONFIGURATION # |
|
514 |
###################################################################### |
|
515 |
|
|
516 |
# There are no authenticator specifications in this default configuration file. |
|
517 |
|
|
518 |
begin authenticators |
|
519 |
|
|
520 |
fixed_plain: |
|
521 |
driver = plaintext |
|
522 |
public_name = PLAIN |
|
523 |
server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$2}' AND cryptpwd=encrypt('${quote_mysql:$3}', cryptpwd) AND active = '1'}{1}fail} |
|
524 |
server_set_id = $2 |
|
525 |
|
|
526 |
fixed_login: |
|
527 |
driver = plaintext |
|
528 |
public_name = LOGIN |
|
529 |
server_prompts = "Username:: : Password::" |
|
530 |
server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$1}' AND cryptpwd=encrypt('${quote_mysql:$2}', cryptpwd) AND active = '1'}{1}fail} |
|
531 |
server_set_id = $1 |
|
532 |
|
|
533 |
cram: |
|
534 |
driver = cram_md5 |
|
535 |
public_name = CRAM-MD5 |
|
536 |
server_secret = "${lookup mysql {SELECT clearpwd FROM mail_box WHERE email = '${sg {$1}{'}{}}' AND active = '1'} {$value} fail}" |
|
537 |
server_set_id = $1 |
|
538 |
|
|
539 |
|
|
540 |
###################################################################### |
|
541 |
# CONFIGURATION FOR local_scan() # |
|
542 |
###################################################################### |
|
543 |
|
|
544 |
# If you have built Exim to include a local_scan() function that contains |
|
545 |
# tables for private options, you can define those options here. Remember to |
|
546 |
# uncomment the "begin" line. It is commented by default because it provokes |
|
547 |
# an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS |
|
548 |
# set in the Local/Makefile. |
|
549 |
|
|
550 |
# begin local_scan |
|
551 |
|
|
552 |
|
|
553 |
# End of Exim configuration file |
|
554 |
|