Matching Spam header via user sieve script (managesieve) #2637
Locked
pdf
started this conversation in
Community Discussions
Replies: 1 comment 5 replies
|
The if allof (header :contains "X-Spam-Status" "Yes") {
addflag "Junk";
fileinto "Spam";
stop;
} |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
#1917 was added to allow fileinto to succeed even when emails are marked as spam. As a result, in order to correctly file spam messages that would otherwise be filed to a non-standard folder, a user sieve rule is required to match spam headers.
Having added such a rule at the top of a user sieve script, however, matching emails are not filed into junk.
Expected Behavior
Given the following sieve script:
And the following mail headers:
I would expect this email to be filed into
Spam(which is configured as my Junk folder in Stalwart).Actual Behavior
Message in the above example is filed into
Inbox/JobsReproduction Steps
Relevant Log Output
Hard to capture relevant logs as this would require long-term trace-level until a spam message happens to come in, but even at trace level I could not see any logs related to sieve script evaluation, so I think trace logs would just show which folder it was filed into, which we already know?
Stalwart Version
v0.15.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
S3-compatible
Search Engine
Internal
Directory Backend
LDAP
Additional Context
No response
I acknowledge that:
traceand included relevant log output if applicable.All reactions