Fixes email forwarding
This commit is contained in:
parent
3a436f36a0
commit
14bb416c10
2 changed files with 4 additions and 8 deletions
|
@ -1,7 +1,5 @@
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER Michiel de Jong <michiel@indiehosters.net>
|
|
||||||
|
|
||||||
# Borrows from https://docs.docker.com/articles/dockerfile_best-practices/
|
|
||||||
# Borrows from https://registry.hub.docker.com/u/previousnext/postfix
|
# Borrows from https://registry.hub.docker.com/u/previousnext/postfix
|
||||||
# Borrows from https://registry.hub.docker.com/u/catatnight/postfix
|
# Borrows from https://registry.hub.docker.com/u/catatnight/postfix
|
||||||
|
|
||||||
|
@ -16,7 +14,7 @@ RUN apt-get update \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY assets/install.sh /opt/install.sh
|
COPY install.sh /opt/install.sh
|
||||||
|
|
||||||
VOLUME ["/etc/postfix", "/var/spool/mail", "/var/log"]
|
VOLUME ["/etc/postfix", "/var/spool/mail", "/var/log"]
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,9 @@ cp /data/hostname /etc/mailname
|
||||||
/usr/sbin/postconf -e "myhostname=`cat /data/hostname`"
|
/usr/sbin/postconf -e "myhostname=`cat /data/hostname`"
|
||||||
|
|
||||||
# put all relevant domains in /data/destinations.
|
# put all relevant domains in /data/destinations.
|
||||||
/usr/sbin/postconf -e "mydestination=`cat /data/destinations`"
|
/usr/sbin/postconf -e "virtual_alias_domains=`cat /data/destinations`"
|
||||||
|
|
||||||
#put your forwarding addresses in /data/forwards.
|
#put your forwarding addresses in /data/forwards.
|
||||||
echo "virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp" >> /etc/postfix/main.cf
|
cp /data/forwards /etc/postfix/virtual
|
||||||
cp /data/forwards /etc/postfix/virtual-regexp
|
/usr/sbin/postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
|
||||||
postmap /etc/postfix/virtual-regexp
|
|
||||||
touch /etc/postfix/virtual
|
|
||||||
postmap /etc/postfix/virtual
|
postmap /etc/postfix/virtual
|
Loading…
Reference in a new issue