JAMES-2972 Incorrect attribute name in the mailet configuration#177
JAMES-2972 Incorrect attribute name in the mailet configuration#177jtconsol wants to merge 4 commits intoapache:masterfrom
Conversation
…on/explanation for both
mbaechler
left a comment
There was a problem hiding this comment.
Aside the migration concern, it's a good enhancement. Thanks for your contribution
| * <pre> | ||
| * <code> | ||
| * <mailet matcher=??? class=ICALToHeader> | ||
| * <mailet match=??? class=ICALToHeader> |
There was a problem hiding this comment.
does that mean we break existing configuration?
There was a problem hiding this comment.
AFAIK the james code, only the attribute match is considered. It might have been called matcher before, but I don't know that.
There was a problem hiding this comment.
oh ok, I didn't understood. That's ok then.
|
Thank you for your contribution ! By the way the files that are really used as a standard for products configuration are the ones with the root folder |
|
Hi, This pull request has just been merged. One very last thing: I don't have write access to this repository, hence I can not close this issue. Wouldn't you mind doing it for me? It would avoid me annoying the Apache INFRA team with such simple concerns. Thanks again, Cheers, Benoit |
This fixes JAMES-2972 by correcting all mailet's
matcherattributes tomatch. It deactivates theWithPrioritymailet and related matchers in the spring app'smailetcontainer.xml, since in the current state of the config, each and every mail will be dropped more or less silently.Then I took the liberty to add two log messages on level DEBUG:
When a mailet's
matchattribute is empty, it defaults tomatch="All"upon initializiation. When that happens, a log message is now emitted.Mailet WithPriority has no 'match' attribute. Defaulting to match all mails.A log message is now emitted when the
Nullmailet destroys a message.Null mailet is destroying mail Mail1573732431806-e461b5de-5567-4d21-bb9a-da193a791067 from MaybeSender{mailAddress=Optional[james@localhost]} for [nina@localhost]There is the requirement noted in JAMES-2972 to align the spring app's and docker-run-spring-app's
mailetcontainer.xmlwith each other. In the chat it was noted, that the docker-run-spring-app's version should be preferred. But that version is very terse and does not have comments at all. Should the verbose one really be ditched? It'd recommend it the other way around (besides properly formatting the file).NB: There are a lot of
mailetcontainer.xmls in the project, but none is as "documented" as the spring app one.