1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-20 14:47:44 +02:00
docker-mailserver/docs/content/config/advanced/override-defaults/dovecot.md
William Desportes 4d3fade23b
docs: Update all docker-compose files to use the same version and examples (#2159)
Initial pass for achieving more consistency with docker-compose related configs.

* Set DMS_DEBUG to 0
* align with default docker-compose.yml

Co-authored-by: Casper <casperklein@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2021-09-20 19:27:55 +12:00

62 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 'Override the Default Configs | Dovecot'
---
## Add Configuration
The Dovecot default configuration can easily be extended providing a `config/dovecot.cf` file.
[Dovecot documentation](https://wiki.dovecot.org) remains the best place to find configuration options.
Your `docker-mailserver` folder should look like this example:
```txt
├── config
│ ├── dovecot.cf
│ ├── postfix-accounts.cf
│ └── postfix-virtual.cf
├── docker-compose.yml
└── README.md
```
One common option to change is the maximum number of connections per user:
```cf
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 the mail server 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.
You will need to first obtain the configuration from the running container: `mkdir -p ./config/dovecot && docker cp mailserver:/etc/dovecot/conf.d/10-master.conf ./config/dovecot/10-master.conf`
```yaml
services:
mailserver:
volumes:
- maildata:/var/mail
- ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/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`][github-file-setupsh] is included in the `docker-mailserver` repository. Make sure to grap the one matching your image version.
The `config/dovecot.cf` is copied internally to `/etc/dovecot/local.conf`. To check this file run:
```sh
docker exec -it mailserver cat /etc/dovecot/local.conf
```
[github-file-setupsh]: https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh