Sieve scripts to learn spam on rspamd

This commit is contained in:
Tube 2023-11-06 09:25:21 +01:00
parent 75e2dbec0d
commit 1185caea79
1 changed files with 11 additions and 6 deletions

View File

@ -112,7 +112,6 @@ namespace inbox {
auto = subscribe auto = subscribe
special_use = \Trash special_use = \Trash
} }
mailbox Sent { mailbox Sent {
auto = subscribe auto = subscribe
special_use = \Sent special_use = \Sent
@ -120,31 +119,37 @@ namespace inbox {
} }
{{/vars.dovecot.cfg.default_imap_folders}} {{/vars.dovecot.cfg.default_imap_folders}}
{{#vars.dovecot.cfg.rspamd_scripts}}
protocol imap { protocol imap {
mail_plugins = $mail_plugins imap_sieve mail_plugins = $mail_plugins imap_sieve
} }
{{#vars.dovecot.cfg.rspamd_scripts}}
plugin { plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms sieve_plugins = sieve_imapsieve sieve_extprograms
# From elsewhere to Spam folder # From elsewhere to Spam folder
imapsieve_mailbox1_name = Junk imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/etc/dovecot/rspamd/rspamd-learn-spam.sieve imapsieve_mailbox1_before = file:{{vars.dovecot.cfg_dir}}/rspamd/rspamd-learn-spam.sieve
# From Spam folder to elsewhere # From Spam folder to elsewhere
imapsieve_mailbox2_name = * imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/etc/dovecot/rspamd/rspamd-learn-ham.sieve imapsieve_mailbox2_before = file:{{vars.dovecot.cfg_dir}}/rspamd/rspamd-learn-ham.sieve
sieve_pipe_bin_dir = /etc/dovecot/rspamd sieve_pipe_bin_dir = {{vars.dovecot.cfg_dir}}/rspamd
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
} }
{{/vars.dovecot.cfg.rspamd_scripts}} {{/vars.dovecot.cfg.rspamd_scripts}}
{{#vars.dovecot.cfg.global_sieve_after}}
plugin {
sieve_after = {{vars.dovecot.cfg_dir}}/rspamd/global_sieve_after.sieve
}
{{/vars.dovecot.cfg.global_sieve_after}}
{{vars.dovecot.cfg.raw}} {{vars.dovecot.cfg.raw}}