fix(reply): account sender for lists#1279
Open
FromSi wants to merge 1 commit into
Open
Conversation
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.
What?
This PR changes the SMTP envelope sender used when sending emails.
Previously, Matcha used
account.GetFetchEmail()for SMTPMAIL FROM. Now it usesaccount.Emailinstead.In practice:
The visible message
From:header is unchanged and still uses the existing send-as logic.Why?
Closes #1274
fetch_emailis used by Matcha to decide which incoming messages belong to an account or account tab. It can be different from the authenticated email address, especially for aliases, catch-all mailboxes, forwarded mail, or mailing list workflows.Using
fetch_emailas SMTPMAIL FROMis incorrect because SMTP servers usually validate the envelope sender against the authenticated account. Iffetch_emailpoints to a mailing list or another non-authorized address, servers such as Postfix can reject the message with errors like554 Transaction failed.Example broken case:
The SMTP server may reject this because
user@gmail.comis not allowed to send mail on behalf ofalias@example.org.With this fix:
So replies to mailing list messages are sent using the authenticated account as the SMTP envelope sender, while the normal reply recipient and visible headers continue to behave as before.