From a2b4358cfc0d4715b5a7c46dbc1324f973393c43 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 12 Mar 2026 20:23:45 +0000 Subject: [PATCH] Add dovecot/dovecot.conf --- dovecot/dovecot.conf | 167 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 dovecot/dovecot.conf diff --git a/dovecot/dovecot.conf b/dovecot/dovecot.conf new file mode 100644 index 0000000..c8b3e4c --- /dev/null +++ b/dovecot/dovecot.conf @@ -0,0 +1,167 @@ +### +### Version settings +############################# + +dovecot_config_version = 2.4.0 +dovecot_storage_version = 2.4.0 + + +### +### Logging settings +############################# + +log_path = /var/log/dovecot.log +auth_verbose=yes + +### +### Protocol settings +############################# + +protocols { + lmtp = yes + imap = yes +} + +protocol imap { + mail_plugins { + imap_sieve = yes + } + mail_max_userip_connections = 50 + imap_idle_notify_interval = 29 mins +} + +protocol lmtp { + mail_plugins { + sieve = yes + notify = yes + push_notification = yes + } + postmaster_address = postmaster@tobiastime.xyz +} + +### +### SSL settings +############################# + +#actually use the proper paths +ssl_server_cert_file = /path/2/fullchain.pem +ssl_server_key_file = /path/2/privkey.pem +ssl_server_dh_file = /path/2/dh.pem +ssl_server_prefer_ciphers = server +ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 + +### +### Dovecot services +################################ + + +service lmtp { + #utilize proper path + unix_listener /path/2/private/dovecot-lmtp { + mode = 0660 + group = postfix + user = postfix + } +} + +service auth { + ### Auth socket for Postfix + unix_listener /path/2/private/auth { + mode = 0660 + user = postfix + group = postfix + } + ### Auth socket for LMTP + unix_listener auth-userdb { + mode = 0660 + user = vmail + group = vmail + } +} + +### +### Client authentication +############################# + +auth_mechanisms = plain login +auth_username_format = %{user | lower } + +userdb passwd { + +} + +passdb pam { + +} + +### +### Address tagging +######################## +recipient_delimiter = + +lmtp_save_to_detail_mailbox = yes + +### +### Mail location +####################### + +mail_uid = vmail +mail_gid = vmail +mail_privileged_group = vmail + +mail_path = ~/mail +mailbox_list_layout = fs +mail_driver = maildir +mail_home = /home/%{user | username | lower}/Mail + +### +### Mailbox configuration +######################## + +namespace inbox { + inbox = yes + + mailbox Spam { + auto = subscribe + special_use = \Junk + } + + mailbox Trash { + auto = subscribe + special_use = \Trash + } + + mailbox Drafts { + auto = subscribe + special_use = \Drafts + } + + mailbox Sent { + auto = subscribe + special_use = \Sent + } +} + + +### +### Mail plugins +############################ + +sieve_plugins { + sieve_imapsieve = yes + sieve_extprograms = yes +} + +sieve_script default { + type = before + # use actual path + path = /path/2/sieve/default.sieve +} + +mailbox Spam { + sieve_script spam { + type = before + cause = copy + # use actual path + path = /path/2/learn-spam.sieve + } +} \ No newline at end of file