diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-04-16 20:30:03 +0200 |
---|---|---|
committer | lewo <lewo@abesis.fr> | 2023-05-23 19:49:59 +0000 |
commit | bd99079363d36d762d3862a4df6f026692560cba (patch) | |
tree | a76eef834ed88b02b4da8382b518fe79ac5becd8 | |
parent | c04e4f22da48319d15593a2c942431744c12f27c (diff) |
mail-server/dovecot: also learn spam/ham on APPEND
The current configuration doesn't work when moving spam from the INBOX
to Junk on a local maildir and then syncing the result to the IMAP
server with `mbsync(1)`. This is because `mbsync(1)` doesn't support a
mvoe-detection[1] (i.e. an IMAP MOVE which subsequently causes a Sieve
COPY according to RFC6851 which then triggers report{h,sp}am.sieve), but
instead sends `APPEND` (and removes the message in the src mailbox after
that).
Tested on my own mailserver that this fixes spam learning.
This doesn't work the other way round though because `APPEND` doesn't
have an origin. However, learning mails as spam happens more often than
learning spam as ham, so this is IMHO still useful.
[1] https://sourceforge.net/p/isync/mailman/isync-devel/thread/87y2p1tihz.fsf%40ericabrahamsen.net/#msg37030483
-rw-r--r-- | mail-server/dovecot.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index 18a9262..b1c4e59 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -243,7 +243,7 @@ in # From elsewhere to Spam folder imapsieve_mailbox1_name = ${junkMailboxName} - imapsieve_mailbox1_causes = COPY + imapsieve_mailbox1_causes = COPY,APPEND imapsieve_mailbox1_before = file:${stateDir}/imap_sieve/report-spam.sieve # From Spam folder to elsewhere |