deleted DELETE

Ken Murchison murch at
Thu Aug 30 12:27:39 EDT 2007

David Carter wrote:
> On Wed, 29 Aug 2007, David Carter wrote:
>> mboxname_isusermailbox() works on internal mailbox names. I don't 
>> think that it needs to worry about IMAPOPT_UNIXHIERARCHYSEP.
> Here's a trivial patch to remove the IMAPOPT_UNIXHIERARCHYSEP stuff. 
> Otherwise mboxname_isusermailbox() is broken when unixhierarchysep is set.

I've modified your patch further, to make it look closer to the original 
code.  But I'm now wondering what the 'isdel' clause is trying to do. 
Once we've stripped the deletedprefix and found "user.", we shouldn't 
care about any timestamp, because a deleted Inbox, isn't an Inbox 
anymore.  Correct?  Actually, can any deleted mailbox be considered a 
user mailbox since only the admin can see them?

if (!strncmp(start, "user.", 5) && (!isinbox || !strchr(start+5, '.'))
     || (isdel && (p = strchr(start+5, '.')) && !strchr(p+1, '.')))
return (char*) start+5;

Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University

More information about the Cyrus-devel mailing list