fix(ses-inbound): lift 150 KB inbound email size cap#25
Merged
Conversation
Captures the plan to drop the inline-SNS receipt action that caps inbound emails at 150 KB, and rely on anymail's S3 fetch path so attachments up to 10 MB work as the original 2026-04-28 design intended. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Step-by-step TDD plan for the receipt-rule action change described in the 2026-04-30 design doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SES caps the inline SNSAction email payload at 150 KB, which bounced inbound emails larger than ~150 KB with "Message length exceeds limit set by recipient." Replace the dual S3 + SNSAction(encoding=BASE64) rule with a single S3Action that uses its optional topic= parameter to publish a metadata-only Received notification. Anymail's Amazon SES inbound webhook recognizes receipt.action.type == "S3" and fetches the raw MIME from S3 via boto3 using the Fargate task role's existing s3:GetObject permission. Effective ceiling rises to the SES inbound max (40 MB); stated support remains 10 MB per the 2026-04-28 inbound-email design. Spec: docs/superpowers/specs/2026-04-30-ses-inbound-size-fix-design.md
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.
Summary
S3 + Sns(encoding=BASE64)actions with a singleS3action carryingtopic=self.topic. SES caps inline-SNS email payloads at 150 KB, which was bouncing inbound emails larger than ~150 KB with"Message length exceeds limit set by recipient."receipt.action.type == "S3"and fetches the raw MIME from S3 via boto3, using the Fargate task role's existings3:GetObjectpermission on<bucket>/inbound/*. Effective ceiling rises to the SES inbound max (40 MB); stated support remains 10 MB per the 2026-04-28 inbound-email design.S3ActionwithTopicArn; noSNSActionelement) and guarding against regression.Spec:
docs/superpowers/specs/2026-04-30-ses-inbound-size-fix-design.mdPlan:
docs/superpowers/plans/2026-04-30-ses-inbound-size-fix.mdTest plan
uv run pytest -q— 121 passed (full repo)uv run pytest ocs_deploy/tests/test_ses_inbound_stack.py -v— 13 passed (including SNS topic, lambda subscription, secret, and webhook-URL regression guards)uv run ruff check ocs_deploy/— clean🤖 Generated with Claude Code