mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-02 17:14:31 +02:00
fix: Move spam to mailbox associated to the \Junk
special-use attribute (#3925)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
e21e5e0490
commit
3649699197
7 changed files with 43 additions and 11 deletions
|
@ -304,11 +304,11 @@ function _setup_spam_to_junk() {
|
|||
_log 'debug' 'Spam emails will be moved to the Junk folder'
|
||||
mkdir -p /usr/lib/dovecot/sieve-global/after/
|
||||
cat >/usr/lib/dovecot/sieve-global/after/spam_to_junk.sieve << EOF
|
||||
require ["fileinto","mailbox"];
|
||||
require ["fileinto","special-use"];
|
||||
|
||||
if anyof (header :contains "X-Spam-Flag" "YES",
|
||||
header :contains "X-Spam" "Yes") {
|
||||
fileinto "Junk";
|
||||
fileinto :specialuse "\\\\Junk" "Junk";
|
||||
}
|
||||
EOF
|
||||
sievec /usr/lib/dovecot/sieve-global/after/spam_to_junk.sieve
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue