Skip to content
Snippets Groups Projects
Commit 14bb416c authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Fixes email forwarding

parent 3a436f36
No related branches found
No related tags found
No related merge requests found
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/catatnight/postfix
......@@ -16,7 +14,7 @@ RUN apt-get update \
supervisor \
&& 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"]
......
......@@ -35,11 +35,9 @@ cp /data/hostname /etc/mailname
/usr/sbin/postconf -e "myhostname=`cat /data/hostname`"
# 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.
echo "virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp" >> /etc/postfix/main.cf
cp /data/forwards /etc/postfix/virtual-regexp
postmap /etc/postfix/virtual-regexp
touch /etc/postfix/virtual
cp /data/forwards /etc/postfix/virtual
/usr/sbin/postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
postmap /etc/postfix/virtual
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment