From 8a8bd926db44ae235a14558ba729d72e52478578 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 29 Sep 2022 15:57:02 +0200 Subject: [PATCH] filter spam AFTER --- Dockerfile | 4 ++-- rootfs/etc/confd/conf.d/spam.sieve.toml | 2 +- rootfs/etc/confd/templates/90-sieve.conf.tmpl | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e71e6f..607024f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,9 +95,9 @@ RUN addgroup -g 1111 vmail RUN adduser -u 1111 -h /var/lib/vmail -D -G vmail vmail RUN mkdir -p /etc/dovecot/conf.d -RUN mkdir /var/lib/vmail/sieve-before/ +RUN mkdir /var/lib/vmail/sieve-after/ -RUN chown -R vmail:vmail /var/lib/vmail/sieve-before/ +RUN chown -R vmail:vmail /var/lib/vmail/sieve-after/ EXPOSE 143 4190 6334 7777 diff --git a/rootfs/etc/confd/conf.d/spam.sieve.toml b/rootfs/etc/confd/conf.d/spam.sieve.toml index 7bc23d1..f4b1072 100644 --- a/rootfs/etc/confd/conf.d/spam.sieve.toml +++ b/rootfs/etc/confd/conf.d/spam.sieve.toml @@ -1,6 +1,6 @@ [template] src = "spam.sieve.tmpl" -dest = "/var/lib/vmail/sieve-before/spam.sieve" +dest = "/var/lib/vmail/sieve-after/spam.sieve" gid = 1111 uid = 1111 mode = "0660" diff --git a/rootfs/etc/confd/templates/90-sieve.conf.tmpl b/rootfs/etc/confd/templates/90-sieve.conf.tmpl index 31271f8..4e521c0 100644 --- a/rootfs/etc/confd/templates/90-sieve.conf.tmpl +++ b/rootfs/etc/confd/templates/90-sieve.conf.tmpl @@ -1,3 +1,4 @@ plugin { - sieve_before = /var/lib/vmail/sieve-before/ + sieve = /var/lib/vmail/mail/%u/rules.sieve + sieve_after = /var/lib/vmail/sieve-after/ }