Conversation
link2xt
marked this pull request as ready for review
September 24, 2026 13:15
link2xt
commented
Sep 24, 2026
| additional_msg_ids: Vec<String>, | ||
| ) -> Result<MimeFactory> { | ||
| let contact = Contact::get_by_id(context, from_id).await?; | ||
| let from_addr = context.get_primary_self_addr().await?; |
Collaborator
Author
There was a problem hiding this comment.
The most interesting part is removal of this get_primary_self_addr(), it is replaced with from_addr passed from outside that is the actual From address.
link2xt
force-pushed
the
link2xt/mdn-encrypted-from
branch
from
September 24, 2026 14:26
7a6ff57 to
be3deae
Compare
From address is now passed into MimeFactory::from_mdn(), so MimeFactory.from_addr is set correctly. It is used to build encrypted From header, which is not checked anymore, but should correspond to the outer header.
link2xt
force-pushed
the
link2xt/mdn-encrypted-from
branch
from
September 24, 2026 14:29
be3deae to
6a876cf
Compare
Hocuri
approved these changes
Sep 24, 2026
Hocuri
left a comment
Collaborator
There was a problem hiding this comment.
Nice to get rid of another use of get_primary_self_addr()
Collaborator
Author
|
I'm actually not sure there is a bug that can be tested, we don't use MimeFactory.from_addr to create the inner From header, and for MDNs there should be no Sender header where it might be used. |
Collaborator
Author
|
I have created #8748 that includes this commit, it is a refactoring that makes it obvious that From address is not used. |
Collaborator
Author
|
I will close this, I think it is better to squash #8748 into a single commit. |
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.
From address is now passed into MimeFactory::from_mdn(), so MimeFactory.from_addr is set correctly.
It is used to build encrypted From header, which is not checked anymore, but should correspond to the outer header.
Follow-up to #8716
EDIT: there is apparently no bug, i created #8748 that makes it obvious that creating QueuedMail for MDN does not use the From address anywhere.