Skip to content

Commit 6cd65c5

Browse files
committed
Upadted formating
1 parent 4f9f369 commit 6cd65c5

File tree

7 files changed

+324
-194
lines changed

7 files changed

+324
-194
lines changed

install/debian/exim4.conf.template

Lines changed: 78 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
##########################################################################
1+
######################################################################
2+
# #
3+
# Exim configuration file for Vesta Control Panel #
4+
# #
5+
######################################################################
6+
27
#SPAMASSASSIN = yes
3-
SPAM_SCORE = 50
4-
CLAMD = yes
5-
##########################################################################
8+
#SPAM_SCORE = 50
9+
#CLAMD = yes
610

711
domainlist local_domains = dsearch;/etc/exim4/domains/
812
domainlist relay_to_domains = dsearch;/etc/exim4/domains/
9-
hostlist relay_from_hosts = 127.0.0.1
10-
hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
11-
hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
13+
hostlist relay_from_hosts = 127.0.0.1
14+
hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
15+
hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
1216
no_local_from_check
1317
untrusted_set_sender = *
1418
acl_smtp_connect = acl_check_spammers
@@ -43,41 +47,38 @@ DKIM_FILE = /etc/exim4/domains/${lc:${domain:$h_from:}}/dkim.pem
4347
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
4448

4549

46-
##########################################################################
50+
51+
######################################################################
52+
# ACL CONFIGURATION #
53+
# Specifies access control lists for incoming SMTP mail #
54+
######################################################################
4755
begin acl
48-
##########################################################################
56+
4957
acl_check_spammers:
50-
accept hosts = +whitelist
58+
accept hosts = +whitelist
59+
5160
drop message = Your host in blacklist on this server.
5261
log_message = Host in blacklist
5362
hosts = +spammers
63+
5464
accept
5565

66+
5667
acl_check_mail:
57-
deny
58-
condition = ${if eq{$sender_helo_name}{}}
68+
deny condition = ${if eq{$sender_helo_name}{}}
5969
message = HELO required before MAIL
60-
# drop
61-
# condition = ${if isip{$sender_helo_name}}
62-
# message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
70+
6371
drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
6472
condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
6573
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
6674
delay = 45s
67-
# drop
68-
# condition = ${if match{$sender_helo_name}{\N^\[\N}{no}{yes}}
69-
# condition = ${if match{$sender_helo_name}{\N\.\N}{no}{yes}}
70-
# message = Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
71-
drop
72-
condition = ${if isip{$sender_helo_name}}
75+
76+
drop condition = ${if isip{$sender_helo_name}}
7377
message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
74-
# drop
75-
# condition = ${if match{$sender_helo_name}{\N\.$\N}}
76-
# message = Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
77-
# drop message = "REJECTED - Bad HELO - Host impersonating [$sender_helo_name]"
78-
# condition = ${if match{$sender_helo_name}{$primary_hostname}}
78+
7979
drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
8080
message = $interface_address is _my_ address
81+
8182
accept
8283

8384

@@ -100,8 +101,8 @@ acl_check_rcpt:
100101
accept authenticated = *
101102
control = submission/domain=
102103

103-
deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\\n$dnslist_text
104-
hosts = !+whitelist
104+
deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
105+
hosts = !+whitelist
105106
dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
106107

107108
require message = relay not permitted
@@ -115,27 +116,30 @@ acl_check_rcpt:
115116

116117
.ifdef CLAMD
117118
warn set acl_m0 = no
119+
118120
warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
119121
set acl_m0 = yes
120122
.endif
123+
121124
.ifdef SPAMASSASSIN
122125
warn set acl_m1 = no
126+
123127
warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
124128
set acl_m1 = yes
125129
.endif
130+
126131
accept
127132

128133

129134
acl_check_data:
130135
.ifdef CLAMD
131-
deny message = Message contains a virus ($malware_name) and has been rejected
136+
deny message = Message contains a virus ($malware_name) and has been rejected
132137
malware = *
133138
condition = ${if eq{$acl_m0}{yes}{yes}{no}}
134139
.endif
135140

136141
.ifdef SPAMASSASSIN
137-
warn
138-
!authenticated = *
142+
warn !authenticated = *
139143
hosts = !+relay_from_hosts
140144
condition = ${if < {$message_size}{100K}}
141145
condition = ${if eq{$acl_m1}{yes}{yes}{no}}
@@ -144,23 +148,29 @@ acl_check_data:
144148
add_header = X-Spam-Bar: $spam_bar
145149
add_header = X-Spam-Report: $spam_report
146150
set acl_m2 = $spam_score_int
147-
warn
148-
condition = ${if !eq{$acl_m2}{} {yes}{no}}
151+
152+
warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
149153
condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
150154
add_header = X-Spam-Status: Yes
151155
message = SpamAssassin detected spam (from $sender_address to $recipients).
152156
.endif
157+
153158
accept
154159

155160

156161
acl_check_mime:
157-
deny message = Blacklisted file extension detected
158-
condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
162+
deny message = Blacklisted file extension detected
163+
condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
164+
159165
accept
160166

161-
##########################################################################
167+
168+
169+
######################################################################
170+
# AUTHENTICATION CONFIGURATION #
171+
######################################################################
162172
begin authenticators
163-
##########################################################################
173+
164174
dovecot_plain:
165175
driver = dovecot
166176
public_name = PLAIN
@@ -173,9 +183,14 @@ dovecot_login:
173183
server_socket = /var/run/dovecot/auth-client
174184
server_set_id = $auth1
175185

176-
##########################################################################
186+
187+
188+
######################################################################
189+
# ROUTERS CONFIGURATION #
190+
# Specifies how addresses are handled #
191+
######################################################################
177192
begin routers
178-
##########################################################################
193+
179194
#smarthost:
180195
# driver = manualroute
181196
# domains = ! +local_domains
@@ -255,9 +270,12 @@ terminate_alias:
255270
condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/$domain/aliases}{true}{false}}
256271

257272

258-
##########################################################################
273+
274+
######################################################################
275+
# TRANSPORTS CONFIGURATION #
276+
######################################################################
259277
begin transports
260-
##########################################################################
278+
261279
remote_smtp:
262280
driver = smtp
263281
#helo_data = $sender_address_domain
@@ -267,7 +285,6 @@ remote_smtp:
267285
dkim_canon = relaxed
268286
dkim_strict = 0
269287

270-
271288
procmail:
272289
driver = pipe
273290
command = "/usr/bin/procmail -d $local_part"
@@ -308,7 +325,7 @@ local_spam_delivery:
308325
delivery_date_add
309326
envelope_to_add
310327
return_path_add
311-
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.spam"
328+
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part/.Spam"
312329
quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}M
313330
quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/$domain/$local_part"
314331
quota_warn_threshold = 75%
@@ -337,8 +354,24 @@ devnull:
337354
driver = appendfile
338355
file = /dev/null
339356

340-
##########################################################################
357+
358+
359+
######################################################################
360+
# RETRY CONFIGURATION #
361+
######################################################################
341362
begin retry
363+
364+
# Address or Domain Error Retries
365+
# ----------------- ----- -------
342366
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
343-
##########################################################################
367+
368+
369+
370+
######################################################################
371+
# REWRITE CONFIGURATION #
372+
######################################################################
344373
begin rewrite
374+
375+
376+
377+
######################################################################

0 commit comments

Comments
 (0)