[Dovecot] namespace from snapshots
hi all,
I'm trying to give access to snapshots taken from by dell iscsi MD3200i to my maildirs users.
snapshot are mounted in read only mode from my FreeBSD box.
In my /usr/local/etc/dovecot/conf.d/10-mail.conf, I have :
namespace inbox { inbox = yes }
namespace da1 { prefix = INBOX.backup.da1. hidden = no list = yes inbox = no location = maildir:/da1/%u/Maildir type = private }
I have two problems :
- In my log, dovecot complain about the fact that my snapshot filsystem is read only Error: open(/da1/test2@toto.com/Maildir/.Trash/dovecot-uidlist) failed: Read-only file system
The second problem is that through my thunderbird I can't see the Inbox saved in the snapshot (whereas I see Sent and Trash folders)
If anyone could help me, It would be nice.
Regard, Karl.
On Fri, 2012-05-11 at 16:33 +0200, Karl Oulmi wrote:
namespace da1 { prefix = INBOX.backup.da1. hidden = no list = yes inbox = no location = maildir:/da1/%u/Maildir type = private }
I have two problems :
- In my log, dovecot complain about the fact that my snapshot filsystem is read only Error: open(/da1/test2@toto.com/Maildir/.Trash/dovecot-uidlist) failed: Read-only file system
See if http://hg.dovecot.org/dovecot-2.1/rev/7f238016db81 helps. If you're not saving mails via dovecot-lda it might still complain if there are new files.
Also if it complains about indexes add :INDEX=MEMORY to location.
Alternative to the patch is to add :CONTROL=~/Maildir/snapshot-control/% u or something to location, but that could get problematic also.
The second problem is that through my thunderbird I can't see the Inbox saved in the snapshot (whereas I see Sent and Trash folders)
It should be accessible as "INBOX.backup.da", although some older Dovecot versions don't handle that properly.
Hi,
With same config as Kerl and Your patch I'm still getting thiese errors
May 16 12:11:36 thebe2 dovecot: imap(lazy): Debug: Namespace backup_h1: type=private, prefix=backup-h1., sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:/snapshot/h1/vmail/la/lazy/Maildir:INDEX=MEMORY May 16 12:11:36 thebe2 dovecot: imap(lazy): Debug: maildir++: root=/snapshot/h1/vmail/la/lazy/Maildir, index=, control=, inbox=, alt= 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 May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system 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 May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system 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 May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Disconnected: Internal error occurred. Refer to server log for more information. [2012-05-16 12:11:36] in=259 out= 100540
maybe it will be easier to move all dovecot metadata to separate (non snapshot) location ?
Regards, Michal Grzedzicki
2012/5/14, Timo Sirainen <tss@iki.fi>:
On Fri, 2012-05-11 at 16:33 +0200, Karl Oulmi wrote:
namespace da1 { prefix = INBOX.backup.da1. hidden = no list = yes inbox = no location = maildir:/da1/%u/Maildir type = private }
I have two problems :
- In my log, dovecot complain about the fact that my snapshot filsystem is read only Error: open(/da1/test2@toto.com/Maildir/.Trash/dovecot-uidlist) failed: Read-only file system
See if http://hg.dovecot.org/dovecot-2.1/rev/7f238016db81 helps. If you're not saving mails via dovecot-lda it might still complain if there are new files.
Also if it complains about indexes add :INDEX=MEMORY to location.
Alternative to the patch is to add :CONTROL=~/Maildir/snapshot-control/% u or something to location, but that could get problematic also.
The second problem is that through my thunderbird I can't see the Inbox saved in the snapshot (whereas I see Sent and Trash folders)
It should be accessible as "INBOX.backup.da", although some older Dovecot versions don't handle that properly.
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.
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 ?
Regards,
Michal Grzedzicki
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.
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.
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.
participants (3)
-
Karl Oulmi
-
Lazy
-
Timo Sirainen