Replies: 1 comment 2 replies
|
please try beta |
2 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.
Just so you know, after struggling to figure this out, I used an AI agent to help me summarize and analyse. Consider this AI-enabled post content ;-)
I'm running Stalwart v0.16.8 behind Traefik/Pangolin, with Bulwark Webmail v1.7.5. The Spam Score plugin activates successfully (I can see slots=1 in the activation log), but it never produces any visible output — no section appears in the email detail view, not even for emails that carry Stalwart's spam headers.
What I've verified so far:
Headers are present in JMAP responses. Inbound emails return X-Spam-Status, X-Spam-Score, and X-Spam-Result via Email/get. (Sent/outbound emails don't, which is expected.)
Headers reach the plugin pipeline. In Bulwarmail, parseEmailHeaders() in /lib/jmap/client.ts converts the raw JMAP array to a flat Record<string, string | string[]>. emailToReadView() in /lib/plugin-projection.ts passes headers through verbatim. The flat object is sent to the sandboxed iframe as extraProps.
Plugin source (spam-score/src/index.js): parseSpam() looks for X-Spam-Status and falls back to X-Spam-Score with toNumber(). There's Stalwart-specific fallback logic. shouldShow({ email, category }) returns true when category === null (the bottom section) by default, unless showWhenClean is explicitly false. The SpamScore component checks spamScore and spamVerdict to decide what to render.
The email-details-section slot is rendered in two places in email-viewer.tsx:
Per-category rows inside the expanded details panel (passes a category string)
A catch-all bottom section when category === null, gated by hasDetailsSlotOffers being > 0
What I haven't pinned down:
To reproduce:
Environment:
All reactions