[dev] identities

Anil Madhavapeddy anil@recoil.org
Wed, 25 Oct 2000 02:41:53 +00100 (BST)


Quoting Chuck Hagenbuch <chuck@horde.org>:

> 
> Hmm. This is getting kind of hairy - I see the idea, definitely, and it's
> very flexible, but it might be a bit overwhelming. For things like a 
> fullname and signature, you just don't use one if the user hasn't 
> specified one... As far as making things "sticky", I think letting 
> the admin say what fields of an identity
> are editable per server will hopefully be good enough...
> 

Aha, but thats exactly what happens here - it's just that you have
a really clear path for where to go.  From a code point of view,
what is overwhelming about it?

All you have is this really simple list traversal.  You just start
from the global default, and work your way up until you hit something
not defined.  In the middle of this, if you hit a sticky preference,
you stop there, since the admin doesn't want you to go any higher.

It doesn't really change from what you said above - but it avoids
special cases, and once clearly visualised, makes it easily to understand
and code.  Before you go 'pah!' - it's exactly what qmail does with
its .qmail file handling, and it is just so incredibly powerful there,
for _exactly_ this kind of overriding (you have global email domains,
shell-user level ones, and user-level ones all handled by a single
.qmail naming convention - the code is tiny!)

What's the benefit?  Well, you just define the namespace for the
entirity of horde, so to reference an IMP preference, you could
just try and retrieve (from the HUOS?) something called 'fullname',
and it would retrieve the one appropriate to the current identity,
module and so on.  Or if you want the default one for IMP, just
retrieve 'imp.default.fullname' 

This kind of thing is easy to extend; a new module would just hook
into the preference namespace, and not need any changes of any kind
or whatever.

I can try and hack it up under current cvs if you want to see what
I mean, and delay the navigator stuff a bit (or ditch the whole
idea for a better one - this was just a thought + being well impressed
with the elegance of the solution under qmail)

> 
> Nope - I've got a win2k box and a linux box on my desk, and I use IMP for my
> work and personal mail on both. =)
> 

Cheat!  I've seen X-Mailer: mutt headers from you in the past ;-)

Im switching to IMP 2.3 a whole load now though - only thing that
really stops me using it over mutt on Unix is how bad Netscape is
really... must get around to trying Mozilla under OpenBSD sometime.

--
Anil Madhavapeddy, <anil@recoil.org>