<<< Date Index >>>     <<< Thread Index >>>

IMAP and requring / prefix for mailboxes



One of the University of Washington IMAP servers requires that mailbox names be prefixed with '/'. So, archives/feb-2006 would be specified as '/archives/feb-2006'. Mutt doesn't include a leading / on mailboxes when, for example, I open a mailbox with

  -f imap://user@server/archive/feb-2006

I've worked through the code a bit and found that the place where this choice is made is in imap_parse_path where it calls url_parse_ciss to break the URL into its components.

One method I've gotten to work is to insert the "/" prefix when the imap_munge_mbox_name quotes it. It's UBE.

  void imap_munge_mbox_name (char *dest, size_t dlen, const char *src)
  {
    char sz[LONG_STRING];
    char *buf;

    if (*src != '/') {
      sprintf (sz, "/%s", src);
      src = sz;
    }

  ...

It seems to me that this is probably best handled with a configuration option that forces the '/' prefix on mailbox paths sent to the IMAP server, but it is also possible that this will only be necessary for a single server, so a global option may not work.

Moreover, I haven't even gotten to looking into the problem of searching for mailboxes.

Any thoughts on this...something other than suggestions to fix the IMAP server...