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.