On formats of usernames and mailboxes

Bron Gondwana brong at fastmail.fm
Sun Aug 23 23:46:47 EDT 2015

After having this little joy appear in my mailboxes.db:

brong.net!user.brong.#calendars.Inbox %(A %(brong at brong/net lrswipkxtecdan789 anyone 789) I 90a28f26-f7f5-49fe-adcf-f63d16e4a097 P default T c V 1440376037 M 1440376036)
brong.net!user.brong.#calendars.Outbox %(A %(brong at brong/net lrswipkxtecdan789) I 89bdcd76-35db-44b5-b833-b9fcfc728e66 P default T c V 1440376038 M 1440376037)

I want to write, again, about naming of stuff, because the unixhs stuff is shitting all over everything, yet again.  It's been a pain in eventsource, and it's a pain here too.


There is one place that translation should occur, and that's on the boundary.  When mailbox names come in off the wire.  UserIds should never need translation, they never have slashes in them, and they may contain dots.  Like this:

bron.gondwana at gondwana.name

(yes, that's a legitimate address, thanks spammers)

Obviously that user's "Foo" folder might be seen as user/bron.gondwana/Foo in some namespaces, and stored internally as gondwana.name!user.bron^gondwana.Foo.

The point is - you should NEVER be working with bron^gondwana at gondwana.name, or any other bogus stuff along those lines.  It's wrong.  If any code is creating these things, IT IS WRONG.

So let's stop doing heirarchysep translations anywhere. The only place they need to be done on usernames is when you're converting them into a mailbox, and the only place that needs to happen is mboxname_parts_to_* or mboxname_user_mailbox(userid, "sub");



  Bron Gondwana
  brong at fastmail.fm

More information about the Cyrus-devel mailing list