Virtual mailbox support can be tested with:
hg clone http://hg.dovecot.org/dovecot-virtualboxes/
The code is still pretty non-optimized and I've only done some small
tests, but at least it appears to work. Messages can't yet saved to
virtual mailboxes, but I was thinking that the first configured mailbox
could be used as the save destination.
Configuration goes like:
mail_plugins = virtual
namespace private {
..
prefix = virtual/
location = virtual:~/virtual-boxes
}
~/virtual-boxes then contains a filesystem-layout view of all virtual
mailboxes. Virtual mailboxes are configured in "dovecot-virtual"
files.
For example for virtual/unseen you'd create
~/virtual-boxes/unseen/dovecot-virtual file:
INBOX
Other mailbox
unseen
So the format goes like:
<mailbox name>
[<more mailbox names>]
<search rule>
[<search rule continues>]
[<another mailbox name>]
[<another mailbox's search rule>]
Currently mailbox name wildcards aren't supported. The search rules are
defined in exactly the same way as IMAP SEARCH command. So a few
examples:
- all
- unseen
- or keyword $Label1 or keyword $Label2 $Label3
- from domain.org subject hello
Each time the mailbox is synchronized the mailbox search is ran for all
the configured mailboxes. For simple rules this should be pretty fast,
but for e.g. body searches it's a bad idea. I'll fix this in future so
that it'll do searches only for newly seen messages.
Virtual mailboxes don't have dovecot.index.cache files. All mail
accesses (except uid/flag/keyword) go through the real mailbox and its
cache file is used/updated.
Messages that no longer match the search rule aren't removed until
mailbox is either reopened or EXPUNGE command is sent. This allows
creating a virtual mailbox with unseen messages, but without the message
getting lost immediately after it's opened. Although perhaps it would be
useful for a virtual mailbox with only non-deleted messages .. Maybe I
should make it configurable separately for each vmailbox.
I guess that's all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20080314/4c95d8fe/attachment-0002.bin>
Timo Sirainen wrote:> Virtual mailbox support can be tested with: > >Could an extension of this idea sort out the mismash of default names used by clients for standard folders, eg alias "Sent" <=> "Sent Items" so that at the server level we can set an option and two stupid clients with different defaults will "do the right thing"? Ed W
On 3/14/2008, Ed W (lists at wildgooses.com) wrote:> Could an extension of this idea sort out the mismash of default names > used by clients for standard folders, eg alias "Sent" <=> "Sent > Items" so that at the server level we can set an option and two > stupid clients with different defaults will "do the right thing"?This would be very cool... -- Best regards, Charles
Hello Timo, Friday, March 14, 2008, 11:21:47 AM, you wrote:> Virtual mailbox support can be tested with: > hg clone http://hg.dovecot.org/dovecot-virtualboxes/Thanks Timo, this is excellent news! I'd love to test it straight away but I can't really touch my mail server setup now -- will definitely do it some time in the future. Speaking of which, this branch will not make it into 1.1, will it? -- Best regards, Robert Tomanek mailto:dovecot at mail.robert.tomanek.org