Sign inSign up

instantlinux/dovecot

By instantlinux

Updated 18 days ago

dovecot imapd for mobile device email access

Image
2

10K+

instantlinux/dovecot repository overview

dovecot

The dovecot imapd daemon in a small Alpine Linux container, with postfix for local delivery and procmail for filtering.

Usage

Configuration is defined as files in a volume mounted as /etc/dovecot/conf.local. Within that directory:

  • Define your local settings as dovecot.conf.

  • If you have an LDAP server, put its settings in passdb section of dovecot.conf. The helm chart provided here can support either Active Directory or openldap.

  • (Optional, to save startup time) generate a dh.pem file for TLS:

    openssl dhparam -dsaparam -out dh.pem 4096
    
  • (Optional, to save startup time) generate self-signed server.pem and server.key files for mounting to /etc/ssl/dovecot

    wget https://raw.githubusercontent.com/dovecot/core/release-2.3.4/doc/mkcert.sh
    wget https://dovecot.org/doc/dovecot-openssl.cnf
    # (edit dovecot-openssl.cnf to suit)
    ./mkcert.sh
    

For settings, see etc-example directory and helm / docker-compose.yml. The k8s/Makefile.vars file defines default values.

Also configure postfix as described in the postfix image.

This repo has complete instructions for building a kubernetes cluster where you can launch with helm using make after customizing overrides of values.yaml after cloning this repo:

git clone https://github.com/instantlinux/docker-tools.git
cd docker-tools/k8s
make dovecot

To provide high availability across the cluster, the helm chart here includes an optional data-sync service to keep the inbox, mail and spool directories synchronized across 2 or more worker nodes. Minor data loss can occur when the service shifts from one worker to another, so this feature isn't recommended for large production deployments (when running on a cloud provider, simply use their block storage capabilities). That said, unison-based data-sync service has been rock-solid on a bare-metal cluster for years.

Auth is the most challenging aspect of implementing dovecot. Use the following command from with the container to verify user authentication:

doveadm auth login <user>

If using openldap, turn on openldap's log setting BER to view raw packet contents as you troubleshoot login from dovecot.

Variables
VariableDefaultDescription
LDAP_SECRETNAMEldap-ro-passwdname of secret for LDAP credential
SSL_DHFilename (in conf.local) of DH parameters
TZUTCtime zone

Need more configurability? Edit the ConfigMap defined in the helm chart.

Secrets
SecretDescription
ldap-ro-passwdpassword for looking up LDAP users
*key.pemkeyfile specified for ssl_dh certificate
Upgrade Notes
  • When upgrading to 2.3.14+, replace any references to hash: with lmdb: in your config files.

  • When upgrading to 2.4+, there are a lot of gratuitous config-directive changes. The Docker image doesn't contain configs but the helm chart provided here has a configmap template that contains the following changes:

Helm var2.32.4Notes
urishostsldap_urishost becomes ldap://host:389
ldap_version(unchanged)
basebaseldap_base
bindauth_bindldap_bind
bind_userdnauth_bind_userdnldap_bind_userdn
tlstlsldap_starttls
dovecot_config_versionnew
dovecot_storage_versionnew
filterldap_filternow required
args(removed)directives moved to passdb config
addresslisten
ssl_certssl_server_cert_fileangle bracket removed
ssl_dhssl_server_dh_fileangle bracket removed
ssl_keyssl_server_key_fileangle bracket removed
Contributing

If you want to make improvements to this image, see CONTRIBUTING.

Tag summary

Content type

Image

Digest

sha256:1f9704db8

Size

21.2 MB

Last updated

18 days ago

docker pull instantlinux/dovecot