[
https://issues.apache.org/jira/browse/JAMES-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912386#comment-17912386
]
Tran Hong Quan commented on JAMES-4087:
---------------------------------------
Hi [~calelinflink],
Thank you for your suggestion.
> The error suggests that the matcher named "relay-allowed" cannot be loaded
> when it's referenced inside another matcher.
Now that is possible thanks to
https://github.com/apache/james-project/pull/2494.
Thus this should be done.
> Combining composite matchers
> ----------------------------
>
> Key: JAMES-4087
> URL: https://issues.apache.org/jira/browse/JAMES-4087
> Project: James Server
> Issue Type: Bug
> Components: Mailet Contributions
> Reporter: Tran Hong Quan
> Priority: Minor
>
> Today chaining composite matcher is not possible:
> ```
> + <matcher name="relay-allowed"
> match="org.apache.james.mailetcontainer.impl.matchers.Or">
> + <matcher match="SMTPAuthSuccessful"/>
> + <matcher match="SMTPIsAuthNetwork"/>
> + <matcher match="SentByMailet"/>
> + <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
> + </matcher>
> + <matcher name="should-check-spam"
> match="org.apache.james.mailetcontainer.impl.matchers.Not">
> + <matcher match="relay-allowed"/>
> + </matcher>
> ```
> yields error:
> `Fatal error while starting
> James","context":"default","exception":"jakarta.mail.MessagingException: Can
> not load matcher relay-allowed\n\tat
> org.apache.james.utils.GuiceMatcherLoader.getMatcher(GuiceMatcherLoader.java:50)\n\tat`
> Expectation: chaining composite matchers should be doable.
> Also, I spotted that we have a `notmatch` tag in our code (beside traditional
> `match` tag used), we should try to add a few tests for it to make sure it is
> usable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]