Sorry, I do have one more question in response to your email…

You wrote:

> In my opinions we should document "How to write hooks with the
> protocols/smtp library", "How to plug such hooks into a running James
> server"
> 
> Then "How to write commands for the protocols/smtp library" (and how to
> plug them in James)

This is starting to make better sense to me now. Thanks for your patience.

Moving on… on this page:

  —> https://james.apache.org/server/feature-smtp-hooks.html


> The James SMTP Server Component allows to easy write your own code which will 
> get executed in the SMTP-Transaction. Thats a bit different then using a 
> Mailet a.k.a Mailet-API.
> 
> To customize your SMTP Server, you have a few interfaces which helps you to 
> "hook-in" a specific SMTP Command. That means your class which implements the 
> given interface(s) will get called after the SMTP-Command was parsed and 
> depending on your implementation it will handle it.
> 
> As your code will get executed before the mail was even accepted. This can 
> help you in many ways, most times its used for rejecting SPAM/Junk within the 
> SMTP-Dialog. But it can be used for other things too.
> 
> Its up to you and your use case.
> 
> But be aware as your code needs to get executed during the SMTP-Transaction 
> it should not take to long to execute. As it will need to fit in before the 
> timeout was hit which can be different on every mail server. But as a general 
> rule as long as your code can get executed within 30 seconds it should be 
> fine.


There is even a list of hooks on this page:

  —> https://james.apache.org/server/dev-provided-smtp-hooks.html


However… Can you provide more examples to help me better understand why I 
should care about these hooks, and why I would want to consider using a hook 
instead of a Mailet? Wouldn’t it be simpler just to have a single extension 
mechanism? What is the value of having two different extension mechanisms?


Thanks!

=David

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to