Hi,
Wojtek
On 22/06/2023 01:32, Benoit TELLIER wrote:
Hello Wojtek,
That is because James employs a folder hierarchy where '#' is used to denote a
namespace.
I assumed as much.
#private:wojtek:INBOX denotes your inbox on which I would have a shared access.
#shared:marketting:INBOX denotes a shared mailbox for the marketting team.
I bet you could do: #private:wojtek:#hashtest ?
Unfortunately not:
```
A4 CREATE #private:admin@atlantiscity:#hashtest
A4 NO CREATE You can not access a mailbox that does not belong to you
```
[More at the end]
( `store.getFolder("#private:" + email + ":#hashtest").create(HOLDS_MESSAGES)` )
What's weird is that the original exception that made me investigate it didn't have hashtag in the
foldername itself:
```
21:33:47.588 [ERROR] o.a.j.i.p.StatusProcessor - Status failed for mailbox
#private:u...@james.domain.com:Apple Mail To Do
org.apache.james.mailbox.exception.MailboxNotFoundException: #private:u...@james.domain.com:Apple
Mail To Do can not be found
at
org.apache.james.mailbox.store.StoreMailboxManager.lambda$getMailboxReactive$1(StoreMailboxManager.java:282)
```
That being said, james have no support for accessing shared mailboxes in IMAP
just quite yet. The usefulness of that addressing scheme is thus limited.
IMO we could:
- Drop the #namespace:user:mailbox addressing sheme in IMAP as it is not
currently in use...
- Or (lighter) if we can't parse a mailbox path (no : after #) then keep the
name as is, IE support #hashtest
- Review and adopt another addressing sheme that matches those of eg cyrus.
I'm not sure how other implementations do it (only checked it from the end-user
point of view).
As you mentioned, the namespaces doesn't seem to be directly visible in IMAP, nor it's possible to
act on them - they are in the repository ("namespace" column) but that's just about it - LIST only
shows effective folder name (i.e. "INBOX" and not "#private:wojtek:INBOX").
Trying to create mailbox that starts with `#`, be that namespace (#private:admin@atlantiscity:test)
or plain folder (#test) name just doesn't work.
RFC mentiones namespaces (https://datatracker.ietf.org/doc/html/rfc3501#page-19) but the example is
about usenet. I'm not sure how they are used in James (especially outside IMAP that you mentioned).
I couldn't find it in the documentation, but through searching I found:
https://github.com/apache/james-project/pull/680
https://issues.apache.org/jira/browse/JAMES-3659
https://www.mail-archive.com/server-dev@james.apache.org/msg71116.html
and finally
https://github.com/apache/james-project/blob/master/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/rights.mdown
Which seems JMAP focused.
The concept of shared mailbox/being able to send messages on behalf of someone seems interesting
though (at least in our case) usual modus operandi (for example for having support email) is:
- have dedicated mailbox for support user
- have ticketing system that ties to that mailbox -- users simply interact via
tickets
Regarding possible solutions - maybe, if not referenced directly in IMAP (i.e. if someone doesn't
ask about namespaced mailbox, i.e. in format `#<namespace>:username:folder`) then treat it as
"simple folder" and allow hash sign. Alternatively if someone uses full format then try to access
shared mailbox? I guess it would be akin your second suggestion or some sort of mix between first
and second?
Though, I'm not sure if there is any IMAP client that could use it so maybe first option - drop it
altogether from IMAP - would be better?
Btw. "#" is reserved in James, but only as a prefix (it works in the middle of
the folder name):
A4 CREATE #private:admin@atlantiscity:test
A4 NO CREATE You can not access a mailbox that does not belong to you
A5 CREATE #shared:admin@atlantiscity:test
A5 NO CREATE You can not access a mailbox that does not belong to you
A6 CREATE #private:admin@atlantiscity:#hashtest
A6 NO CREATE You can not access a mailbox that does not belong to you
A7 CREATE #shared:admin@atlantiscity:#hashtest
A7 NO CREATE You can not access a mailbox that does not belong to you
A8 CREATE #private:admin@atlantiscity:bla#hashtest
A8 NO CREATE You can not access a mailbox that does not belong to you
A9 CREATE #shared:admin@atlantiscity:bla#hashtest
A9 NO CREATE You can not access a mailbox that does not belong to you
A10 CREATE test2
A10 OK [MAILBOXID (27110)] CREATE completed.
A12 CREATE #hashtest2
A12 NO CREATE You can not access a mailbox that does not belong to you
A13 CREATE bla#hashtest2
A13 OK [MAILBOXID (27111)] CREATE completed.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org