From 45e5f5f4d2099fc6abec796ce3f0011242d1fc67 Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Mon, 11 Jan 2016 22:52:17 +0100 Subject: [PATCH] Setup a basic configuration for postfix and dovecot --- Dockerfile | 13 ++++++++----- config/dovecot/{empty => dovecot.conf} | 0 config/postfix/{empty => main.cf} | 0 config/{supervisord/empty => postfix/master.cf} | 0 config/supervisor/supervisord.conf | 8 ++++++++ 5 files changed, 16 insertions(+), 5 deletions(-) rename config/dovecot/{empty => dovecot.conf} (100%) rename config/postfix/{empty => main.cf} (100%) rename config/{supervisord/empty => postfix/master.cf} (100%) create mode 100644 config/supervisor/supervisord.conf diff --git a/Dockerfile b/Dockerfile index 7f0b1b8f..3d8fb73c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ FROM debian:jessie -RUN apt-get update \ +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ && apt-get install -y --no-install-recommends \ - postfix dovecot-imapd dovecot-sqlite \ # basics - dovecot-sieve dovecot-managesieved \ # filters - dovecot-antispam spamassassin clamav \ # additional utilities - supervisord \ # glue + postfix dovecot-imapd dovecot-sqlite \ + dovecot-sieve dovecot-managesieved \ + dovecot-antispam spamassassin clamav \ + supervisor \ && apt-get clean ADD config /etc/ + +CMD ["/usr/bin/supervisord"] diff --git a/config/dovecot/empty b/config/dovecot/dovecot.conf similarity index 100% rename from config/dovecot/empty rename to config/dovecot/dovecot.conf diff --git a/config/postfix/empty b/config/postfix/main.cf similarity index 100% rename from config/postfix/empty rename to config/postfix/main.cf diff --git a/config/supervisord/empty b/config/postfix/master.cf similarity index 100% rename from config/supervisord/empty rename to config/postfix/master.cf diff --git a/config/supervisor/supervisord.conf b/config/supervisor/supervisord.conf new file mode 100644 index 00000000..f7e74dc5 --- /dev/null +++ b/config/supervisor/supervisord.conf @@ -0,0 +1,8 @@ +[supervisord] +nodaemon = true + +[program:postfix] +command = /usr/lib/postfix/master -d + +[program:dovecot] +command = /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F