Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.