docker-mailserver/docs/content/advanced/override-defaults/dovecot.md

63 lines
1.8 KiB
Markdown
Raw Normal View History

2016-09-06 17:19:44 +02:00
# Add configuration
The Dovecot default configuration can easily be extended providing a `config/dovecot.cf` file.
2016-09-04 19:00:17 +02:00
[Dovecot documentation](http://wiki.dovecot.org/FrontPage) remains the best place to find configuration options.
2016-09-04 19:13:18 +02:00
Your `docker-mailserver` folder should look like this example:
```
├── config
│ ├── dovecot.cf
│ ├── postfix-accounts.cf
│ └── postfix-virtual.cf
├── docker-compose.yml
└── README.md
```
2020-05-11 11:54:36 +02:00
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 the mail server with multiple end devices.
2020-05-11 11:54:36 +02:00
2016-09-06 17:19:44 +02:00
# 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.
```yaml
version: '2'
services:
mail:
...
volumes:
- maildata:/var/mail
...
- ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf
```
2016-09-04 19:00:17 +02:00
# Debugging
To debug your dovecot configuration you can use this command:
```sh
./setup.sh debug login doveconf | grep <some-keyword>
```
[setup.sh](https://github.com/tomav/docker-mailserver/blob/master/setup.sh) is included in the `docker-mailserver` repository.
or
```sh
docker exec -ti <your-container-name> doveconf | grep <some-keyword>
```
The `config/dovecot.cf` is copied to `/etc/dovecot/local.conf`. To check this file run:
```sh
docker exec -ti <your-container-name> cat /etc/dovecot/local.conf
```