[Dovecot] INBOX. namespace
I am trying to configure dovecot-1.2.11 to have the same IMAP namespacing as courier-imap as per http://wiki.dovecot.org/Migration/Courier, but failing badly.
I have a test maildir with INBOX and folder 'junk'. Without fiddling with namespaces, this works fine: there are 91 msgs in INBOX and 2 in junk.
a namespace
- NAMESPACE (("" ".")) NIL NIL a OK Namespace completed. a examine INBOX ...
- 91 EXISTS ... a OK [READ-ONLY] Select completed. a examine junk ...
- 2 EXISTS ... a OK [READ-ONLY] Select completed.
Now I make the following addition to dovecot.conf:
namespace private { separator = . prefix = INBOX. inbox = yes hidden = no }
After this the inbox appears to be empty, and I cannot select the junk folder at all:
a namespace
- NAMESPACE (("INBOX." ".")) NIL NIL a OK Namespace completed. a examine INBOX
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 0 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1269605071] UIDs valid
- OK [UIDNEXT 1] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest a OK [READ-ONLY] Select completed. a examine INBOX.junk
- OK [CLOSED] Previous mailbox closed. a NO Mailbox doesn't exist: junk
Furthermore I can select "INBOX.INBOX" (although that's empty as well)
a examine INBOX.INBOX
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 0 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1269605071] UIDs valid
- OK [UIDNEXT 1] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest a OK [READ-ONLY] Select completed. a examine INBOX.INBOX.INBOX
- OK [CLOSED] Previous mailbox closed. a NO Mailbox doesn't exist: INBOX.INBOX a examine junk a NO Unknown namespace.
Have I misunderstood what I'm supposed to be doing here?
The other relevant setting is:
mail_location: maildir:%h
but I've not changed this; as I say, this works just fine without meddling with namespaces.
Many thanks,
Brian.
On Fri, 2010-03-26 at 12:36 +0000, Brian Candler wrote:
Now I make the following addition to dovecot.conf:
namespace private { separator = . prefix = INBOX. inbox = yes hidden = no }
After this the inbox appears to be empty, and I cannot select the junk folder at all:
Something's seriously wrong. Just changing namespace prefix shouldn't do anything like that. (And since I haven't heard of horror stories of v1.2.11 breaking, I don't think I just broke it either.)
What does this show:
a LIST "" *
Also, make sure that dovecot -n shows only that one namespace you defined with the exact settings you intended.
On Fri, Mar 26, 2010 at 02:45:40PM +0200, Timo Sirainen wrote:
After this the inbox appears to be empty, and I cannot select the junk folder at all:
Something's seriously wrong. Just changing namespace prefix shouldn't do anything like that. (And since I haven't heard of horror stories of v1.2.11 breaking, I don't think I just broke it either.)
What does this show:
a LIST "" *
a list "" *
- LIST (\HasChildren) "." "INBOX" a OK List completed.
Also, make sure that dovecot -n shows only that one namespace you defined with the exact settings you intended.
Yes, it was fine.
However, I've now found the problem using ktrace. The homedir attribute in LDAP is /mail/0/6/37/30/brian%dev.example.com/
but when I do 'examine inbox' I see it has been munged:
30362 imap GIO fd 0 read 17 bytes "a examine INBOX\r " 30362 imap RET read 17/0x11 30362 imap CALL stat(0x186012a0,0xbfbfe4b0) 30362 imap NAMI "/mail/0/6/37/30/briandev.example.comev.example.com/tmp"
Furthermore, I can make it work properly just by adding
... location = maildir:%h ...
inside the 'namespace' setting, rather than relying on it defaulting to the mail_location setting (which is the same as that)
So it looks like "%dev..." was having "%d" expanded. As I have a config workaround it's not a big deal, but it certainly was confusing; maybe this is one level of attribute expansion which you didn't intend taking place.
Regards,
Brian.
On Fri, 2010-03-26 at 14:00 +0000, Brian Candler wrote:
However, I've now found the problem using ktrace. The homedir attribute in LDAP is /mail/0/6/37/30/brian%dev.example.com/
but when I do 'examine inbox' I see it has been munged: .. 30362 imap NAMI "/mail/0/6/37/30/briandev.example.comev.example.com/tmp"
Oh. This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/0cf38dcd8ced
On Sat, Mar 27, 2010 at 03:54:48AM +0200, Timo Sirainen wrote:
but when I do 'examine inbox' I see it has been munged: .. 30362 imap NAMI "/mail/0/6/37/30/briandev.example.comev.example.com/tmp"
Oh. This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/0cf38dcd8ced
Yes, that does the job, thank you!
As a separate problem, I still find I can open INBOX.INBOX:
a namespace
- NAMESPACE (("INBOX." ".")) NIL NIL a OK Namespace completed. a list "" *
- LIST (\HasChildren) "." "INBOX"
- LIST (\HasNoChildren) "." "INBOX.testfolder"
- LIST (\HasNoChildren) "." "INBOX.Trash"
- LIST (\HasNoChildren) "." "INBOX.junk"
- LIST (\HasNoChildren) "." "INBOX.Sent"
- LIST (\HasNoChildren) "." "INBOX.Drafts"
- LIST (\HasNoChildren) "." "INBOX.Spam" a OK List completed. a examine INBOX.INBOX
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 unknown-2 unknown-3 unknown-4 unknown-5 Old)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 91 EXISTS
- 0 RECENT
- OK [UNSEEN 3] First unseen.
- OK [UIDVALIDITY 1268411312] UIDs valid
- OK [UIDNEXT 699] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest a OK [READ-ONLY] Select completed.
This is using the config from http://wiki.dovecot.org/Migration/Courier
namespace private { prefix = INBOX. separator = . inbox = yes }
I don't suppose a *real* IMAP client would attempt to open INBOX.INBOX given that it's not shown in "list" output. But as an experiment I tried setting inbox = no, and adding another namespace:
namespace private { prefix = separator = . inbox = yes hidden = yes list = no subscriptions = yes }
and now it seems to be OK:
a namespace
- NAMESPACE (("INBOX." ".")) NIL NIL a OK Namespace completed. a list "" *
- LIST (\HasChildren) "." "INBOX"
- LIST (\HasNoChildren) "." "INBOX.testfolder"
- LIST (\HasNoChildren) "." "INBOX.Trash"
- LIST (\HasNoChildren) "." "INBOX.junk"
- LIST (\HasNoChildren) "." "INBOX.Sent"
- LIST (\HasNoChildren) "." "INBOX.Drafts"
- LIST (\HasNoChildren) "." "INBOX.Spam" a OK List completed. a examine INBOX.INBOX a NO Mailbox doesn't exist: INBOX
Would you say there any benefit in doing this, or should I just stick to the simpler config given on the wiki?
Regards,
Brian.
participants (2)
-
Brian Candler
-
Timo Sirainen