MBOX-Line: From mrc at CAC.Washington.EDU  Sun Mar 11 17:11:20 2007
To: imap-protocol@u.washington.edu
From: Mark Crispin <mrc@CAC.Washington.EDU>
Date: Fri Jun  8 12:34:38 2018
Subject: [Imap-protocol] mailbox hierarchy conventions?
In-Reply-To: <07Mar11.154843pst."57996"@synergy1.parc.xerox.com>
References: <07Mar11.154843pst."57996"@synergy1.parc.xerox.com>
Message-ID: <alpine.OSX.0.83.0703111704450.20984@pangtzu.panda.com>

On Sun, 11 Mar 2007, Bill Janssen wrote:
> I'm reading a lot on the Web about Apple Mail and its notion that all
> mailboxes be sub-mailboxes of INBOX, apparently because a popular IMAP
> server does it that way.

I suggest that you concern yourself with complying with IMAP, and not 
try to program for the whims of an individual client.  I did not find 
Apple Mail to be a satifactory IMAP client.

> I'm re-exporting an MH mail folder setup

One caution is that UIDs need to be immutable, or at least you need to 
change the UIDVALIDITY when they change.  This is a problem if you use MH 
message ID numbers for UIDs, because the mh pack and sort operations will 
renumber the message ID numbers.

As distributed, UW imapd simply returns a new UIDVALIDITY with each new 
session for an mh mailbox.  This is a problem for disconnected clients 
which use the UIDs to determine if it must download the message or if it 
already has it cached.

Lauren Weinstein has a hacked version of UW imapd, although with a hacked 
version of mh, that I helped him with that has sticky UIDs and changes the 
UIDVALIDITY only when a pack/sort is done.  I don't know his current 
status; he was using a mobile client that was quite embryonic and had lots 
of growing pains, thus there were multiple unknowns when debugging all 
this.

> My plan was to basically represent each of these MH folders as an IMAP
> mailbox, and add another top-level mailbox called "INBOX", which would
> normally be empty (there's a procmail daemon that sorts the mail).  So
> there's a single namespace and there's no root for reference names.

As I understand it, this is alright.

Have you thought about trying UW imapd, even if you plan to deploy your 
own implementation, just so you have reference to compare?

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

