Benoit Tellier created JAMES-4228:
-------------------------------------

             Summary: EmailSubmissionSetValidation interface
                 Key: JAMES-4228
                 URL: https://issues.apache.org/jira/browse/JAMES-4228
             Project: James Server
          Issue Type: Improvement
          Components: guice, JMAP
            Reporter: Benoit Tellier
            Assignee: Antoine Duprat


h3. Why ?

As off today we do not perform recipient validation when sending email over 
JMAP. User receives asynchronously a bounce notifying him of the failure.

As a contrast, SMTP allow pluggable validation during the JMAP transaction, 
including ValidRcptHandler.

I believe JMAP would benefit from the same, which would be also a nice 
refactoring.

So the validation list include:
 - Validate sender
 - extra validation eg for a SaaS that outgoing DNS params are well set for 
instance.

h3. How?

Have a Mail -> SMono[Either[SetError, Boolean]> abstraction 
EmailSubmissionSetValidation .

Inject a Set[EmailSubmissionSetValidation] in EmailSubmissionSetMethod

Implement ValidRcptEmailSubmissionSetValidation, inject it if in jmap.properties

{code:java}
jmap.send.validate.rcpt=true # default value
{code}

Implement a guice mechanism for loading extra jmap set validations. in 
jmap.properties:

{code:java}
jmap.send.extra.validations=com.linagora.jmap.CustomSaasEmailSubmissionSetValidation
{code}

Bonus point: try to refactor to extract sender validation out of 
EmailSubmissionSetMethod into a dedicated, always bound 
EmailSubmissionSetValidation




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to