2021-03-01 10:41:19 +00:00
---
title: 'Override the Default Configs | Dovecot'
---
## Add Configuration
2016-09-06 15:19:44 +00:00
The Dovecot default configuration can easily be extended providing a `config/dovecot.cf` file.
2021-03-01 10:41:19 +00:00
[Dovecot documentation ](https://wiki.dovecot.org ) remains the best place to find configuration options.
2016-09-04 17:00:17 +00:00
2016-09-04 17:13:18 +00:00
Your `docker-mailserver` folder should look like this example:
2021-03-01 10:41:19 +00:00
```txt
2016-09-04 17:13:18 +00:00
├── config
│ ├── dovecot.cf
│ ├── postfix-accounts.cf
│ └── postfix-virtual.cf
├── docker-compose.yml
└── README.md
```
2020-05-11 09:54:36 +00:00
One common option to change is the maximum number of connections per user:
2021-03-01 10:41:19 +00:00
```cf
2020-05-11 09:54:36 +00:00
mail_max_userip_connections = 100
```
2021-03-01 10:41:19 +00:00
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.
2020-05-11 09:54:36 +00:00
2021-03-01 10:41:19 +00:00
This limit is quickly reached if users connect to the mail server with multiple end devices.
2016-09-06 15:19:44 +00:00
2021-03-01 10:41:19 +00:00
## Override Configuration
2016-09-06 15:19:44 +00:00
2021-03-01 10:41:19 +00:00
For major configuration changes it’ s best to override the dovecot configuration files. For each configuration file you want to override, add a list entry under the `volumes` key.
2016-09-06 15:19:44 +00:00
2021-03-01 10:41:19 +00:00
```yaml
2016-09-06 15:19:44 +00:00
services:
mail:
volumes:
- maildata:/var/mail
- ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf
```
2021-03-01 10:41:19 +00:00
## Debugging
2016-09-04 17:00:17 +00:00
2021-03-01 10:41:19 +00:00
To debug your dovecot configuration you can use:
2016-09-04 17:00:17 +00:00
2021-03-01 10:41:19 +00:00
- This command: `./setup.sh debug login doveconf | grep <some-keyword>`
- Or: `docker exec -it <your-container-name> doveconf | grep <some-keyword>`
2016-09-04 17:00:17 +00:00
2021-03-01 10:41:19 +00:00
!!! note
2021-03-02 16:39:06 +00:00
[`setup.sh`][github-file-setupsh] is included in the `docker-mailserver` repository. Make sure to grap the one matching your image version.
2016-09-04 17:00:17 +00:00
2021-03-01 10:41:19 +00:00
The `config/dovecot.cf` is copied internally to `/etc/dovecot/local.conf` . To check this file run:
2016-09-04 17:00:17 +00:00
```sh
2021-03-01 10:41:19 +00:00
docker exec -it < your-container-name > cat /etc/dovecot/local.conf
2016-09-04 17:00:17 +00:00
```
2021-03-01 10:41:19 +00:00
[github-file-setupsh]: https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh