You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2023/02/07 01:48:57 UTC

[GitHub] [james-project] chibenwa commented on pull request #1425: Allow to specify custom properties for smtp configuration

chibenwa commented on PR #1425:
URL: https://github.com/apache/james-project/pull/1425#issuecomment-1420048702

   IMO not needed.
   
   We just need to configure the custom handler with custom conf outside of the COre handler package and pass it the conf.
   
   EG:
   
   ```
   public class CustomHook implements HeloHook {
       @Override
       public Set<String> implementedEsmtpFeatures() {
           return ImmutableSet.of("DSN");
       }
   
       @Override
       public HookResult doHelo(SMTPSession session, String helo) {
           return HookResult.DECLINED;
       }
   
       public void init(Configuration config) throws ConfigurationException {
           System.out.println(config.getString("WOOP"));
       }
   }
   ```
   
    => 
    
   ```
            <handlerchain class="fqdn.MyCmdHandlerLoader"> <!-- MyCmdHandlerLoader do not bundle CustomHook -->
               <handler class="fqdn.CustomHook">
                   <WOOP>EBVWBVWLV</WOOP>
               </handler>
           </handlerchain>
   ```
   
   What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org