diff --git a/playbook.yaml b/playbook.yaml index 538de7a..7d2254e 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -11,6 +11,14 @@ roles: - { role : web1, tags : [ "web1" ] } +- hosts: mail + roles: + - { role : mail, tags : [ "mail" ] } + +- hosts: backup + roles: + - { role : backup, tags : [ "backup" ] } + - hosts: kube1 roles: - { role : docker-deployments, tags : [ "docker", "kube1" ] } diff --git a/roles/mail/files/dovecot.conf b/roles/mail/files/dovecot.conf new file mode 100644 index 0000000..9913e2e --- /dev/null +++ b/roles/mail/files/dovecot.conf @@ -0,0 +1,122 @@ +# Enable installed protocols +!include_try /usr/share/dovecot/protocols.d/*.protocol + +# logs +info_log_path = /var/dovecot/logs/dovecot_info.log +log_path = /var/dovecot/logs/dovecot.log + +protocols = imap pop3 lmtp + +# We're using Maildir format +mail_location = maildir:~/Maildir + +# If you're using POP3, you'll need this: +pop3_uidl_format = %g + +# Authentication configuration: +auth_verbose = yes +auth_mechanisms = plain +disable_plaintext_auth = no + +passdb { + driver = passwd-file + args = scheme=SHA512-CRYPT username_format=%n /var/dovecot/auth/passwd +} +userdb { + driver = passwd-file + args = username_format=%n /var/dovecot/auth/passwd +} + +# Postmaster +protocol lda { + postmaster_address = postmaster@example.com +} + +# Quotas mus be defined like this in passwd userdb_quota_rule=*:storage=100M +mail_plugins = $mail_plugins quota +protocol imap { + mail_plugins = $mail_plugins imap_quota +} +plugin { + quota = maildir +} +## SSL settings +# SSL/TLS support: yes, no, required. +ssl = yes +ssl_cert =