}
''
+ # ACL
+ ''
+ mail_plugins = $mail_plugins acl
+ plugin {
+ acl = vfile:${pkgs.writeText "dovecot-acl" ''
+ Backup/* owner lrp
+ ''}
+ acl_globals_only = yes
+ }
+ ''
+
# Full text search
''
# needs to be bigger than any mailbox size
sieve_plugins = sieve_imapsieve sieve_extprograms
imapsieve_url = sieve://127.0.0.1:4190
+ sieve_before = file:${./sieve_scripts}/backup.sieve
+
# From elsewhere to Junk folder
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY APPEND
# Needs to come last if there are mail_plugins entries
''
protocol imap {
- mail_plugins = $mail_plugins imap_sieve
+ mail_plugins = $mail_plugins imap_sieve imap_acl
}
protocol lda {
mail_plugins = $mail_plugins sieve
--- /dev/null
+# vim: filetype=sieve
+require ["copy","mailbox","fileinto","regex"];
+if not header :regex "subject" "^TestMailImmae ?$" {
+ if header :is "X-Spam" "Yes" {
+ fileinto :create :copy "Backup/Spam";
+ } else {
+ fileinto :create :copy "Backup/Ham";
+ }
+}