This commit is contained in:
Val
2015-07-14 23:37:13 +01:00
parent 4fc173a75a
commit 3ea30ef051
11 changed files with 166 additions and 11 deletions

View File

@@ -17,7 +17,8 @@ RUN apt-get update && apt-get install -y \
# Set up razor and pyzor
RUN su - amavis -s /bin/bash && razor-admin -create && razor-admin -register && pyzor discover
COPY ./config/amavis-content_filter_mode /etc/amavis/conf.d/15-content_filter_mode
COPY ./config/15-content_filter_mode /etc/amavis/conf.d/15-content_filter_mode
COPY ./config/50-user /etc/amavis/conf.d/50-user
# Nice place for your settings
VOLUME ["/mail_settings"]
@@ -28,4 +29,6 @@ RUN chmod 755 /boot
ENV AMAVIS=true
EXPOSE 10024
ENTRYPOINT ./boot; service rsyslog start; amavisd foreground

View File

@@ -1 +1,8 @@
#!/bin/bash
readarray -t domains < /mail_settings/domains
domain_suffix=$(printf ", \"%s\"" "${domains[@]}")
domain_string="@local_domains_acl = ( \".$mydomain\" $domain_suffix );"
sed "/# DOCKERMAIL DOMAINS START/,/# DOCKERMAIL DOMAINS END/{//!d}" /etc/amavis/conf.d/50-user -i
sed "/# DOCKERMAIL DOMAINS START/a $domain_string/" /etc/amavis/conf.d/50-user -i

View File

@@ -0,0 +1,27 @@
use strict;
# You can modify this file to re-enable SPAM checking through spamassassin
# and to re-enable antivirus checking.
#
# Default antivirus checking mode
# Please note, that anti-virus checking is DISABLED by
# default.
# If You wish to enable it, please uncomment the following lines:
#@bypass_virus_checks_maps = (
# \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
#
# Default SPAM checking mode
# Please note, that anti-spam checking is DISABLED by
# default.
# If You wish to enable it, please uncomment the following lines:
bypass_spam_checks_maps = (
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
1; # ensure a defined return

21
amavis/config/50-user Normal file
View File

@@ -0,0 +1,21 @@
use strict;
#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#
# DOCKERMAIL DOMAINS START
# DOCKERMAIL DOMAINS END
# See http://opensource.apple.com/source/amavisd/amavisd-114/amavisd/amavisd-new-2.4.4/amavisd.conf-sample
# for details on asterisk reinjection configuration
$forward_method = 'smtp:*:*';
$notify_method = 'smtp:*:*';
#------------ Do not modify anything below this line -------------
1; # ensure a defined return