[jira] [Closed] (JAMES-4125) Rework Mailet api

"Jean Helou (Jira)" <[email protected]>
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/JAMES-4125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean Helou closed JAMES-4125.
-----------------------------
    Resolution: Fixed

> Rework Mailet api 
> ------------------
>
>                 Key: JAMES-4125
>                 URL: https://issues.apache.org/jira/browse/JAMES-4125
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: Jean Helou
>            Priority: Major
>             Fix For: 3.9.0
>
>
> 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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.