Skip to content

fix(spam): cold email filed by a fixed rule raises no signals - #1101

Open
mortondev wants to merge 3 commits into
mainfrom
fix/cold-spam-no-signals
Open

mortondev wants to merge 3 commits into
mainfrom
fix/cold-spam-no-signals

Conversation

@mortondev

Copy link
Copy Markdown
Member

A new email from a stranger that a fixed spam rule files (auto-reply headers, failed sender authentication, or one sender opening threads in a burst) was first created as a normal conversation: conversation.created and message.created fired, so webhooks, message workflows and the team bell went off for spam, and the sender was sent the acknowledgement mail. Only then was it moved to Spam.

Mail we refuse outright (a hard DMARC reject, a suspected mail loop) already avoids all of this: it is filed to Spam in the same write that creates it and raises nothing. Fixed-rule spam now does the same.

  • The fixed rules run before the thread is created; a match files it to Spam in the insert, with the same reason and note as before, and raises no events and no acknowledgement. The trust list still wins, and test customers are still never filed.
  • Each rule is checked once per message (the burst count is not bumped twice).
  • Mail the AI classifier files is no longer acknowledged. The AI still runs after the thread exists, so that path still raises the created events before filing; moving it ahead would delay every inbound mail by a model call. Left as is.

Tests: the real-database spam tests now check that auto-reply, sender-auth and burst filings raise no created or message events and send no acknowledgement (all three failed on main), and that accepted and trusted mail still do.

A new email thread was created and announced (conversation and message
events, so webhooks, workflows and the team bell) before the spam
filter filed it, and the sender still got the acknowledgement mail. The
fixed rules (auto-responder headers, weak sender authentication, a
burst) now run before the thread exists, so a match is filed in the
insert and raises nothing, the way refused mail already was. Mail the
AI classifier files is no longer acknowledged either.
@mortondev
mortondev force-pushed the fix/cold-spam-no-signals branch from 61f1174 to b2b8ea3 Compare November 19, 2026 18:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant