[Dovecot] Can virtual mailboxes created automatically?
Hi,
I set a virtual namespace, and for new users, there is no root dir for it.
namespace private { separator = / prefix = virtual/ location = virtual:~/Maildir/virtual list = no hidden = yes }
log: Apr 10 12:14:41 mail dovecot: IMAP(test1@xueron.com):Namespace 'virtual/': virtual: Root mail directory doesn't exist:/home/data/test1@xueron.com/Maildir/virtual Apr 10 12:14:41 mail dovecot: Fatal: IMAP(test1@xueron.com): Namespace initialization failed Apr 10 12:15:27 mail dovecot: Killed with signal 15 (by pid=26918 uid=0 code=kill)
How to do then?
Thanks :)
-- Xueron Nee http://www.xueron.com
On Fri, 2009-04-10 at 13:06 +0800, Xueron Nee wrote:
I set a virtual namespace, and for new users, there is no root dir for it. .. Apr 10 12:14:41 mail dovecot: IMAP(test1@xueron.com):Namespace 'virtual/': virtual: Root mail directory doesn't exist:/home/data/test1@xueron.com/Maildir/virtual
So do you want to create some virtual mailboxes automatically, or do you simply want Dovecot to ignore the namespace if the directory doesn't exist?
On Sat, 11 Apr 2009 22:09:02 -0400 Timo Sirainen tss@iki.fi wrote:
On Fri, 2009-04-10 at 13:06 +0800, Xueron Nee wrote:
I set a virtual namespace, and for new users, there is no root dir for it. . Apr 10 12:14:41 mail dovecot: IMAP(test1@xueron.com):Namespace 'virtual/': virtual: Root mail directory doesn't exist:/home/data/test1@xueron.com/Maildir/virtual
So do you want to create some virtual mailboxes automatically, or do you simply want Dovecot to ignore the namespace if the directory doesn't exist?
I think create virtual mailboxes automatically is much better for me :) I want to let users to set up there virtual mailboxes for POP3. So, a default or template of 'dovecot-virtual' for auto-created virtual mailboxes is good :)
If just ignore the virtual namespace, maybe POP3 users will make RealMails/ namespace as the 'inbox=yes' one. :)
Thanks ...
Xueron Nee http://www.xueron.com
On Sun, 2009-04-12 at 11:02 +0800, Xueron Nee wrote:
On Fri, 2009-04-10 at 13:06 +0800, Xueron Nee wrote:
I set a virtual namespace, and for new users, there is no root dir for it. . Apr 10 12:14:41 mail dovecot: IMAP(test1@xueron.com):Namespace 'virtual/': virtual: Root mail directory doesn't exist:/home/data/test1@xueron.com/Maildir/virtual
So do you want to create some virtual mailboxes automatically, or do you simply want Dovecot to ignore the namespace if the directory doesn't exist?
I think create virtual mailboxes automatically is much better for me :) I want to let users to set up there virtual mailboxes for POP3. So, a default or template of 'dovecot-virtual' for auto-created virtual mailboxes is good :)
Well, that's something I don't think Dovecot should really do internally. You have two possibilities:
Create that directory structure immediately at the same time when you add the user to your userdb.
Use a post-login script (http://wiki.dovecot.org/PostLoginScripting) that does something like:
if [ ! -d $HOME ]; then cp -R /etc/dovecot/template $HOME fi exec /usr/local/lib/dovecot
And I suppose there could be also 3) a new plugin that does basically what 2) does, but I'm not really interested in implementing that.
participants (2)
-
Timo Sirainen
-
Xueron Nee