commit | author | age
|
cb8c86
|
1 |
use strict; |
W |
2 |
|
|
3 |
# |
|
4 |
# Place your configuration directives here. They will override those in |
|
5 |
# earlier files. |
|
6 |
# |
|
7 |
# See /usr/share/doc/amavisd-new/ for documentation and examples of |
|
8 |
# the directives you can use in this file |
|
9 |
# |
|
10 |
|
|
11 |
@av_scanners = ( |
|
12 |
|
|
13 |
### http://www.clamav.net/ |
|
14 |
['ClamAV-clamd', |
|
15 |
\&ask_daemon, ["SCAN {}\n", "/var/run/clamav/clamd.sock"], |
|
16 |
qr/\bOK$/, qr/\bFOUND$/, |
|
17 |
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], |
|
18 |
); |
|
19 |
|
|
20 |
@av_scanners_backup = ( |
|
21 |
|
|
22 |
### http://www.clamav.net/ - backs up clamd or Mail::ClamAV |
|
23 |
['ClamAV-clamscan', 'clamscan', |
|
24 |
"--stdout --disable-summary -r --tempdir=$TEMPBASE {}", [0], [1], |
|
25 |
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], |
|
26 |
|
|
27 |
); |
|
28 |
|
|
29 |
@bypass_virus_checks_maps = ( |
|
30 |
\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re); |
|
31 |
|
|
32 |
@bypass_spam_checks_maps = ( |
|
33 |
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re); |
|
34 |
|
|
35 |
# |
|
36 |
# Database connection settings |
|
37 |
# |
|
38 |
|
|
39 |
@lookup_sql_dsn = |
|
40 |
( ['DBI:mysql:database={mysql_server_database};host={mysql_server_ip};port={mysql_server_port}', '{mysql_server_ispconfig_user}', '{mysql_server_ispconfig_password}'] ); |
|
41 |
|
|
42 |
# @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database |
|
43 |
#$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)'; |
|
44 |
# $banned_files_quarantine_method = 'sql'; |
|
45 |
# $spam_quarantine_method = 'sql'; |
|
46 |
|
|
47 |
# |
|
48 |
# SQL Select statements |
|
49 |
# |
|
50 |
|
|
51 |
$sql_select_policy = |
|
52 |
'SELECT *,spamfilter_users.id'. |
|
53 |
' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'. |
|
54 |
' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC'; |
|
55 |
|
|
56 |
|
|
57 |
$sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'. |
|
58 |
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' . |
|
59 |
' ORDER BY spamfilter_wblist.priority DESC'; |
|
60 |
|
|
61 |
# |
|
62 |
# Quarantine settings |
|
63 |
# |
|
64 |
|
|
65 |
$final_virus_destiny = D_BOUNCE; |
|
66 |
$final_spam_destiny = D_DISCARD; |
|
67 |
$final_banned_destiny = D_BOUNCE; |
|
68 |
$final_bad_header_destiny = D_PASS; |
|
69 |
|
|
70 |
# Default settings, we st this very high to not filter aut emails accidently |
|
71 |
$sa_spam_subject_tag = '***SPAM*** '; |
|
72 |
$sa_tag_level_deflt = 20.0; # add spam info headers if at, or above that level |
|
73 |
$sa_tag2_level_deflt = 60.0; # add 'spam detected' headers at that level |
|
74 |
$sa_kill_level_deflt = 60.0; # triggers spam evasive actions |
|
75 |
$sa_dsn_cutoff_level = 100; # spam level beyond which a DSN is not sent |
|
76 |
|
|
77 |
# |
|
78 |
# Disable spam and virus notifications for the admin user. |
|
79 |
# Can be overridden by the policies in mysql |
|
80 |
# |
|
81 |
|
|
82 |
$virus_admin = undef; |
|
83 |
$spam_admin = undef; |
|
84 |
|
|
85 |
|
|
86 |
# |
|
87 |
# Enable Logging |
|
88 |
# |
|
89 |
|
|
90 |
$DO_SYSLOG = 1; |
|
91 |
$LOGFILE = "/var/log/amavis.log"; # (defaults to empty, no log) |
|
92 |
|
|
93 |
# Set the log_level to 5 for debugging |
|
94 |
$log_level = 0; # (defaults to 0) |
|
95 |
|
64b2a9
|
96 |
$inet_socket_port = [10024,10026]; |
7c980c
|
97 |
|
58b8f2
|
98 |
# :* = send to incoming Port + 1 |
MB |
99 |
$forward_method = 'smtp:127.0.0.1:*'; |
|
100 |
$notify_method = 'smtp:127.0.0.1:*'; |
7c980c
|
101 |
|
64b2a9
|
102 |
$interface_policy{'10026'} = 'ORIGINATING'; |
F |
103 |
$policy_bank{'ORIGINATING'} = { |
|
104 |
originating => 1, |
|
105 |
smtpd_discard_ehlo_keywords => ['8BITMIME'], |
|
106 |
}; |
7c980c
|
107 |
|
FS |
108 |
# IP-Addresses for internal networks => load policy MYNETS |
|
109 |
# - requires -o smtp_send_xforward_command=yes in postfix master.cf |
|
110 |
@mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 [::1] [FE80::]/10 [FEC0::]/10); |
|
111 |
|
|
112 |
# Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port |
|
113 |
@inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 ); |
|
114 |
|
64b2a9
|
115 |
$signed_header_fields{'received'} = 0; # turn off signing of Received |
F |
116 |
$enable_dkim_verification = 1; |
|
117 |
$enable_dkim_signing = 1; |
|
118 |
@dkim_signature_options_bysender_maps = ( |
|
119 |
{ '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } ); |
cb8c86
|
120 |
|
W |
121 |
#------------ Do not modify anything below this line ------------- |
|
122 |
1; # insure a defined return |