add sieve junk configuration

This commit is contained in:
Sebastian Hugentobler 2021-12-22 14:03:37 +01:00
parent 4193b863d5
commit 30a38705d8
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
6 changed files with 17 additions and 19 deletions

View File

@ -1,4 +1,4 @@
FROM alpine:3.14 as builder FROM alpine:3.15 as builder
RUN apk --no-cache add \ RUN apk --no-cache add \
rpcgen \ rpcgen \
@ -16,15 +16,15 @@ RUN apk --no-cache add \
icu-dev \ icu-dev \
inotify-tools-dev inotify-tools-dev
ENV SHA256_SUM_DOVECOT=03a71d53055bd9ec528d55e07afaf15c09dec9856cba734904bfd05acbc6cf12 ENV SHA256_SUM_DOVECOT=1c67ccccdc81a75007c01dedc02ad608c4d856c60a6b89b9cd246e79f72aa2b8
ENV DOVECOT_FILENAME=dovecot-2.3.16.tar.gz ENV DOVECOT_FILENAME=dovecot-2.3.17.1.tar.gz
RUN wget https://www.dovecot.org/releases/2.3/$DOVECOT_FILENAME RUN wget https://www.dovecot.org/releases/2.3/$DOVECOT_FILENAME
RUN echo "$SHA256_SUM_DOVECOT $DOVECOT_FILENAME" | sha256sum -c - || exit 1 RUN echo "$SHA256_SUM_DOVECOT $DOVECOT_FILENAME" | sha256sum -c - || exit 1
RUN mkdir /tmp/dovecot RUN mkdir /tmp/dovecot
RUN tar xzf $DOVECOT_FILENAME -C /tmp/dovecot --strip 1 RUN tar xzf $DOVECOT_FILENAME -C /tmp/dovecot --strip 1
ENV SHA256_SUM_PIGEONHOLE=5ca36780e23b99e6206440f1b3fe3c6598eda5b699b99cebb15d418ba3c6e938 ENV SHA256_SUM_PIGEONHOLE=3cc4a3de6d7e27bd99ac59b99faa161287f78167272699a22591798ffcf84512
ENV PIGEONHOLE_FILENAME=dovecot-2.3-pigeonhole-0.5.16.tar.gz ENV PIGEONHOLE_FILENAME=dovecot-2.3-pigeonhole-0.5.17.1.tar.gz
RUN wget https://pigeonhole.dovecot.org/releases/2.3/$PIGEONHOLE_FILENAME RUN wget https://pigeonhole.dovecot.org/releases/2.3/$PIGEONHOLE_FILENAME
RUN echo "$SHA256_SUM_PIGEONHOLE $PIGEONHOLE_FILENAME" | sha256sum -c - || exit 1 RUN echo "$SHA256_SUM_PIGEONHOLE $PIGEONHOLE_FILENAME" | sha256sum -c - || exit 1
RUN mkdir /tmp/pigeonhole RUN mkdir /tmp/pigeonhole

View File

@ -4,5 +4,5 @@ lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes lda_mailbox_autosubscribe = yes
protocol lda { protocol lda {
mail_plugins = $mail_plugins mail_plugins = $mail_plugins sieve
} }

View File

@ -1,3 +1,3 @@
protocol lmtp { protocol lmtp {
mail_plugins = $mail_plugins mail_plugins = $mail_plugins sieve
} }

View File

@ -1,8 +1,3 @@
#protocol sieve { plugin {
# disable_plaintext_auth = no sieve_after = /var/lib/vmail/sieve-after/
#} }
#plugin {
# sieve = bindir=~/.sieve-bin/
# sieve_after = /var/lib/vmail/sieve-after/
#}

View File

@ -1,6 +1,6 @@
require ["fileinto","mailbox"]; require ["fileinto"];
if header :contains "X-Spam-Flag" "YES" { if header :contains "X-Spam" "Yes" {
fileinto :create "Junk"; fileinto "Junk";
stop; stop;
} }

View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv sh
s6-setuidgid vmail sievec /var/lib/vmail/sieve-after/spam.sieve