diff options
| author | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-04-06 19:51:43 +0100 |
|---|---|---|
| committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-04-06 19:51:43 +0100 |
| commit | 8cce1ff3e54c89dbfb80851cf51dfbb7232f2d76 (patch) | |
| tree | 92f9810d29f49137c96e0d675cef0bd1f1805789 /roles/dovecot/files/dovecot.conf | |
| parent | 50399ab1871dc4932a814208d1bbe37fb88eee14 (diff) | |
| download | infra-8cce1ff3e54c89dbfb80851cf51dfbb7232f2d76.tar.gz infra-8cce1ff3e54c89dbfb80851cf51dfbb7232f2d76.tar.bz2 infra-8cce1ff3e54c89dbfb80851cf51dfbb7232f2d76.zip | |
Add dovecot role
Diffstat (limited to 'roles/dovecot/files/dovecot.conf')
| -rw-r--r-- | roles/dovecot/files/dovecot.conf | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/roles/dovecot/files/dovecot.conf b/roles/dovecot/files/dovecot.conf new file mode 100644 index 0000000..35e8c3f --- /dev/null +++ b/roles/dovecot/files/dovecot.conf @@ -0,0 +1,74 @@ +# Protocols we want to be serving. +protocols = imap pop3 + +# Path to the mail directory. +mail_location = maildir:/var/mail/%d/%n/Maildir + +# Path to SSL certificate files. +ssl_cert = </etc/letsencrypt/live/mail.ilvokhin.com/fullchain.pem +ssl_key = </etc/letsencrypt/live/mail.ilvokhin.com/privkey.pem + +# Disable plaintext authentication, only SSL is allowed. +disable_plaintext_auth = yes + +service auth { + # Postfix smtp-auth. + unix_listener /var/spool/postfix/private/auth { + mode = 0666 + user = postfix + group = postfix + } +} + +namespace { + inbox = yes + separator = / + + # Create usual mail hierarchy. + mailbox Sent { + auto = subscribe + special_use = \Sent + } + + mailbox Drafts { + auto = subscribe + special_use = \Drafts + } + + mailbox Trash { + auto = subscribe + special_use = \Trash + } + + mailbox Junk { + auto = subscribe + special_use = \Junk + } +} + +# Use separate passwd file for storing passwords. +passdb { + driver = passwd-file + args = scheme=SHA512-CRYPT username_format=%u /etc/dovecot/passwd +} + +# Use the same separate passwd file for user lookup. +userdb { + driver = passwd-file + args = username_format=%u /etc/dovecot/passwd + override_fields = uid=vmail gid=vmail +} + +service imap-login { + # Do not listen for plain IMAP. + inet_listener imap { + port = 0 + } +} + +service pop3-login { + # Do not listen for plain POP3. + inet_listener pop3 { + port = 0 + } +} |