On Thu, 7 Apr 2005 09:03:18 -0400 Lawrence Katz lists@larryka.tzo.com wrote:
Hi Chris -
OK, here's a patch for 1.0-stable, but it's not very elegant (essentially it has to find the namespace for the mailbox a second time).
Thank you for the quick turn around. I'm not too familiar with using "patch" and adjusting for different offsets, so I manually applied your changes to my test66's cmd-status.c. I recompiled Dovecot, then removed my changes from Hastymail and everything looks good.
GNU patch seemed to do it automatically for me (on Solaris, "gpatch -p0 < cmd-status.patch") but I think copying/pasting it into my mail client may have converted tabs to spaces. I'll try and be more careful in future!
BTW, I noticed the following during a manual test via telnet:
2 status misc/spam (UNSEEN) 2 NO Mailbox doesn't exist: misc.spam
You're right! I only fixed the "OK" response. I'll try and do the other for completeness.
I may be offbase here, but it looks like Dovecot always uses a "." as the mailbox separator/delimiter when it passes mailboxes around to the various cmd functions. Is this correct? Is there some common code in which this could be changed? I don't know how necessary it is, since everything except for the default STATUS code seems to be working for me.
Dovecot seems to store two separators for each namespace, a "real" one, and another. For mboxes (at least with "/"), I think they're the same, but for for maildirs, the "real" one seems always to be ".".
When Dovecot finds the namespace for the given mailbox, it strips the namespace prefix and replaces the other separator with the "real" one (if they're different).
In the LIST code, it prepends the prefix then replaces the "real" separator with the other (if different) before displaying it to the mail client, so I tried to do the same for STATUS.
Timo will tell us if I'm wrong about any of this, I hope!
Best Wishes, Chris
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094