added README

This commit is contained in:
nd 2020-05-29 11:52:48 +02:00
parent 38ff3f3fe4
commit 2f80df9c5a
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
6 changed files with 43 additions and 14 deletions

30
README.md Normal file
View file

@ -0,0 +1,30 @@
# dovecot
## Parameters and defaults
All configuration is to be placed inside the `dovecot` dict.
```
# Array of protocols to enable, by default 'imaps' and 'sieve' are enabled.
# Can be 'imap', 'imaps', 'pop3', 'pop3s', 'sieve'
protocols: ['imaps', 'sieve' ]
# Array of IPs to bind on. By default we bind wildcard IPv4 and IPv6
listen: ["*", "::"]
# Authentication mechanisms to support, for options see https://doc.dovecot.org/configuration_manual/authentication/authentication_mechanisms/
auth_mechanisms: ["plain", "login"]
# Array of users if dovecot should handle users in a db. Not usable if you enable ldap.
# Each user is a dict, for options see *userdict* below
user: []
```
**userdict**
```
# username
name: "name"
# clear text password
password: "pw"
```

10
defaults/main.yml Normal file
View file

@ -0,0 +1,10 @@
dovecot:
protocols:
- imaps
listen:
- "*"
- "::"
auth_mechanisms:
- plain
- login
user: []

View file

@ -30,14 +30,6 @@
notify:
- restart dovecot
- name: replace lines in config
lineinfile:
path: /etc/dovecot/conf.d/10-mail.conf
line: "mail_location = maildir:~/Maildir"
regexp: '^mail_location '
notify:
- restart dovecot
- name: setup dovecot users
template:
src: passwd.j2

View file

@ -96,7 +96,7 @@
# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey
# gss-spnego
# NOTE: See also disable_plaintext_auth setting.
auth_mechanisms = {{ dovecot.auth_mechanisms }}
auth_mechanisms = {{ dovecot.auth_mechanisms|join(' ') }}
##
## Password and user databases

View file

@ -2,9 +2,6 @@
## ManageSieve specific settings
##
# Uncomment to enable managesieve protocol:
protocols = $protocols sieve
# Service definitions
service managesieve-login {

View file

@ -1,13 +1,13 @@
## Dovecot configuration file
# Enable installed protocols
protocols = {{ dovecot.protocols }}
protocols = {{ dovecot.protocols|join(' ') }}
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = {{ dovecot.listen }}
listen = {{ dovecot.listen|join(', ') }}
# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/