From b4f1145b6a391a1f46b0c0aeed2a4731aef605c0 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Mon, 18 Oct 2021 22:29:01 +0200 Subject: [PATCH] wip --- bundles/dovecot/files/dovecot.conf | 2 +- bundles/dovecot/files/learn-ham.sieve | 2 +- bundles/dovecot/files/learn-spam.sieve | 2 +- bundles/dovecot/items.py | 17 +++++++++++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/bundles/dovecot/files/dovecot.conf b/bundles/dovecot/files/dovecot.conf index 86f6a12..e920f43 100644 --- a/bundles/dovecot/files/dovecot.conf +++ b/bundles/dovecot/files/dovecot.conf @@ -116,7 +116,7 @@ plugin { sieve_plugins = sieve_imapsieve sieve_extprograms sieve_dir = /var/vmail/sieve/%u/ sieve = /var/vmail/sieve/%u.sieve - sieve_pipe_bin_dir = /var/vmail/sieve/ + sieve_pipe_bin_dir = /var/vmail/sieve/bin/ sieve_extensions = +vnd.dovecot.pipe sieve_after = /var/vmail/sieve/global/spam-to-folder.sieve diff --git a/bundles/dovecot/files/learn-ham.sieve b/bundles/dovecot/files/learn-ham.sieve index b1db631..0e791b2 100644 --- a/bundles/dovecot/files/learn-ham.sieve +++ b/bundles/dovecot/files/learn-ham.sieve @@ -4,4 +4,4 @@ if string "${mailbox}" "Trash" { stop; } -pipe :copy "rspamd-learn-ham.sh"; +pipe :copy "learn-ham.sh"; diff --git a/bundles/dovecot/files/learn-spam.sieve b/bundles/dovecot/files/learn-spam.sieve index 6ab2ed3..5e70552 100644 --- a/bundles/dovecot/files/learn-spam.sieve +++ b/bundles/dovecot/files/learn-spam.sieve @@ -1,3 +1,3 @@ require ["vnd.dovecot.pipe", "copy", "imapsieve"]; -pipe :copy "rspamd-learn-spam.sh"; +pipe :copy "learn-spam.sh"; diff --git a/bundles/dovecot/items.py b/bundles/dovecot/items.py index 16ead64..2e643a4 100644 --- a/bundles/dovecot/items.py +++ b/bundles/dovecot/items.py @@ -29,6 +29,10 @@ directories = { 'owner': 'vmail', 'group': 'vmail', }, + '/var/vmail/sieve/bin': { + 'owner': 'vmail', + 'group': 'vmail', + }, } files = { @@ -71,12 +75,18 @@ files = { '/var/vmail/sieve/global/spam-to-folder.sieve': { 'owner': 'vmail', 'group': 'vmail', + 'triggers': { + 'svc_systemd:dovecot:restart', + }, }, '/var/vmail/sieve/global/learn-ham.sieve': { 'owner': 'vmail', 'group': 'vmail', + 'triggers': { + 'svc_systemd:dovecot:restart', + }, }, - '/var/vmail/sieve/global/learn-ham.sh': { + '/var/vmail/sieve/bin/learn-ham.sh': { 'owner': 'vmail', 'group': 'vmail', 'mode': '550', @@ -84,8 +94,11 @@ files = { '/var/vmail/sieve/global/learn-spam.sieve': { 'owner': 'vmail', 'group': 'vmail', + 'triggers': { + 'svc_systemd:dovecot:restart', + }, }, - '/var/vmail/sieve/global/learn-spam.sh': { + '/var/vmail/sieve/bin/learn-spam.sh': { 'owner': 'vmail', 'group': 'vmail', 'mode': '550',