[Dovecot] namespaces/virtual folder & archiving

Timo Sirainen tss at iki.fi
Wed Feb 24 19:11:23 EET 2010

On 19.2.2010, at 18.44, fernando at dfcom.com.br wrote:

> I was following the earlier namespaces discussion and I would like to
> repost a doubt. I need to have some kind of archiving, it means, store old
> messages into a cheap storage. But I couldn´t think any other solution
> than symlinks.

Symlinks would actually work fine with maildir. So you'd run some nightly cronjob that moves old mails to cheap storage and replaces the original mail with a symlink. There are two problems though:

a) Doing this at the same time as when Dovecot changes the mail's flag causes duplicate errors. maildirlock utility would help avoid this.

b) When symlink gets deleted, the original mail in cheap storage isn't. You'd need to build a script to also delete them. Or create a Dovecot plugin that does that.

> 2) Could I maintain the prior configuration, but let the second namespace
> hidden and having the inbox subfolders (or any specific as sent items) as
> virtual folder ? I don´t know if this makes sense...

I'm not really sure what you even try to mean by it.. :)

> 3) Could I have my normal Inbox and a folder (in another disk - ex. huge
> sata one) storing files older than 30 days and through virtual folders
> join these messages in a common virtual INBOX while acessing imap or pop3
> ?

No, you can't do archiving by using virtual mailboxes. Or you could, but the moved mails would get new UIDs and with many clients would show up as new mails.

Oh, and solution 4) Use v2.0 and dbox or mdbox format. They support alt storage internally.

More information about the dovecot mailing list