Repository navigation
feat: ingest Amazon SES bounces and complaints via SNS - #58
Merged
Merged
Conversation
- SNS signature verification (v1/v2) with strict cert URL checks, no redirects, cert caching and 503 on transient cert fetch failures - SES adapter: topic ARN pinning, automatic subscription confirmation, pure event mapping, mail.headers redaction, Delivery payloads dropped after processing - Correlate by X-SES-MESSAGE-TAGS sendlit_message_id tag first; parse the SES message id from the SMTP "250 Ok <id>" reply - SES connections are armed by expectedTopicArn instead of a credential; add subscription_confirmed_at (migration 0005) - Shared feedback connection serializer for team/org REST and MCP - Web dialog, REST/MCP docs and a self-hosting setup guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
# Conflicts: # apps/docs/.source/browser.ts
…in SES guide - Regression test for sequence sends through SES: X-SES-MESSAGE-TAGS must be merged with the List-Unsubscribe headers, and the bare SES id stored - The SNS console's create page has no signature-version option; note that the default (v1) works and point to the CLI for v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33
Summary
adapters/sns.ts): signature versions 1 (SHA1) and 2 (SHA256), exactsns.<region>.amazonaws.comhost and/SimpleNotificationService-*.pempath checks,redirect: "error", 5 s timeout, certificate cache. A failed certificate fetch returns503so SNS retries.adapters/ses.ts): the topic ARN is checked before any fetch. The subscription is confirmed automatically, via a validatedSubscribeURL. Event mapping is a pure function.mail.headersis stripped before storage, and Delivery payloads are dropped once processed. Raw events are kept only for Bounce, Complaint, Reject, DeliveryDelay and RenderingFailure.413), control-message handling and storage redaction. The other four providers behave as before.X-SES-MESSAGE-TAGS: sendlit_message_id=msg_…, and matching by that tag is now tried first. The SES message id is parsed from the SMTP250 Ok <id>reply. Before this, the whole reply line was stored, so matching by SES message id never worked.expectedTopicArninstead of a credential. Newsubscription_confirmed_atcolumn (migration0005). Changing the topic clears the confirmation; an unsubscribe surfaces assns_unsubscribed.provider-capabilities.tsandapi-contractare fixed.Event mapping
hard_bounce(suppressedif on the SES suppression list)soft_bouncecomplaint(not-spamignored)delivered/delayedrejectedfailedTest plan
sns,ses, route, receipt, connection, outbound, sequence and MCP tests)feedback_subscription_unconfirmed401; a body over 512 KB →413250 Ok <id>replysuccess@→ delivered;bounce@→ hard bounce (550 5.1.1), suppressed;complaint@→ delivered + complaint, suppressedsendlit_message_idtag inmail.tagsfor every event, and every event matched its emailmail.headersstripped before storage; Delivery payloads dropped after processing; bounce/complaint payloads kept422 recipient_suppressed; the connection turnedhealthyNotes
amazonaws.com.cn) aren't supported, because of the exact host check the issue specifies.feedbackRequiredForOrganizationDeliveryis unchanged for SES.🤖 Generated with Claude Code