diff --git a/dovecot/Dockerfile b/dovecot/Dockerfile index 64eca6d..e3d7bd3 100644 --- a/dovecot/Dockerfile +++ b/dovecot/Dockerfile @@ -28,14 +28,12 @@ RUN cp /aliases /etc/postfix/virtual \ RUN mkdir /etc/postfix/tmp \ && awk < /etc/postfix/virtual '{ print $2 }' > /etc/postfix/tmp/virtual-receivers \ && sed -r 's,(.+)@(.+),\2/\1/,' /etc/postfix/tmp/virtual-receivers > /etc/postfix/tmp/virtual-receiver-folders \ - && paste /etc/postfix/tmp/virtual-receivers /etc/postfix/tmp/virtual-receiver-folders > /etc/postfix/virtual-mailbox-maps - -# map virtual aliases and user/filesystem mappings -RUN postmap /etc/postfix/virtual \ - && postmap /etc/postfix/virtual-mailbox-maps - -# add user vmail who own all mail folders -RUN groupadd -g 5000 vmail \ + && paste /etc/postfix/tmp/virtual-receivers /etc/postfix/tmp/virtual-receiver-folders > /etc/postfix/virtual-mailbox-maps \ + # map virtual aliases and user/filesystem mappings + postmap /etc/postfix/virtual \ + && postmap /etc/postfix/virtual-mailbox-maps \ + # add user vmail who own all mail folders + groupadd -g 5000 vmail \ && useradd -g vmail -u 5000 vmail -d /srv/vmail -m \ && chown -R vmail:vmail /srv/vmail \ && chmod u+w /srv/vmail