On Thu, 5 Oct 2006, Erik Kangas wrote:
Ok. I understand now that this happens as a choice by UW IMAP since "INBOX" is a special folder in its own special name space and the fact that "INBOX/" can have inferiors is specific to my setup. As such it is not "wrong" that a list of "INBOX" says \NoInferiors.

Sorry for not responding to your Monday message. I was having trouble working out a way to explain, in an intelligent manner, some of the design issues that your comment here shows that you've figured out on your own. So I don't have to worry about that now... ;-)

To what you've worked out, I can add is that inferiors of INBOX have a semantic problem which you may not have realized. INBOX is a special name; the protocol requires that it is case independent. Therefore INBOX, inbox, iNBOX, INbox, InBoX, etc. are all the IMAP INBOX.

The IMAP protocol does not apply such a rule to any other name; thus there is no protocol requirement that INBOX/foo and inbox/foo be the same name. It could be; logic dictates that it should be; but it isn't in either the protocol nor in how the c-client library implements it if you force the matter.

That's what's really behind the decision to force \NoInferiors with INBOX. It's a quagmire that I want to avoid.

So the actual question at hand is: is there any easy way to have UW IMAP not return the "\NoInferiors" flag when the INBOX is formatted as "mix"?
I.e. a patch of the mix code or something?

The easiest thing to do is to make it global for all users. The routines to modify are dummy_lsub() and dummy_scan(), removing the LATT_NOINFERIORS from the mm_lsub() and dummy_listed() calls in these routines.

A more sophisticated test would perhaps be to set up a global:

static int dualuseinbox = -1;

Then in dummy_canonicalize () (which is called by both dummy_lsub() and dummy_scan() before the annoucement of INBOX) have
  if (dualuseinbox < 0) {    /* know the dual-use status of INBOX yet? */
    DRIVER *d = mail_valid (NIL,"INBOX",NIL);
    dualuseinbox = (d && (d->flags & DR_DIRFMT)) ? T : NIL;
  }

Then instead of removing the LATT_NOINFERIORS replace it with
        dualuseinbox ? NIL : LATT_NOINFERIORS

Let me know if this helps.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to