Re: Subaddressing (RFC 5233) support in James

Wojtek <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Enhancing MailAddress seems sensible.

I'm somewhat surprised that `+` was allowed previously (I understand that given it was valid address 
it was allowed/accepted but still :) ). I'm wondering though, what would be the upgrade path in this 
case and how to possibly handle it (and if anyone ever used it like that tbh…).

Wojtek

On 10/10/2023 11:50, Benoit TELLIER wrote:
> 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.
>
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.