Amavis
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
27
amavis/config/15-content_filter_mode
Normal file
27
amavis/config/15-content_filter_mode
Normal 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
21
amavis/config/50-user
Normal 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
|
||||
Reference in New Issue
Block a user