Issue Description
I use Rspamd through a milter for spam classification and rely on Stalwart to deliver marked messages to the user’s Junk folder. While testing an upgrade from Stalwart 0.14.1 to 1.0.0, I found a change in that behavior.
The milter still runs and adds its headers, but messages marked X-Spam-Status: Yes now arrive in Inbox.
This was reproduced using fresh Docker instances and fresh accounts, independently of any account migration. A small test milter adds a deterministic verdict header, so the reproduction does not depend on Rspamd’s scoring configuration.
Reproduction
- Run the official Stalwart image with a fresh account containing the default Inbox and Junk folders.
- Leave global spam handling enabled, but disable the built-in SMTP spam classifier because the external milter supplies the verdict.
- Configure an enabled DATA-stage milter to add:
X-Spam-Status: Yes, score=8 - Deliver a message through unauthenticated inbound SMTP. The recipient has no active Sieve script or trusted-contact exceptions.
- Repeat with the milter adding
X-Spam-Status: Noas a control.
| Milter verdict | Stalwart 0.14.1 | Stalwart 1.0.0 |
|---|---|---|
Yes, score=8 |
Junk, with $junk keyword |
Inbox |
No |
Inbox | Inbox |
Expected Behavior
A trusted external milter’s spam verdict should be able to trigger Stalwart’s normal automatic Junk delivery, while preserving the existing precedence of explicit user filing rules.
What the source history shows
The change appears to originate in commit 53a04ce — “Spam filter performance and accuracy improvements (part 2)”, first released in v0.15.0.
In 0.14.1, delivery checks the configured spam-status header and can use that result to select Junk. That header-based check was removed.
In 1.0.0, delivery uses an internal spam verdict established before the DATA-stage milter runs. Headers subsequently added by the milter do not update that verdict. The automatic Junk delivery code remains present, but the external verdict does not reach it.
Runtime testing covered 0.14.1 and 1.0.0; the first affected release was identified from source history.
Is this an unintended compatibility regression, or is there a supported 1.0 configuration for this workflow?
If a code change is needed, would you support an explicit, trusted-milter mechanism that feeds its verdict into the existing Junk delivery path? Ideally, this would preserve the previous behavior without requiring a separate Sieve rule in every account, and without trusting arbitrary spam headers supplied by senders.
Stalwart Version
v1.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on