Re: Subaddressing (RFC 5233) support in James
IMO nobody ever uses + in a username. If somebody ends up being in this case, he could migrate user data into a new username without the + prior to the upgrade using https://james.apache.org/server/manage-webadmin.html#Change_a_username -- Best regards, Benoit TELLIER General manager of Linagora VIETNAM. Product owner for Team-Mail product. Chairman of the Apache James project. Mail: btell...@linagora.com Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) On Oct 11, 2023 5:38 PM, from Wojtek 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. > > user+s...@domain.tld > user+s...@domain.tld > And u...@domain.tld > > Are all 3 distinct mail addresses diverging from their sub addresses. > > We can normalize them to u...@domain.tld. > > So I think the most straightforward is to add the following methods to > MailAddress: > > ``` > record class SubAddress(String value) > > Optional 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. > - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
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. user+s...@domain.tld user+s...@domain.tld And u...@domain.tld Are all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to u...@domain.tld. So I think the most straightforward is to add the following methods to MailAddress: ``` record class SubAddress(String value) Optional 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. - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
Yes sure. This time with the one and only MUA I should trust <3 Imo sub addressing are properties of MailAddress. user+s...@domain.tld user+s...@domain.tld And u...@domain.tld Are all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to u...@domain.tld. So I think the most straightforward is to add the following methods to MailAddress: ``` record class SubAddress(String value) Optional 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: btell...@linagora.com 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 > MailAddress.user+sub1@domain.tlduser+sub2@domain.tldAnd user@domain.tldAre > all 3 distinct mail addresses diverging from their sub addresses. We can > normalize them to u...@domain.tld.so I think the most straightforward is to > add the following methods to MailAddress:```record class SubAddress(String > value)Optional 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 Date : > 10/10/2023 15:54 (GMT+07:00) À : James Users List > 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: btell...@linagora.com> 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: server-user-unsubscribe@james.apache.orgFor additional > commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
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 MailAddress.user+sub1@domain.tlduser+sub2@domain.tldAnd user@domain.tldAre all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to u...@domain.tld.so I think the most straightforward is to add the following methods to MailAddress:```record class SubAddress(String value)Optional 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 Date : 10/10/2023 15:54 (GMT+07:00) À : James Users List 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: https://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: btell...@linagora.com> 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: server-user-unsubscribe@james.apache.orgFor additional commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
Imo sub addressing are properties of MailAddress.user+sub1@domain.tlduser+sub2@domain.tldAnd user@domain.tldAre all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to u...@domain.tld.so I think the most straightforward is to add the following methods to MailAddress:```record class SubAddress(String value)Optional 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 Date : 10/10/2023 15:54 (GMT+07:00) À : James Users List 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: https://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: btell...@linagora.com> 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: server-user-unsubscribe@james.apache.orgFor additional commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
Imo sub addressing are properties of MailAddress.user+sub1@domain.tlduser+sub2@domain.tldAnd user@domain.tldAre all 3 distinct mail addresses diverging from their sub addresses. We can normalize them to u...@domain.tld.so I think the most straightforward is to add the following methods to MailAddress:```record class SubAddress(String value)Optional 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 Date : 10/10/2023 15:54 (GMT+07:00) À : James Users List 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: https://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: btell...@linagora.com> 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: server-user-unsubscribe@james.apache.orgFor additional commands, e-mail: server-user-h...@james.apache.org
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? Wojtek On 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: https://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: btell...@linagora.com 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: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: Subaddressing (RFC 5233) support in James
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: https://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: btell...@linagora.com 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 -- Wojtek - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org