I managed to get it working using a litle change in sources an extra mailbox_list_subscription_fill_one(dest_list, src_list, "" ); in src/lib-storage/list/mailbox-list-subscriptions.c:mailbox_list_subscriptions_refresh() --- src/lib-storage/list/mailbox-list-subscriptions.c (wersja 494) +++ src/lib-storage/list/mailbox-list-subscriptions.c (kopia robocza) @@ -142,6 +142,9 @@ subsfile_ctx = subsfile_list_init(dest_list, path); if (subsfile_list_fstat(subsfile_ctx, &st) == 0) dest_list->subscriptions_mtime = st.st_mtime; + + mailbox_list_subscription_fill_one(dest_list, src_list, "" ); + while ((name = subsfile_list_next(subsfile_ctx)) != NULL) T_BEGIN { T_BEGIN { ret = mailbox_list_subscription_fill_one(dest_list, now lsub works as expected, namespace root which is an INBOX from a snapshot is subscribed, all the subfolders are also subscribed (from original subscriptions file). It whould be great if one could specify in the namespace mailboxes that whould get autosubscribed or just to autosubscribe root whitch is what You need if You have a copy of Maildir with INBOX. If You think this can be usefull I will try to produce more general patch automagicly subscribing root or any other mailbox in an namespace. Regards, Michal Grzedzicki 2012/8/21, Lazy <lazy404@gmail.com>:
2012/8/19, Timo Sirainen <tss@iki.fi>:
On 16.8.2012, at 14.58, Lazy wrote:
2012/5/19 Timo Sirainen <tss@iki.fi>:
On Wed, 2012-05-16 at 12:39 +0200, Lazy wrote:
May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) failed: Read-only file system
Does the attached patch help?
maybe it will be easier to move all dovecot metadata to separate (non snapshot) location ?
It could also be a bit problematic. At least message keywords (=custom flags) wouldn't work because the dovecot-keywords file exists only in the snapshot dir.
Moving metadata helped, but now archived inbox is unsubscribed. Is there a way to make all folders in an namespace subscribed by default ?
Nope. I could try to get the snapshots fixed at some point when I have more time, but I'm not going to add a feature to subscribe everything by default. People might try to start using it.
If I enable per snapshot subscriptions i see all folders except INBOX, i have tried to subscribe it using mailbox_list_subscription_fill_one() or using imap as bellow without success
http://dovecot.org/list/dovecot/2007-October/025965.html suggest that it isn't possible
./imap/.libs/imap * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in as root a subscribe "test" a OK Subscribe completed. a lsub "" "*" imap(root): Warning: Subscriptions file /root/Maildir/subscriptions: Removing invalid entry: * LSUB () "." "Drafts" * LSUB () "." "Sent" * LSUB () "." "Junk" * LSUB () "." "Trash" * LSUB () "." "Deleted Messages" * LSUB () "." "test.Drafts" * LSUB () "." "test.Sent" * LSUB () "." "test.Junk" * LSUB () "." "test.Trash" * LSUB () "." "test.Deleted Messages" a OK Lsub completed. b list "" "*" * LIST (\HasNoChildren) "." "DUpa" * LIST (\HasNoChildren) "." "Deleted Messages" * LIST (\HasNoChildren) "." "Junk" * LIST (\HasNoChildren) "." "Trash" * LIST (\HasNoChildren) "." "Sent" * LIST (\HasNoChildren) "." "Drafts" * LIST (\HasNoChildren) "." "INBOX" * LIST (\HasChildren) "." "test" * LIST (\HasNoChildren) "." "test.TEst" * LIST (\HasNoChildren) "." "test.Deleted Messages" * LIST (\HasNoChildren) "." "test.Junk" * LIST (\HasNoChildren) "." "test.Trash" * LIST (\HasNoChildren) "." "test.Sent" * LIST (\HasNoChildren) "." "test.Drafts" b OK List completed.