[Dovecot] How to propelry restore a Maildir

Timo Sirainen tss at iki.fi
Tue Sep 9 18:41:34 EEST 2008


On Tue, 2008-09-09 at 17:35 +0200, Thomas Hummel wrote:

> Can this new mail be named identically, i.e. 1215166123.52887_0.host.dom.ain:2, ?
> if so, it would be a problem when merging.

Yes, except for Dovecot's potential warning:

> > Dovecot doesn't really like if messages get "unexpunged"
> 
> Why would messages be considered unexpunged (that would concern only messages
> which were previously tagged as "Deleted", right ?) ? Or do you mean that the
> index/cache mechanism would notice that messages have disappeared ?

dovecot-uidlist is recreated lazily. So it may list files that have
already been deleted. So when Dovecot notices that there exists a new
file that's already listed in dovecot-uidlist but that has been expunged
from Dovecot's index files, it'll figure out the message is unexpunged
and to avoid breaking IMAP clients it'll log a warning and give a new
UID to the file.

> > dovecot-keywords could be a problem if the restored mail used keywords,
> > although it currently isn't a problem since keywords never get removed
> > so the existing dovecot-keywords file produces correct results. That
> > might change some day though.
> 
> You mean that the following sequence cannot happen since keywords in
> dovecot-keywords never get deleted :
> 
>   . message M filename contain keywork b
>   . message M gets deleted accidentaly
>   . keyword b gets deleted from dovecot-keywords
>   . message M is restored but the b keyword isn't known anymore
> 
> ?

Right. Keywords can only be added currently.

> So, apart from this keyword and unexpunged issues (the first one
> currently working and the second one having the "add a letter"
> workaround"), nothing prevents to merge (by simply copying messages in
> cur/) restored and new messages for the user (in the case it wouldn't
> be an option to let the user do the dirty job ;-)) ?

Right.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080909/97720176/attachment.bin 


More information about the dovecot mailing list