thanhbv200585 commented on code in PR #1824: URL: https://github.com/apache/james-project/pull/1824#discussion_r1424767871
########## server/apps/distributed-app/docs/modules/ROOT/pages/extending/imap.adoc: ########## @@ -22,4 +22,25 @@ Custom configuration can be obtained through `ImapConfiguration` class via the ` A full working example is available link:https://github.com/apache/james-project/tree/master/examples/custom-imap[here]. -See this page for xref:configure/imap.adoc#_extending_imap[more details on configuring IMAP extensions]. \ No newline at end of file +See this page for xref:configure/imap.adoc#_extending_imap[more details on configuring IMAP extensions]. + +== IMAP additional Connection Checks + +James allows defining your own additional connection checks to guarantee that the connecting IP is secured. + +An Connection check is a functional interface: +``` +@FunctionalInterface +public interface ConnectionCheck { + Publisher<Void> validate(InetSocketAddress remoteAddress); +} +``` + +- `validate` method is used to check the connecting IP is secured. + +ConnectionCheck can be configured in `imapserver.xml` file: +``` +<additionalConnectionCheck>org.apache.james.CrowdsecImapConnectionCheck</additionalConnectionCheck> +``` + +An example for configuration is available link:https://github.com/apache/james-project/blob/master/third-party/crowdsec/sample-configuration/acquis.yaml[here]. Review Comment: > Put a github link instead. This link will exist in this PR -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
