WIP: Add information to use mail-parser in an IMAP server #26
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.
It seems that my previous patch was not totally correct (for example, it does not work with DecodeResult::Borrowed).
So I have rewritten it to to use only
stream.pos
andstate.mime_boundary.as_ref()
.But I am not totally satisfied yet: the specific problem is when there is a RFC822 message contained in an RFC5322 message, mail-parser wrongly include the MIME delimiter from the parent in the child, RFC822 email. I want to fix it and validate all this logic on your test emails.
Retrospectively, I am not sure that
offset_last_part
is really needed, but having abody_raw
in Part is required: an IMAP server must not decode content and return its raw size, not its decoded size.Also, I am a bit worried with my new fields: it might break your tests, so we need to check that and maybe update them.
I will not be available in the next weeks but hope to finish this work until the end of the summer.
In the end, I think you should take into account this information if you want to make a release during this time: my previous PR might not be that great. If you really need to make a release, I would recommend that you rollback it.
Sorry, I thought that the problem might be easier to address.