Repository navigation
Conversation
raymatos
marked this pull request as ready for review
October 9, 2026 01:14
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.
Description
Add project-scoped recipient suppression rules so test messages retain their rendered content without being delivered externally. Rules support exact addresses, exact domains, literal local-part prefixes/suffixes, and bounded whole-address wildcards (
*and?). Settings provides create/edit/enable/disable controls and a saved-rule address preview.Matching recipients are captured individually as
SUPPRESSED; other recipients in the same request retain normal delivery. Decisions are snapshotted, rechecked by the worker, and remain suppressed across retries or later rule changes. Coverage includes transactional API, SMTP envelope recipients, workflow overrides, campaign delivery, and campaign test sends. Alternate recipient headers cannot introduce extra provider recipients.Captured messages appear once in Activity with a Suppressed filter, rendered preview, and matched-rule details. Project-authorized capture endpoints and two read-only MCP tools expose stored content and existing stored attachments. Captures are excluded from delivery/reputation metrics and billing usage; normal project protections remain in force.
This is related to #258, but deliberately does not implement its automatic SES bounce/complaint list population, CSV import, or reason taxonomy. It adds manually managed capture rules rather than replacing existing bounce/complaint handling.
Migration and compatibility
Adds a rule table, nullable capture fields, an index, and the
SUPPRESSEDemail status. Apply the migration and regenerate the Prisma client for API/worker deployments. Older clients that do not recognize the new enum cannot safely read captured rows; rollback requires a compatible client. Rendered bodies follow existing body retention. Arbitrary regular expressions are not supported.Type of Change
feat:New feature (MINOR version bump)Testing
Validation completed on this PR head (
a36d0da):Checklist
Related Issues
Related to #258