You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2021/05/28 10:36:00 UTC

[jira] [Commented] (JAMES-2157) Implement a HasMimeType matcher

    [ https://issues.apache.org/jira/browse/JAMES-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353229#comment-17353229 ] 

Benoit Tellier commented on JAMES-2157:
---------------------------------------

It do not try to go down the mime tree which makes it impractical for some use cases like `no subpart should have the content type application/zip`.

I understand that some use case do not need to walk down the entire mime tree (eg when categorizing MDN reports only top level content type is enough) however some over generic use cases implies checking the wall mime tree.

Thus I propose to add a `HasMimeTypeAnySubPart` mailet that complement HasMimeType and does just this.

CF https://github.com/apache/james-project/pull/462

> Implement a HasMimeType matcher
> -------------------------------
>
>                 Key: JAMES-2157
>                 URL: https://issues.apache.org/jira/browse/JAMES-2157
>             Project: James Server
>          Issue Type: New Feature
>          Components: Mailet Contributions
>    Affects Versions: master
>            Reporter: Benoit Tellier
>            Priority: Major
>              Labels: newbie
>
> We would like to be able to write delivery logic based on the Mime Content-Type of a message.
> Thus, you should create in *mailet-standard* a *HasMimeType* matcher that extends *GenericMatcher*.
> You will add the corresponding tests *HasMimeTypeTest*. You can rely on the MimeMessageBuilder helper class to generate test data.
> Don't hesitate to ask for help on the Gitter chat.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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