mirror of
https://github.com/Mailu/Mailu.git
synced 2025-04-15 11:47:04 +02:00
Put clamav and amavis togther, fix spam filtering
This commit is contained in:
parent
e9ae250d7d
commit
f51180415c
@ -6,6 +6,7 @@ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/re
|
|||||||
perl-io-socket-inet6@testing \
|
perl-io-socket-inet6@testing \
|
||||||
amavisd-new \
|
amavisd-new \
|
||||||
spamassassin \
|
spamassassin \
|
||||||
|
clamav \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
wget \
|
wget \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
@ -17,14 +17,15 @@ $TEMPBASE = "$MYHOME/tmp";
|
|||||||
$ENV{TMPDIR} = $TEMPBASE;
|
$ENV{TMPDIR} = $TEMPBASE;
|
||||||
$QUARANTINEDIR = '/var/amavis/quarantine';
|
$QUARANTINEDIR = '/var/amavis/quarantine';
|
||||||
|
|
||||||
$log_level = 2;
|
$log_level = 1;
|
||||||
$do_syslog = 1;
|
$do_syslog = 1;
|
||||||
|
|
||||||
$enable_db = 1;
|
$enable_db = 1;
|
||||||
$nanny_details_level = 2;
|
$nanny_details_level = 2;
|
||||||
$enable_dkim_verification = 1;
|
$enable_dkim_verification = 1;
|
||||||
|
|
||||||
@local_domains_maps = ( [".$mydomain"] );
|
@local_domains_maps = ( ["."] );
|
||||||
|
@local_domains_acl = ( "." );
|
||||||
|
|
||||||
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
|
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
|
||||||
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
|
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
|
||||||
@ -33,7 +34,7 @@ $enable_dkim_verification = 1;
|
|||||||
$unix_socketname = "$MYHOME/amavisd.sock";
|
$unix_socketname = "$MYHOME/amavisd.sock";
|
||||||
$inet_socket_port = 2525;
|
$inet_socket_port = 2525;
|
||||||
$inet_socket_bind = undef;
|
$inet_socket_bind = undef;
|
||||||
$forward_method = 'lmtp:lmtp:25';
|
$forward_method = 'lmtp:lmtp:2525';
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Policies
|
# Policies
|
||||||
@ -63,7 +64,7 @@ $recipient_delimiter = '+';
|
|||||||
# Antispam
|
# Antispam
|
||||||
###############
|
###############
|
||||||
|
|
||||||
$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level
|
$sa_tag_level_deflt = -9999; # add spam info headers if at, or above that level
|
||||||
$sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level
|
$sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level
|
||||||
$sa_kill_level_deflt = 6.9; # triggers spam evasive actions (e.g. blocks mail)
|
$sa_kill_level_deflt = 6.9; # triggers spam evasive actions (e.g. blocks mail)
|
||||||
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
|
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
|
||||||
@ -92,7 +93,7 @@ $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error
|
|||||||
|
|
||||||
@av_scanners = (
|
@av_scanners = (
|
||||||
['ClamAV-clamd',
|
['ClamAV-clamd',
|
||||||
\&ask_daemon, ["CONTSCAN {}\n", inet_ntoa(inet_aton("clamav")).":3310"],
|
\&ask_daemon, ["CONTSCAN {}\n", "/tmp/clamd.sock"],
|
||||||
qr/\bOK$/m, qr/\bFOUND$/m,
|
qr/\bOK$/m, qr/\bFOUND$/m,
|
||||||
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
|
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
|
||||||
);
|
);
|
||||||
|
@ -3,12 +3,10 @@
|
|||||||
###############
|
###############
|
||||||
|
|
||||||
DatabaseDirectory /data
|
DatabaseDirectory /data
|
||||||
LogFile /logs/clamav.log
|
LogSyslog yes
|
||||||
LogTime yes
|
LogTime yes
|
||||||
PidFile /run/clamav/clamd.pid
|
PidFile /run/clamav/clamd.pid
|
||||||
TCPSocket 3310
|
LocalSocket /tmp/clamd.sock
|
||||||
TCPAddr 0.0.0.0
|
|
||||||
Foreground yes
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Results
|
# Results
|
@ -3,11 +3,10 @@
|
|||||||
###############
|
###############
|
||||||
|
|
||||||
DatabaseDirectory /data
|
DatabaseDirectory /data
|
||||||
UpdateLogFile /logs/freshclam.log
|
LogSyslog yes
|
||||||
LogTime yes
|
LogTime yes
|
||||||
PidFile /run/clamav/freshclam.pid
|
PidFile /run/clamav/freshclam.pid
|
||||||
DatabaseOwner root
|
DatabaseOwner root
|
||||||
Foreground yes
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Updates
|
# Updates
|
@ -3,6 +3,10 @@
|
|||||||
# Prepare the databases
|
# Prepare the databases
|
||||||
sa-update
|
sa-update
|
||||||
|
|
||||||
|
# Update the AV database
|
||||||
|
freshclam
|
||||||
|
|
||||||
# Actually run Amavis
|
# Actually run Amavis
|
||||||
|
/usr/sbin/clamd
|
||||||
/usr/sbin/amavisd
|
/usr/sbin/amavisd
|
||||||
rsyslogd -n
|
rsyslogd -n
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
FROM alpine
|
|
||||||
|
|
||||||
RUN apk add --update \
|
|
||||||
clamav \
|
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
COPY conf /etc/clamav
|
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
freshclam
|
|
||||||
clamd
|
|
@ -41,14 +41,9 @@ filter:
|
|||||||
env_file: freeposte.env
|
env_file: freeposte.env
|
||||||
links:
|
links:
|
||||||
- imap:lmtp
|
- imap:lmtp
|
||||||
- clamav:clamav
|
|
||||||
|
|
||||||
clamav:
|
|
||||||
build: clamav
|
|
||||||
env_file: freeposte.env
|
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/data/clamav:/data
|
- /tmp/data/filter:/data
|
||||||
- /tmp/data/logs:/logs
|
|
||||||
|
|
||||||
admin:
|
admin:
|
||||||
build: admin
|
build: admin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user