Subject: Initialization

From: Harrie Hazewinkel <[email-masked]>
Date: Thu, 21 Nov 2002 15:54:59 +0100

HI,

I want to extend the imapd/c-client with namespaces in such
a way that every logged in (or authenticated) user can have a
different namespace.

I understand to manipulate the namespace I need create a new
DRIVER (I call it namespace_driver) to handle the functions
SET_NAMESPACE and GET_NAMESPACE from within mail_parameters
and must also delete the handling of SET_NAMESPACE and
GET_NAMESPACE in the files: mail.c, imap4r1.c, env_unix.c.

I would like to know is the is a specific mail_parameter function
that would do initialization for a DRIVER as soon a user is
authenticated. Now I need to add lines to imapd.c in order to
call SET_NAMESPACE.

I am not sure, but an AUTHENTICATOR could potentially be
used for this, but it seems that my own defined AUTHENTICATOR
never calls any function of it.

Any hints is appreciated,

Harrie
Software developer, Technical Department

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Thu, 21 Nov 2002 11:07:35 -0500 (Eastern Standard Time)

> GET_NAMESPACE in the files: mail.c, imap4r1.c, env_unix.c.

I think that you are going about this the wrong way.

First, I am unsure if you understand what "namespace" means in IMAP.  It
does not mean "directory being used"; it refers to the syntax of names.
Do you really want every user to have a different syntax of names in their
client?  Some users use "/" for a hierarchy delimiter, others use ".",
others use "\", others use...

In any case, you definitely do not want to delete the namespace calls
imap4r1.c, since that is IMAP client code and a client can't change the
syntax of names on the server.

Second, assuming that you want to change the "directory being used" and
possibly the "directories available for use".  You do all that by
customizing env_unix.c and leaving all other files alone.  If you really
want to change namespaces per user, you do that in env_unix.c without
changing any other modules.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: Harrie Hazewinkel <[email-masked]>
Date: Thu, 21 Nov 2002 21:49:17 +0100

Hi,

> does not mean "directory being used"; it refers to the syntax of names.

I did not mean directories here (I left that out of the question).
I am currently prototyping some based on directories, but that will
eventually,  map to a DB backend (this is all besides the question).

> others use "\", others use...

Somehow, I do not want directly every user having a different namespace.
The thing I want eventually want is for each user a namespace with
different semantics. In a virtual hosted system where I have multiple
domain name for users I want to have for instance a 
"#shared/announcements"
folder that is domain specific.

For example:
[email-masked]
[email-masked]

Have a shared namespace of "#shared" and in there a mailbox called
announcements that could be used for domain private announcements.

[email-masked]
[email-masked]

Have a shared namespace of "#shared" and in there a mailbox called
announcements that could be used for domain private announcements.
Now I have the same namespace for different domain and want to
have seperate mailboxes. This is the semantics part.
I also would like to have the ability to have different namespaces
for the different domain that is configuration dependant.

Hope I explained it well. If not let me know.

> syntax of names on the server.

OK, sorry. I just worked with a big axe and server side.

> changing any other modules.

Hmm, I think fiddling in the env_unix.c makes it more difficult
since that would always require changes in the core for me.
If that all is abstracted in a driver or something with an
well defined interface it makes maintenace way easier.

Harrie

---

From: Mark Crispin <[email-masked]>
Date: Thu, 21 Nov 2002 16:33:07 -0500 (Eastern Standard Time)

On Thu, 21 Nov 2002, Harrie Hazewinkel wrote:
> different semantics.

What you have here is the same namespace, but different locations that the
namespace refers to.

That's what env_unix.c is for.  I think that you are putting yourself to
much more trouble.

-- Mark --

---

From: Harrie Hazewinkel <[email-masked]>
Date: Fri, 22 Nov 2002 09:14:25 +0100

HI,

> That's what env_unix.c is for.  I think that you are putting yourself to

That I am not sure.

An advantage for making a better abstraction of the namespaces
from the core makes it way more easy for people to have there
own namespace module. If the namespacing is done in a DRIVER
(for instance) I can simply replace the wu-imap namespace driver
with my own as soon an upgrade is done for the wu-imap package.

A disadvantage of changin env_unix.c is that I must always with
upgrades change that file.

With respect of putting me into more trouble is yes. Creating
a namespace driver it is now more trouble, but in the longterm
it is not. Patching the core each time is not what I consider
as no trouble. Patching is way more error-sensitive.

Cheers,

Harrie

---

From: Mark Crispin <[email-masked]>
Date: Fri, 22 Nov 2002 16:05:01 -0500 (Eastern Standard Time)

On Fri, 22 Nov 2002, Harrie Hazewinkel wrote:
> from the core

The entire (sole) reason why env_unix.c exists is to have a mechanism by
which environment specifics can be altered without having to change
drivers.

The abstraction that you talk about already exists.  It is env_unix.c.

-- Mark --