[Dovecot] Deleted mailboxes with lazy_expunge
Hello,
I'm trying to configure lazy_expunge plugin (as a way to provide easy
backup for mails). This is my configuration (as explained in dovecot wiki):
# Default namespace namespace { prefix = separator = / inbox = yes }
# namespaces for lazy_expunge plugin: namespace { prefix = .EXPUNGED/ separator = / location = maildir:~/Maildir/expunged } namespace { prefix = .DELETED/ separator = / location = maildir:~/Maildir/deleted } namespace { prefix = .DELETED/.EXPUNGED/ separator = / location = maildir:~/Maildir/deleted/expunged
lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
I use just one namespace because I don't want to differentiate between
deleting mails or deleting mailboxes, but I have the same problem using the 3 namespaces.
With this configuration, when a user connects, if he doesn't have the
expunged folder, dovecot logs:
Sep 16 10:53:35 myotis30 dovecot: imap(angel.luis): Debug: Namespace : type=private, prefix=.EXPUNGED/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir/expunged Sep 16 10:53:35 myotis30 dovecot: imap(angel.luis): Debug: maildir++: root=/home/alumnos/46/113246/Maildir/expunged, index=, control=, inbox= Sep 16 10:53:35 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/expunged Sep 16 10:53:35 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1
and the expunged folder is created (without the cur, new neither tmp
folders).
When I delete a message in the INBOX folder (for example), dovecot logs:
Sep 16 10:57:19 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/expunged/.INBOX Sep 16 10:57:19 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1 Sep 16 10:57:19 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/expunged/.INBOX Sep 16 10:57:19 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1
and the message is stored in the expunge namespace (that is an imap
INBOX folder is created in the namespace, with its cur, new and tmp, and the message is stored).
But when I try to delete a whole imap folder (in the example I delete
it from trash folder because I use thunderbird and it previously move the folder to trash), dovecot logs:
Sep 16 11:45:46 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1 Sep 16 11:45:46 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/deleted/.Trash.kk-20110916-114546 Sep 16 11:45:46 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1 Sep 16 11:45:46 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/deleted/.Trash.kk-20110916-114546 Sep 16 11:45:46 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1
and my mail client reports the error "[CANNOT] Can't rename mailboxes
accross specified storages" and the mail folder isn't created in the DELETED namespace.
Any idea?
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
On Fri, 2011-09-16 at 11:51 +0200, Angel L. Mateo wrote:
Hello,
I'm trying to configure lazy_expunge plugin (as a way to provide easy backup for mails). This is my configuration (as explained in dovecot wiki):
dovecot -n output would have been better. What do you use as mail_location? My guess is that you have specified INDEX or CONTROL path there, which isn't currently compatible with this..
# Default namespace namespace { prefix = separator = / inbox = yes }
# namespaces for lazy_expunge plugin: namespace { prefix = .EXPUNGED/ separator = / location = maildir:~/Maildir/expunged } namespace { prefix = .DELETED/ separator = / location = maildir:~/Maildir/deleted } namespace { prefix = .DELETED/.EXPUNGED/ separator = / location = maildir:~/Maildir/deleted/expunged
lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
I use just one namespace because I don't want to differentiate between deleting mails or deleting mailboxes, but I have the same problem using the 3 namespaces.
In above config you're using 3 namespaces, not 1. This problem shouldn't exist if you use just one namespace.
and my mail client reports the error "[CANNOT] Can't rename mailboxes accross specified storages" and the mail folder isn't created in the DELETED namespace.
With http://hg.dovecot.org/dovecot-2.0/rev/e57bd3e2ec27 it'll now log the reason why it's not possible.
El 16/09/11 12:08, Timo Sirainen escribió:
On Fri, 2011-09-16 at 11:51 +0200, Angel L. Mateo wrote:
Hello,
I'm trying to configure lazy_expunge plugin (as a way to provide easy backup for mails). This is my configuration (as explained in dovecot wiki):
dovecot -n output would have been better. What do you use as
Yes, I know but I forgot it :-(. You have now the config.
mail_location? My guess is that you have specified INDEX or CONTROL path there, which isn't currently compatible with this..
Yes, I'm using INDEX in mail_location
I use just one namespace because I don't want to differentiate between deleting mails or deleting mailboxes, but I have the same problem using the 3 namespaces.
In above config you're using 3 namespaces, not 1. This problem shouldn't exist if you use just one namespace.
I have tried with both configurations with the same problem.
I have made another test, this time with 1 namespace and with
thunderbird directly expunging messages (to avoid moving them to trash and then purging trash). With this, dovecot logs:
Sep 16 12:26:48 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1 Sep 16 12:26:48 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/expunged/.kk Sep 16 12:26:48 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1 Sep 16 12:26:48 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/expunged/.kk Sep 16 12:26:48 myotis30 dovecot: imap(angel.luis): Debug: Namespace .EXPUNGED/: Using permissions from /home/alumnos/46/113246/Maildir/expunged: mode=0700 gid=-1
but "kk" mail folder isn't created in the expunge namespace.
and my mail client reports the error "[CANNOT] Can't rename mailboxes accross specified storages" and the mail folder isn't created in the DELETED namespace.
With http://hg.dovecot.org/dovecot-2.0/rev/e57bd3e2ec27 it'll now log the reason why it's not possible.
I'm going to try it...
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
El 16/09/11 12:08, Timo Sirainen escribió:
With http://hg.dovecot.org/dovecot-2.0/rev/e57bd3e2ec27 it'll now log the reason why it's not possible.
These are the logs reported with this patch:
ep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1 Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/deleted/.kk-20110916-132100 Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1 Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Permission lookup failed from /home/alumnos/46/113246/Maildir/deleted/.kk-20110916-132100 Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Namespace .DELETED/: Using permissions from /home/alumnos/46/113246/Maildir/deleted: mode=0700 gid=-1 Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Can't rename 'kk' to '.DELETED/kk-20110916-132100': index dirs don't match
I have try to remove the same folder without INDEX in mail_location.
Without this option it works.
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
On Fri, 2011-09-16 at 13:24 +0200, Angel L. Mateo wrote:
Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Can't rename 'kk' to '.DELETED/kk-20110916-132100': index dirs don't match
I have try to remove the same folder without INDEX in mail_location.
Without this option it works.
Alternatively you could add INDEX path to lazy_expunge namespaces and it would work. The important thing is that both source and destination either have or don't have INDEX path specified, but it can't be mixed. (Looks like I messed up those new debug messages - clarified them in hg now.)
El 16/09/11 14:01, Timo Sirainen escribió:
On Fri, 2011-09-16 at 13:24 +0200, Angel L. Mateo wrote:
Sep 16 13:21:00 myotis30 dovecot: imap(angel.luis): Debug: Can't rename 'kk' to '.DELETED/kk-20110916-132100': index dirs don't match
I have try to remove the same folder without INDEX in mail_location.
Without this option it works.
Alternatively you could add INDEX path to lazy_expunge namespaces and it would work. The important thing is that both source and destination either have or don't have INDEX path specified, but it can't be mixed. (Looks like I messed up those new debug messages - clarified them in hg now.)
OK. I have configured all namespaces with the same INDEX path and the
problem is solved.
Thank you, Timo.
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
participants (2)
-
Angel L. Mateo
-
Timo Sirainen