mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Merge pull request #168 from 00angus/v2_smallfix
Sieve filters can now be installed at user setup.
This commit is contained in:
commit
fd98dd4f16
|
@ -18,7 +18,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q --fix-missing && \
|
|||
RUN sed -i -e 's/include_try \/usr\/share\/dovecot\/protocols\.d/include_try \/etc\/dovecot\/protocols\.d/g' /etc/dovecot/dovecot.conf
|
||||
RUN sed -i -e 's/#mail_plugins = \$mail_plugins/mail_plugins = \$mail_plugins sieve/g' /etc/dovecot/conf.d/15-lda.conf
|
||||
ADD target/dovecot/auth-passwdfile.inc /etc/dovecot/conf.d/
|
||||
ADD target/dovecot/10-*.conf /etc/dovecot/conf.d/
|
||||
ADD target/dovecot/??-*.conf /etc/dovecot/conf.d/
|
||||
|
||||
# Enables Spamassassin and CRON updates
|
||||
RUN sed -i -r 's/^(CRON|ENABLED)=0/\1=1/g' /etc/default/spamassassin
|
||||
|
|
|
@ -53,6 +53,8 @@ if [ -f /tmp/docker-mailserver/postfix-accounts.cf ]; then
|
|||
echo -e "INBOX\nSent\nTrash\nDrafts" >> "/var/mail/${domain}/${user}/subscriptions"
|
||||
touch "/var/mail/${domain}/${user}/.Sent/maildirfolder"
|
||||
fi
|
||||
# Copy user provided sieve file, if present
|
||||
test -e /tmp/docker-mailserver/${login}.dovecot.sieve && cp /tmp/docker-mailserver/${login}.dovecot.sieve /var/mail/${domain}/${user}/.dovecot.sieve
|
||||
echo ${domain} >> /tmp/vhost.tmp
|
||||
done < /tmp/docker-mailserver/postfix-accounts.cf
|
||||
else
|
||||
|
@ -77,14 +79,6 @@ else
|
|||
echo "==> Warning: 'config/postfix-virtual.cf' is not provided. No mail alias/forward created."
|
||||
fi
|
||||
|
||||
if [ -f /tmp/vhost.tmp ]; then
|
||||
cat /tmp/vhost.tmp | sort | uniq > /etc/postfix/vhost && rm /tmp/vhost.tmp
|
||||
fi
|
||||
|
||||
echo "Postfix configurations"
|
||||
touch /etc/postfix/vmailbox && postmap /etc/postfix/vmailbox
|
||||
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
|
||||
|
||||
# DKIM
|
||||
# Check if keys are already available
|
||||
if [ -e "/tmp/docker-mailserver/opendkim/KeyTable" ]; then
|
||||
|
@ -191,6 +185,14 @@ case $SSL_TYPE in
|
|||
|
||||
esac
|
||||
|
||||
if [ -f /tmp/vhost.tmp ]; then
|
||||
cat /tmp/vhost.tmp | sort | uniq > /etc/postfix/vhost && rm /tmp/vhost.tmp
|
||||
fi
|
||||
|
||||
echo "Postfix configurations"
|
||||
touch /etc/postfix/vmailbox && postmap /etc/postfix/vmailbox
|
||||
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
|
||||
|
||||
#
|
||||
# Override Postfix configuration
|
||||
#
|
||||
|
@ -200,7 +202,7 @@ if [ -f /tmp/docker-mailserver/postfix-main.cf ]; then
|
|||
done < /tmp/docker-mailserver/postfix-main.cf
|
||||
echo "Loaded 'config/postfix-main.cf'"
|
||||
else
|
||||
echo "No extra postfix settings loaded because optional '/tmp/docker-mailserver/main.cf' not provided."
|
||||
echo "No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided."
|
||||
fi
|
||||
|
||||
if [ ! -z "$SASL_PASSWD" ]; then
|
||||
|
|
Loading…
Reference in a new issue