Jean Helou created JAMES-4125:
---------------------------------
Summary: Rework Mailet api
Key: JAMES-4125
URL: https://issues.apache.org/jira/browse/JAMES-4125
Project: James Server
Issue Type: Improvement
Reporter: Jean Helou
While prototyping a new DKIM mailet which would sign with a sender's domain
specific key instead of using a fixed private key I realized the design of the
mailet API is ... perfectible.
I propose the following changes
# improve the GuiceMailetLoader to no longer rely on the init() method but
instead bind the proper mailet config in a child context as is done for the
GuiceMailRepositoryLoader.
# apply default methods to the mailet api so implementing a mailet from
scratch (not using GenericMailet{^}1{^}) is easier
# change the Mailet interface to get rid of the getMailetConfig method
entirely as it is only used to get the context and the error handlers from the
engine
** it is not the mailet responsibility to provide the context to the engine
** the getConfig would be replaced by 2 methods to explicitely provide error
handlers instead of relying on an undocumented convention
^1^ GenericMailet is both a Mailet and a MailetConfig which doesn´t sound
quite right, it also implements default behaviours that would be better placed
as default methods on the interface
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]