add sieve junk configuration
This commit is contained in:
parent
4193b863d5
commit
30a38705d8
10
Dockerfile
10
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM alpine:3.14 as builder
|
||||
FROM alpine:3.15 as builder
|
||||
|
||||
RUN apk --no-cache add \
|
||||
rpcgen \
|
||||
@ -16,15 +16,15 @@ RUN apk --no-cache add \
|
||||
icu-dev \
|
||||
inotify-tools-dev
|
||||
|
||||
ENV SHA256_SUM_DOVECOT=03a71d53055bd9ec528d55e07afaf15c09dec9856cba734904bfd05acbc6cf12
|
||||
ENV DOVECOT_FILENAME=dovecot-2.3.16.tar.gz
|
||||
ENV SHA256_SUM_DOVECOT=1c67ccccdc81a75007c01dedc02ad608c4d856c60a6b89b9cd246e79f72aa2b8
|
||||
ENV DOVECOT_FILENAME=dovecot-2.3.17.1.tar.gz
|
||||
RUN wget https://www.dovecot.org/releases/2.3/$DOVECOT_FILENAME
|
||||
RUN echo "$SHA256_SUM_DOVECOT $DOVECOT_FILENAME" | sha256sum -c - || exit 1
|
||||
RUN mkdir /tmp/dovecot
|
||||
RUN tar xzf $DOVECOT_FILENAME -C /tmp/dovecot --strip 1
|
||||
|
||||
ENV SHA256_SUM_PIGEONHOLE=5ca36780e23b99e6206440f1b3fe3c6598eda5b699b99cebb15d418ba3c6e938
|
||||
ENV PIGEONHOLE_FILENAME=dovecot-2.3-pigeonhole-0.5.16.tar.gz
|
||||
ENV SHA256_SUM_PIGEONHOLE=3cc4a3de6d7e27bd99ac59b99faa161287f78167272699a22591798ffcf84512
|
||||
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 echo "$SHA256_SUM_PIGEONHOLE $PIGEONHOLE_FILENAME" | sha256sum -c - || exit 1
|
||||
RUN mkdir /tmp/pigeonhole
|
||||
|
@ -4,5 +4,5 @@ lda_mailbox_autocreate = yes
|
||||
lda_mailbox_autosubscribe = yes
|
||||
|
||||
protocol lda {
|
||||
mail_plugins = $mail_plugins
|
||||
mail_plugins = $mail_plugins sieve
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
protocol lmtp {
|
||||
mail_plugins = $mail_plugins
|
||||
mail_plugins = $mail_plugins sieve
|
||||
}
|
||||
|
@ -1,8 +1,3 @@
|
||||
#protocol sieve {
|
||||
# disable_plaintext_auth = no
|
||||
#}
|
||||
|
||||
#plugin {
|
||||
# sieve = bindir=~/.sieve-bin/
|
||||
# sieve_after = /var/lib/vmail/sieve-after/
|
||||
#}
|
||||
plugin {
|
||||
sieve_after = /var/lib/vmail/sieve-after/
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
require ["fileinto","mailbox"];
|
||||
require ["fileinto"];
|
||||
|
||||
if header :contains "X-Spam-Flag" "YES" {
|
||||
fileinto :create "Junk";
|
||||
if header :contains "X-Spam" "Yes" {
|
||||
fileinto "Junk";
|
||||
stop;
|
||||
}
|
||||
|
3
rootfs/etc/cont-init.d/02-sieve-rules
Executable file
3
rootfs/etc/cont-init.d/02-sieve-rules
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
s6-setuidgid vmail sievec /var/lib/vmail/sieve-after/spam.sieve
|
Loading…
Reference in New Issue
Block a user