From 18b573a9c691f4962987a6e6613bda13160e9cfc Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 7 Nov 2020 22:31:47 +0100 Subject: [PATCH] bundles/dovecot: introduce --- bundles/dovecot/files/dovecot-sql.conf | 5 + bundles/dovecot/files/dovecot.conf | 130 ++++++++++++++++++++++++ bundles/dovecot/files/learn-ham.sieve | 15 +++ bundles/dovecot/files/learn-spam.sieve | 7 ++ bundles/dovecot/files/spam-global.sieve | 11 ++ bundles/dovecot/items.py | 66 ++++++++++++ bundles/dovecot/metadata.py | 52 ++++++++++ 7 files changed, 286 insertions(+) create mode 100644 bundles/dovecot/files/dovecot-sql.conf create mode 100644 bundles/dovecot/files/dovecot.conf create mode 100644 bundles/dovecot/files/learn-ham.sieve create mode 100644 bundles/dovecot/files/learn-spam.sieve create mode 100644 bundles/dovecot/files/spam-global.sieve create mode 100644 bundles/dovecot/items.py create mode 100644 bundles/dovecot/metadata.py diff --git a/bundles/dovecot/files/dovecot-sql.conf b/bundles/dovecot/files/dovecot-sql.conf new file mode 100644 index 0000000..c8d6ab4 --- /dev/null +++ b/bundles/dovecot/files/dovecot-sql.conf @@ -0,0 +1,5 @@ +connect = host=localhost dbname=${dbname} user=${dbuser} password=${dbpass} +driver = pgsql +default_pass_scheme = MD5-CRYPT +password_query = SELECT username as user, password FROM mailbox WHERE username = '%u' AND active = true +user_query = SELECT '/var/mail/vmail' || maildir as home, 65534 as uid, 65534 as gid FROM mailbox WHERE username = '%u' AND active = true diff --git a/bundles/dovecot/files/dovecot.conf b/bundles/dovecot/files/dovecot.conf new file mode 100644 index 0000000..56a3ae4 --- /dev/null +++ b/bundles/dovecot/files/dovecot.conf @@ -0,0 +1,130 @@ +!include conf.d/*.conf + +namespace inbox { + type = private + inbox = yes + location = + mailbox Drafts { + auto = subscribe + special_use = \Drafts + } + mailbox Junk { + auto = subscribe + special_use = \Junk + } + mailbox Sent { + auto = subscribe + special_use = \Sent + } + mailbox Trash { + auto = subscribe + special_use = \Trash + } + prefix = +} + +mail_location = maildir:/var/mail/vmail/%d/%n +protocols = imap lmtp sieve + +ssl = yes +ssl_cert =