[
https://issues.apache.org/jira/browse/JAMES-4103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benoit Tellier closed JAMES-4103.
---------------------------------
Resolution: Fixed
> Customize MessageParser
> -----------------------
>
> Key: JAMES-4103
> URL: https://issues.apache.org/jira/browse/JAMES-4103
> Project: James Server
> Issue Type: Improvement
> Components: JMAP, mailbox
> Reporter: Benoit Tellier
> Assignee: Antoine Duprat
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h3. Why?
> Mailbox extract a representation of attachments and store them in a
> separated, decoded and parsed projection. This mechanism was introduced for
> "JMAP draft".
> However JMAP RFC-8621 did actually expose attachments as part of body
> structure (a subset of body structure) making it hard to make it correspond
> to the "mailbox attachments", resulting in each attachment download
> downloading the all message, parses it, locate the part, then decode it,
> which is innefficient.
> While discussing the topic with Houssem NASRI, I realized the problem is way
> easier flipping it around: it's easie to rework mailbox attachements so that
> it reuse JMAP attachment parsing and assign it an attachmentId that ids
> exactly the blobId that JMAP will later expose as a blobPart.
> THough this solution requires:
> - mailbox to somehow depend on JMAP
> - MessageParser to have access to the messageId and pass the attachmentId to
> the Attachment Mapper
> - And finally to attempt mailbox attachment download and fallback if
> relevant to message part download.
> It's hacky and might result in bigger code changes if implemented in James,
> which is overkill for an experiment.
> That's why I would like to be able to do such changes in Twake mail,
> experiment it and validate it before proposing it to the wider community.
> h3. How?
> Turn Message Parser as an interface. Then I can provide my own.
> Create a AttachmentIDAssignationPolicy in AttachmentMapper. That way we can
> override attachmentId assignation policy,
> And finally make it easier to override Blob resolvers.
> THis results in minimal code changes on James side and unlocks the
> possibility to experiment this in Twake mail side.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]