Charles Benett wrote:
> 
> Hi!
> Starting to think about IMAP implementation. Obvious question is how to
> deal with multiple folders without breaking POP3 & LocalDelivery.
> I think the answer may be as simple as this:
> 
> in org.apache.james.James, method getUserInbox(String name)
> turn:  String dest = localInbox.getChildDestination(userName)
> into:  String dest = localInbox.getChildDestination(userName) + "Inbox"
> + File.separator;
> 
> So, rather than mail for testUser being in, e.g.
> ../var/mail/localinbox/testUser, it's in
> ../var/mail/localinbox/testUser/Inbox
> 
> This appears to work with existing James & POP3.
> 
> It would then be upto the IMAP server to manage additional mailboxes.(By
> adding MailRepositries)
> You could have some users using POP3 and some using IMAP.
> Or have I missed something?
> 

Sounds good to me

> Also, in MailRepository getChildDestination(), is the replacement of
> '.'s in the user name there to handle Windows file systems? (Doesn't
> seem necessary for Unix). It works with email addresses such as
> harry.potter, but gives a slightly unexpected directory structure.
> 
> Thanks,
> 
> Charles
> 

actually the purpose of the getChildDestination() is a bit more
abstract... the idea was to define an abstract way to get a "child"
destination for a Repository whatever kind of repository it may be. The
last avalon will aim to an easier Repository getChildRepository(String
childName).

This way the admin can set the inbox destiantion to 
file:///../var/mail/inbox
or to jdbc://mypass:[EMAIL PROTECTED]/mydb/mytable
or ldap://[whatever]
or whatever else while the aplication (james) can trasparently get a
child repository just knowing the name.

The definition of "child" repository is a bit fuzzy... basically the
rule is that a parent and child are two decoupled repositoy so that if I
store two objects, one for each rep, with the same key name, they are
handled separatly and never conflict. The way this behaviour may be
implemented is up to the specific protocol. 

On a file system I can use children folder (/inbox/myrecord.store,
/inbox/mychild/myrecord.store) or filenames (inbox_myrecord.store,
inbox_mychild_myrecord.store) or whatever other way).

Federico
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to