1
1
mirror of https://github.com/docker-mailserver/docker-mailserver synced 2024-12-18 23:14:11 +01:00
docker-mailserver/docs/content/config/advanced/override-defaults/dovecot.md
Georg Lauterbach c461dabe9e
docs/misc: update to align with Docker Compose v2 (#3295)
* rename: `docker-compose.yml` => `compose.yaml`
* rename: `docker-compose` => `docker compose`
2023-05-10 11:02:44 +02:00

2.3 KiB
Raw Permalink Blame History

title
Override the Default Configs | Dovecot

Add Configuration

The Dovecot default configuration can easily be extended providing a docker-data/dms/config/dovecot.cf file. Dovecot documentation remains the best place to find configuration options.

Your DMS folder structure should look like this example:

├── docker-data/dms/config
│   ├── dovecot.cf
│   ├── postfix-accounts.cf
│   └── postfix-virtual.cf
├── compose.yaml
└── README.md

One common option to change is the maximum number of connections per user:

mail_max_userip_connections = 100

Another important option is the default_process_limit (defaults to 100). If high-security mode is enabled you'll need to make sure this count is higher than the maximum number of users that can be logged in simultaneously.

This limit is quickly reached if users connect to DMS with multiple end devices.

Override Configuration

For major configuration changes its best to override the dovecot configuration files. For each configuration file you want to override, add a list entry under the volumes key.

services:
  mailserver:
    volumes:
      - ./docker-data/dms/mail-data/:/var/mail/
      - ./docker-data/dms/config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf

You will first need to obtain the configuration from the running container (where mailserver is the container name):

mkdir -p ./docker-data/dms/config/dovecot
docker cp mailserver:/etc/dovecot/conf.d/10-master.conf ./docker-data/dms/config/dovecot/10-master.conf

Debugging

To debug your dovecot configuration you can use:

  • This command: ./setup.sh debug login doveconf | grep <some-keyword>
  • Or: docker exec -it mailserver doveconf | grep <some-keyword>

!!! note setup.sh is included in the DMS repository. Make sure to use the one matching your image version release.

The file docker-data/dms/config/dovecot.cf is copied internally to /etc/dovecot/local.conf. To verify the file content, run:

docker exec -it mailserver cat /etc/dovecot/local.conf