routing smoke: seed synthetic mail into Stalwart; make targeted intake work there #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/routing-smoke-seed-stalwart"
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?
The identity-routing smoke's mail legs (
mail-trusted-billing-cfo,mail-trusted-billing-assistant,mail-trusted-security,mail-review-billing) have never passed sincec4a5029made/webhook/forwardemailwake the Stalwart mirror instead of enqueueing the payload: the synthetic message never existed in Forward Email or Stalwart, so the targeted intake found nothing and the legs timed out withstatus=missing.Two fixes:
agent-dispatcher mail --once --message-id <id>, which only asked forSEARCH HEADER Message-ID. Stalwart 0.15 answers HEADER searches on unindexed fields with an empty result rather than an error (verified against the forge:HEADER Subject/Fromhit,HEADER Message-ID/Dateempty), so the wake path never intook anything for real mail either — messages waited for the periodic unseen sweep.findMessagesByMessageIDkeeps the server-side search but, when it comes back empty, fetches just the Message-Id header of the unseen messages plus the newest 50 and matches client-side, still touching only the requested message. Regression test runspollMailboxagainst a header-blind go-imap memory backend.identity-routing-smoke.shnow APPENDs each synthetic message (same Message-ID/From/To/Subject, no-action body) into the target account's Stalwart INBOX over IMAP before posting the webhook, usingKEYSTORE_ROUTING_SMOKE_MAIL_ACCOUNTS=<alias>=<account>:<password_file>,...(the same alias → account mapping thekey-store-forwardemail-wake@unit uses) andKEYSTORE_ROUTING_SMOKE_IMAP_ADDR. Seeding is idempotent across the stable Message-IDs the smoke reuses, retries the transient LDAP auth failures the intake also retries, and is skipped when no mapping is configured. The security leg is addressed tosecurity@key.store, the real Forward Email alias the wake command can mirror, instead of thesecurity-agentlogin.README documents the wake path and the seeding contract. The key.store side (env derived from
forwardEmailMirrorMailboxes+dispatch_srcbump + forge deploy) follows in key.store.🤖 Generated with Claude Code