Re: [Dovecot] Can virtual mailboxes created automatically?

2009-04-15 Thread Timo Sirainen
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(te...@xueron.com):Namespace 
   'virtual/': virtual: Root mail directory doesn't 
   exist:/home/data/te...@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.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Can virtual mailboxes created automatically?

2009-04-11 Thread Timo Sirainen
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(te...@xueron.com):Namespace 'virtual/': 
 virtual: Root mail directory doesn't 
 exist:/home/data/te...@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?



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Can virtual mailboxes created automatically?

2009-04-11 Thread Xueron Nee




On Sat, 11 Apr 2009 22:09:02 -0400 Timo Sirainen t...@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(te...@xueron.com):Namespace 'virtual/': 
  virtual: Root mail directory doesn't 
  exist:/home/data/te...@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



[Dovecot] Can virtual mailboxes created automatically?

2009-04-09 Thread Xueron Nee
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(te...@xueron.com):Namespace 'virtual/': 
virtual: Root mail directory doesn't 
exist:/home/data/te...@xueron.com/Maildir/virtual
Apr 10 12:14:41 mail dovecot: Fatal: IMAP(te...@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