AI-Assisted Rule Authoring
What it does
Pipe a captured message into an LLM and get back a syntactically-correct Rspamd rule. The model analyses the captured message and its scan results, then returns a regex, multimap fragment, or composite expression that would catch it.
Review the suggestion, paste it into the Maps editor, and ship it via hot-reload. No syntax errors, no trial-and-error — the model drafts, you review.
What question it answers
How do I write a regex for this header pattern? What composite expression captures these symbols? Can you suggest a multimap rule for this sender family?
The rule-suggestion assistant answers these questions by analysing the actual message and returning ready-to-use Rspamd syntax.
How it's different from manual authoring
Manual rule authoring requires understanding Rspamd syntax, testing patterns, and iterating. LLM-assisted authoring accelerates this loop: observe a pattern, ask the model for a rule, review the output, and deploy.
The model isn't making the decision. It's drafting syntax that you review and approve. Human in the loop is non-negotiable.
End-to-end workflow
Capture a message in Mail Streams. Click Ask LLM, pick the rule-suggestion preset or a custom prompt. The model returns a rule. Copy it to the Maps editor, save, and Rspamd picks it up on the next map poll. Under a minute from observation to deployed rule.
Example: Sub-minute observation to deployed rule
A capture stream catches a phishing campaign your existing layers missed. The operator opens one entry, selects 'Custom prompt' and asks: 'Suggest a multimap regex against the From: header that catches this sender family but not legitimate bank notification domains I'll paste in.' The model returns a regex; the operator pastes it into a sender blocklist map via the Maps editor. ~60 seconds end-to-end from observation to deployed rule.





