submission: Add automatic BCC support for relayed messages#267
Draft
andrewachen wants to merge 1 commit intodovecot:mainfrom
Draft
submission: Add automatic BCC support for relayed messages#267andrewachen wants to merge 1 commit intodovecot:mainfrom
andrewachen wants to merge 1 commit intodovecot:mainfrom
Conversation
Add per-user configurable BCC functionality to the submission service. When submission_bcc is set to a valid email address, all messages relayed through the submission service will have a copy sent to that address. New settings: - submission_bcc: BCC recipient address (empty = disabled) - submission_bcc_ignore_errors: If FALSE (default), the DATA command fails when the relay rejects the BCC recipient. If TRUE, delivery proceeds with a warning logged. The BCC recipient is added on the first RCPT command, before regular recipients. In strict mode (submission_bcc_ignore_errors=no), the server waits for the BCC RCPT response (via SMTP pipelining) and fails the transaction if rejected. Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
6474f3a to
ca6ec67
Compare
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.
Add per-user configurable BCC functionality to the submission service for message archiving. When
submission_bccis set, all messages relayed through the submission service will have a copy sent to the configured address.We need to archive outgoing messages for specific users via per-user BCC addresses for compliance purposes.
New Settings
submission_bcc: BCC recipient address (empty = disabled)submission_bcc_ignore_errors: Ifno(default), the DATA command fails when the relay rejects the BCC recipient. Ifyes, delivery proceeds with a warning logged.Configuration Example
Per-user BCC via passdb extra fields:
Note: The
userdb_prefix is required for passdb extra fields to override service settings. Theuserdb_importdirective inoverride_fieldsenables importing these fields as settings.Implementation Details
submission_bcc_ignore_errors=no), the DATA command fails if the BCC recipient was rejectedsubmission_bcc_ignore_errors=yes), BCC rejection is logged as a warning but delivery proceeds to regular recipients