[Dovecot] Can virtual mailboxes created automatically?

Timo Sirainen tss at iki.fi
Thu Apr 16 01:41:31 EEST 2009


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 at xueron.com):Namespace 'virtual/': virtual: Root mail directory doesn't exist:/home/data/test1 at 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:

1) Create that directory structure immediately at the same time when you
add the user to your userdb.

2) 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090415/cc3ae2a0/attachment.bin 


More information about the dovecot mailing list