8be9575a by Adam Heath

Importing into a fresh repository.

1 parent 4c82e509
FROM docker.brainfood.com/dumb-init
ADD /overlay/ /
# export DEBIAN_FRONTEND=noninteractive RUNLEVEL=1
RUN ["apt-docker", \
"-y", "install", "bsd-mailx", "postfix", "dovecot-imapd", \
";" ]
EXPOSE 25 143
VOLUME ["/home"]
version: '2'
services:
build:
image: docker.brainfood.com/mail
build:
context: .
args:
- http_proxy
- https_proxy
#!/bin/bash
HOSTNAME=$(hostname -f)
postconf -e \
"myhostname = $HOSTNAME" \
"mydestination = $HOSTNAME, localhost.localdomain, localhost" \
"mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/8 172.0.0.0/8"\
"inet_protocols = all" \
"relayhost = $POSTFIX_RELAYHOST" \
"virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp" \
"home_mailbox = Maildir/" \
&& true
touch /etc/postfix/virtual
postmap /etc/postfix/virtual
if [[ $POSTFIX_REDIRECT_MAIL_LOCALHOST ]]; then
echo "/.+@.+/ $POSTFIX_REDIRECT_MAIL_LOCALHOST@localhost" > /etc/postfix/virtual-regexp
if ! getent passwd $POSTFIX_REDIRECT_MAIL_LOCALHOST > /dev/null; then
adduser --disabled-password --gecos "$POSTFIX_REDIRECT_MAIL_LOCALHOST" $POSTFIX_REDIRECT_MAIL_LOCALHOST
fi
echo "$POSTFIX_REDIRECT_MAIL_LOCALHOST:$POSTFIX_REDIRECT_MAIL_LOCALHOST" | chpasswd
else
: > /etc/postfix/virtual-regexp
fi
mail_location = maildir:~/Maildir
disable_plaintext_auth = no