[Dovecot] namespaces/virtual folder & archiving
Hi,
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.
Then, I thought about store 'Sent Items' (as having old messages and less acessed). But I also needed to do with nfs and symlinks. So, it comes the namespaces discussion and a little brainstorm:
Could I have a namespace only with INBOX and the personal folders (drafts, sent items, etc) in another one - and those would be stored in huge sata disks while inbox in 300g sas disks ?
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...
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 ?
What do you thing, would you have another better approach ?
Best Regards, Fernando
Hi,
I did some researches and I could reproduce item: 1 - storage inbox in quick disks and other folders in cheaper ones.
Something like this:
namespace private { separator = . prefix = location = maildir:/tmp/%u/Maildir inbox = yes hidden = yes list = no # for v1.1+ }
namespace private { separator = . prefix = INBOX. location = maildir:/tmp/%u/Maildir2 }
In the disk:
drwx------ 5 vmail vmail 4.0K Feb 24 07:08 Maildir drwx------ 10 vmail vmail 4.0K Feb 24 06:39 Maildir2
I don´t know how the indexes control messages in the second namespace (are those messages indexed ?)
Also, quota control was done by creating a 'maildirsize' at inbox level (Maildir/) - when messages are moved from one namespace to another, the file is updated.
Now, I was trying to solve item 3 with virtual folders, but I couldn´t. I don´t even know if it´s possible. (Unfortunatelly) I believe it´s not :(
[]s Fernando
Hi,
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.
Then, I thought about store 'Sent Items' (as having old messages and less acessed). But I also needed to do with nfs and symlinks. So, it comes the namespaces discussion and a little brainstorm:
Could I have a namespace only with INBOX and the personal folders (drafts, sent items, etc) in another one - and those would be stored in huge sata disks while inbox in 300g sas disks ?
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...
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 ?
What do you thing, would you have another better approach ?
Best Regards, Fernando
On 19.2.2010, at 18.44, fernando@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.
- 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.. :)
- 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.
participants (2)
-
fernando@dfcom.com.br
-
Timo Sirainen