Skip to content

Instantly share code, notes, and snippets.

@diresi
Created September 20, 2017 19:00
Show Gist options
  • Save diresi/a580c8791966640f6dcb8e1e25689a3b to your computer and use it in GitHub Desktop.
Save diresi/a580c8791966640f6dcb8e1e25689a3b to your computer and use it in GitHub Desktop.
--- dovecot/conf/dovecot.conf 2017-07-10 20:55:14.000000000 +0000
+++ PATCHES/dovecot.conf 2017-09-20 18:56:53.000000000 +0000
@@ -3,9 +3,9 @@
###############
log_path = /dev/stderr
protocols = imap pop3 lmtp sieve
-postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
-hostname = {{ HOSTNAME }}
-mail_plugins = $mail_plugins quota
+postmaster_address = THE-ADMIN-GUY@MY-DOMAIN.TLD
+hostname = MY-HOST.MY-DOMAIN.TLD
+mail_plugins = $mail_plugins quota virtual
submission_host = smtp
service dict {
@@ -52,6 +52,30 @@
}
}
+namespace {
+ #prefix = INBOX. # show inline with oder INBOX/ folders
+ prefix = Virtual. # show as custom top-level structure
+ separator = .
+ location = virtual:/mail/%u/virtual
+
+ # # reload dovecot
+ # doveadm reload
+ # # create your first virtual folders:
+ # cat > /mail/%u/virtual/recent/dovecot-virtual < EOF
+ # INBOX
+ # INBOX/*
+ # all younger 172800
+ # ^D
+ # cat > /mail/%u/virtual/unseen/dovecot-virtual < EOF
+ # *
+ # -Trash
+ # -Trash/*
+ # unseen
+ # ^D
+ # # fix permissions
+ # chmod -R mail.mail /mail/%u/virtual
+}
+
###############
# TLS
###############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment