Route rspamd-tagged mail to Junk through Stalwart's spam filter #544
Reference in New Issue
Block a user
Delete Branch "benvin/mail-sieve-reconcile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stalwart only files mail into Junk natively when its own spam filter marks it, so rspamd-tagged mail reached Junk only for accounts with a Sieve script, and first boot loads upstream DNSBLs, HTTP lists and URL lookups.
X-Spam: Yesabove the spam threshold, covering every account including newly provisioned oneswith_includecomputes the end of the require block (i) but returnsHEADER + lines[:i] + lines[i:], so the include always lands at the top, above the user'srequire. Arequireafter a command is invalid Sieve (RFC 5228 §3.2), so every account with an existing script gets a rejectedSieveScript/setand the job exits 1 every run → return"".join(lines[:i]) + HEADER + "".join(lines[i:]); the header's ownrequire ["include"]is then also legal after the user's requires.HAS_INCLUDEmatches commented-out lines (# include :global "spam-to-junk"), so a commented script is treated as already done → strip#comment lines before matching.page.get("total", position)ends paging after page one becausecalculateTotalis not requested → add"calculateTotal": Trueto the query.Reconcile spam-to-junk Sieve include onto Stalwart accountsto Route rspamd-tagged mail to Junk through Stalwart's spam filter