#jprjr/ubuntu-dovecot:14.04
This is my attempt to setup Dovecot in Docker. Inspired by mailinabox.
This is still very experimental - do not use this in production!
Well right now, I'm still working on getting other images setup (like postfix, spamassassin, etc), so I haven't fully tested this yet. But here's what I do know:
/private/ssl/ssl_certificate.pem and /private/ssl/ssl_private_key.pemAt startup, I read everything from /srv/ssl and copy it to /srv/mail/ssl/
and chown it to the Dovecot user.
Also at startup, I check if /etc/dovecot is empty. If so, a default
config is copied into /etc/dovecot
If /etc/dovecot was empty and you either:
mysqlMYSQL_HOSTThen I also try to setup the database (more details below, under "Environment Variables"
/srv/mail - Used for storing mail/private/ssl - Used for reading in the SSL cert and key you want to use/etc/dovecot - Used for storing the dovecot configuration. This will
be rebuilt using environment variables at startup, but this is a handy way
to do more customization./private/vars.sh - You can place any of the listed environment variables
in this file and they'll be sourced at startup.MYSQL_HOSTMYSQL_USERMYSQL_PASSDOVECOT_SQL_USERDOVECOT_SQL_PASSADMIN_EMAILSKIP_DB_SETUPSKIP_DOVECOT_SETUPSYSLOG_HOSTMYSQL_HOST - use this to specify your MySQL server.MYSQL_USER - use this to specify your root MySQL user (optional)MYSQL_PASS - use this to specify your root MySQL password (optional)If MYSQL_HOST is set (or you have a linked container named mysql), then
that MySQL server will be used for querying users.
If MYSQL_USER and MYSQL_PASS are set, then I'll create the needed
database for dovecot. If these are blank, I skip that step.
DOVECOT_SQL_USERDOVECOT_SQL_PASSThese drive what database name to use, as well as a username and password for that database. These are required variables.
ADMIN_EMAIL - This is for creating a "postmaster" email address.
SKIP_DB_SETUP - if this is set to anything, then the entire DB setup
process will be skipped. This is useful if you already have a db of users
you want to use, and don't want me trying to create tables.
SKIP_DOVECOT_SETUP - Disables creating the /etc/dovecot folder.
SYSLOG_HOST - Forward syslogs to this host.
Content type
Image
Digest
sha256:62d242f45…
Size
133.4 MB
Last updated
over 8 years ago
docker pull jprjr/ubuntu-dovecot