email: Narrowly match just rspamd's spam header

There is no need to match generically for flags that are possibly generated by
other spam software. Allow other rules to run after filing into Junk folder.
Allow other sieve filter to be present in the FreedomBox configuration directory.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-02-13 12:49:22 -08:00 committed by James Valleroy
parent d47d39a8dd
commit 9710369949
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 1 additions and 6 deletions

View File

@ -1,2 +0,0 @@
DO NOT PUT PERSONAL ITEMS HERE!
This folder in its entirety is managed by FreedomBox.

View File

@ -1,8 +1,5 @@
require ["fileinto", "mailbox"];
if anyof(header :contains "X-Spam" "Yes",
header :contains "X-Spam-Status" "Yes",
header :matches "X-Spam-Flag" "YES") {
if header :is "X-Spam" "Yes" {
fileinto :create "Junk";
stop;
}