Implements rspmad spam/ham learning when impap moved mesages

This commit is contained in:
Tobias Herre 2023-11-03 08:56:25 +01:00
parent b6bb057652
commit 1707d577ad
1 changed files with 50 additions and 0 deletions

View File

@ -95,6 +95,56 @@ service {{@}} {
{{/vars.dovecot.cfg.services}}
{{#vars.dovecot.cfg.default_imap_folders}}
namespace inbox {
inbox = yes
# These mailboxes are widely used and could perhaps be created automatically:
mailbox Drafts {
special_use = \Drafts
auto = subscribe
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
}
{{/vars.dovecot.cfg.default_imap_folders}}
{{#vars.dovecot.cfg.rspamd_scripts}}
protocol imap {
mail_plugins = $mail_plugins imap_sieve
}
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
# From elsewhere to Spam folder
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/etc/dovecot/rspamd/rspamd-learn-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/etc/dovecot/rspamd/rspamd-learn-ham.sieve
sieve_pipe_bin_dir = /etc/dovecot/rspamd
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
}
{{/vars.dovecot.cfg.rspamd_scripts}}
{{vars.dovecot.cfg.raw}}