Re: Subaddressing (RFC 5233) support in James

Benoit TELLIER <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Yes sure. This time with the one and only MUA I should trust <3

Imo sub addressing are properties of MailAddress.

[email protected]
[email protected]
And [email protected]

Are all 3 distinct mail addresses diverging from their sub addresses. 

We can normalize them to [email protected].

So I think the most straightforward is to add the following methods to MailAddress:

```
record class SubAddress(String value)

Optional<SubAddress> subAddress();

MailAddress normalize();
```

This should enable to implement all expected behaviours... 

A first version of this parsing could be naïve and ignore comments inside email address, escape sequences, etc... 

Also we may have to forbid '+' usage in user names, which should likely be documented in upgrade instructions as a breaking change.

-- 

Best regards,

Benoit TELLIER

General manager of Linagora VIETNAM.
Product owner for Team-Mail product.
Chairman of the Apache James project.

Mail: [email protected]
Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal)


Le oct. 10, 2023 4:40 PM, de Wojtek It seems that your email client completely stripped all newline characters, which makes your reply a 
little bit more hard to follow (this one and the one regarding postgress support, the latter being 
even more garbled).

Could you re-sent it re-formatted? :-)

Wojtek

On 10/10/2023 11:21, btellier wrote:
> Imo sub addressing are properties of [email protected][email protected] [email protected] all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to [email protected] I think the most straightforward is to add the following methods to MailAddress:```record class SubAddress(String value)Optional<SubAddress> subAddress();MailAddress normalize();```This should enable to implement all expected behaviours... A first version of this parsing could be naïve and ignore comments inside email address, escape sequences, etc... Also we may have to forbid '+' usage in user names, which should likely be documented in upgrade instructions as a breaking change.Regards,Envoyé depuis mon appareil Galaxy
> -------- Message d'origine --------De : Wojtek <[email protected]> Date : 10/10/2023  15:54  (GMT+07:00) À : James Users List <[email protected]> Objet : Re: Subaddressing (RFC 5233) support in James Hi Benoit,thank you for confirming my observation. Indeed, it seems quite extensive.I was wondering if we shouldn't adjust org.apache.james.core.Username API and make a distinction between localpart (so username+subaddress) and actuall username (i.e. `username` without subaddress part. Or have another way to distinguish username in the system from email address?WojtekOn 06/10/2023 21:26, Benoit TELLIER wrote:> Correct! I've been identifying it for a couple of time and even have ideas of how to manage it ;-)> > That's a bit of a complex story to work with!> > As a starter :> >   - ValidRcptHandler needs to accept sub-addresses of an existing user>   - IsLocalRecipient needs to accept sub-addresses of an existing user>   - LocalDelivery needs by default to accept email for sub addresses but delivery them into INBOX>   - And a SubAddressing mailet would check if the recipient did whitelist the sender for the target mailbox (k right) OR if the mailbox submission right is allowed for everybody (any)>     If so, then positions a storage directive for this email to go into the target mailbox for that recipient>   - Of course integration tests (/server/mailets/integration-testing )> > Contributions more than welcome on the topic.> > Sponsoring even more welcome ;-)> > Here is the JIRA: issues.apache.org/jira/browse/JAMES-3945 (freshly created)> > > > > -- > > Best regards,> > Benoit TELLIER> > General manager of Linagora VIETNAM.> Product owner for Team-Mail product.> Chairman of the Apache James project.> > Mail: [email protected]> Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal)> > > On Oct 6, 2023 11:25 PM, from Wojtek Hi,> does James support subaddressing (i.e. RFC 5233)?> > I tested it quickly and from what I see James just treat those addresses as distinct addresses?> > I don't see support for it in code.> > Ref:> en.wikipedia.org/wiki/Email_address#Sub-addressing> rfc-editor.org/rfc/rfc5233> ---------------------------------------------------------------------To unsubscribe, e-mail: [email protected] additional commands, e-mail: [email protected]
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.