Added parameter checking in rmilter image, added parameter in docker-compose, added parameter in .env

master
Fabian Letzkus 8 years ago
parent 0954fd50fb
commit 117e858df3

@ -51,6 +51,9 @@ EXPOSE_ADMIN=no
# Dav server implementation (value: radicale, none) # Dav server implementation (value: radicale, none)
WEBDAV=none WEBDAV=none
# Antivirus solution (value: none, clamav)
ANTIVIRUS=clamav
################################### ###################################
# Mail settings # Mail settings
################################### ###################################

@ -70,7 +70,7 @@ services:
antivirus: antivirus:
# build: clamav # build: clamav
image: mailu/clamav:$VERSION image: mailu/$ANTIVIRUS:$VERSION
restart: always restart: always
env_file: .env env_file: .env
volumes: volumes:

@ -4,6 +4,7 @@ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/re
&& apk add --no-cache rmilter@testing rsyslog && apk add --no-cache rmilter@testing rsyslog
COPY rmilter.conf /etc/rmilter.conf COPY rmilter.conf /etc/rmilter.conf
COPY rmilter-clamav.conf /etc/rmilter-clamav.conf
COPY rsyslog.conf /etc/rsyslog.conf COPY rsyslog.conf /etc/rsyslog.conf
COPY start.sh /start.sh COPY start.sh /start.sh

@ -20,24 +20,6 @@ strict_auth = no;
use_dcc = no; use_dcc = no;
use_redis = yes; use_redis = yes;
clamav {
# servers - clamav socket definitions in format:
servers = antivirus:3310;
# connect_timeout - timeout in miliseconds for connecting to clamav
connect_timeout = 1s;
# port_timeout - timeout in miliseconds for waiting for clamav port response
port_timeout = 4s;
# results_timeout - timeout in miliseconds for waiting for clamav response
results_timeout = 20s;
# error_time - time in seconds during which we are counting errors
error_time = 10;
# dead_time - time in seconds during which we are thinking that server is down
dead_time = 300;
# maxerrors - maximum number of errors that can occur during error_time to make us thinking that
# Default: 10
maxerrors = 10;
};
spamd { spamd {
# servers - spamd socket definitions in format: # servers - spamd socket definitions in format:
servers = r:antispam:11333; servers = r:antispam:11333;

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
rm -f /var/run/rsyslogd.pid rm -f /var/run/rsyslogd.pid
if [ "$ANTIVIRUS" == "clamav" ];
then
echo "# .try_include /etc/rmilter-clamav.conf" >> /etc/rmilter.conf
fi
rmilter -c /etc/rmilter.conf rmilter -c /etc/rmilter.conf
rsyslogd -n rsyslogd -n

Loading…
Cancel
Save