james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quynh Nguyen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAILBOX-290) Error handling for Attachment parser, not throw when unknown content-dispositio
Date Mon, 13 Mar 2017 03:03:04 GMT

     [ https://issues.apache.org/jira/browse/MAILBOX-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Quynh Nguyen updated MAILBOX-290:
---------------------------------
    Description: When retrieve attachment list which contain unknown content disposition then
the list should be ignore that error, write the log instead of throwing exception.  (was:

```
java.lang.IllegalStateException: 'cid' is mandatory for inline attachments
    at org.apache.james.mailbox.model.MessageAttachment$Builder.build(MessageAttachment.java:79)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachment(MessageParser.java:106)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.listAttachments(MessageParser.java:84)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachments(MessageParser.java:67)
    at org.apache.james.mailbox.store.StoreMessageManager.extractAttachments(StoreMessageManager.java:438)
    at org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:394)
```

And exception is caught here :

```
        try {
            return messageParser.retrieveAttachments(contentIn);
        } catch (Exception e) {
            LOG.warn("Error while parsing mail's attachments: " + e.getMessage(), e);
            return ImmutableList.of();
        }
```

Extreme error handling : No attachment will be created for JMAP if one attachement is not
well formatted

If an attachment is failing (IE inline without CID), and the message have an other valid attachment,
then the MessageAttachmentParser should have one attachment.

Write JMAP integration test for this too
)

> Error handling for Attachment parser, not throw when unknown content-dispositio
> -------------------------------------------------------------------------------
>
>                 Key: MAILBOX-290
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-290
>             Project: James Mailbox
>          Issue Type: Bug
>          Components: store
>    Affects Versions: master
>            Reporter: Quynh Nguyen
>             Fix For: master
>
>
> When retrieve attachment list which contain unknown content disposition then the list
should be ignore that error, write the log instead of throwing exception.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message