|
|
# Dovecot
## Setup Server
### Docker
The official container and documentation was made by [tvial](https://hub.docker.com/r/tvial/docker-mailserver).It contains dovecot, antispam, antivirus, ssl, etc.
#### Configuration
The configuration is done automatically using scripts by tvial.First you need to download the essential setup files.
```shellcurl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.shcurl -o docker-compose.yml https://raw.githubusercontent.com/tomav/docker-mailserver/master/docker-compose.yml.distcurl -o .env https://raw.githubusercontent.com/tomav/docker-mailserver/master/.env.distcurl -o env-mailserver https://raw.githubusercontent.com/tomav/docker-mailserver/master/env-mailserver.dist```
After that you need to edit the `.env` and the `env-mailserver` files toconfigure the mailserver.
You then need to start the container with the `rebuild.sh` and add emailaccounts using the following command.
`./setup.sh email add <user@domain> (<password>)`
And finally generate the DCIM keys and rebuild once again.
`./setup.sh config dkim`
Afterwards you're ready to go by once again running the `rebuild.sh` file.
#### Rebuild
```shell#!/bin/sh
docker-compose downdocker pull tvial/docker-mailserver:latestdocker-compose up -d```
|