[Dovecot] virtual domain

Barry Kwok barrykwok at spymac.com
Tue Sep 27 08:29:34 EEST 2005


>On Mon, 2005-09-26 at 21:33 +0800, Barry Kwok wrote:
>> we are currently using vm-pop3d to implement virtual domains. But due to some locking problem in vm-pop3d,   we want to test the possibility to change to dovecot.
>> Currently, in vm-pop3d, the passwd file is located in
>> /etc/virtual/domain1.com/passwd
>> /etc/virtual/domain2.com/passwd
>
>passdb passwd-file {
>  args = /etc/virtual/%d/passwd
>}
>
>This requires Dovecot 1.0.alpha2 or later.
>
>> and the passwd format is:
>> user: md5 encrpted password
>
>In MD5crypt format? ie. $1$something? Then it should work directly.
>
>> and the email is store in 
>> /var/spool/virtual/domain1.com/user
>> /var/spool/virtual/domain2.com/user
>
>As mboxes? For IMAP you'll need also some directory where non-INBOXes
>are stored, and with POP3 Dovecot also wants a directory where it can
>store index files.
>
>If you don't want either, you could do something like:
>
>default_mail_env = mbox:/tmp:INBOX=/var/spool/virtual/%d/%u:INDEX=MEMORY


Thank you. Timo.
I have installed Dovecot 1.0 alpha3 and tested. It is a mbox POP3 only server. The relevent part of dovecot.conf I have changed:

default_mail_env = mbox:/tmp:INBOX:/var/spool/virutal/%d/%u:INDEX=MEMORY

 passdb passwd-file {
    # Path for passwd-file
    args = /etc/virtual/%d/passwd
  }

  userdb static {
    args = uid=503 gid=503 mail=mbox:/var/spool/virtual/%d/%n
  }

I can login with user at domain1.com but there is error in logfile:
Sep 27 13:15:16 ns2 dovecot: pop3(user at domain1.com): mbox: Can't create root IMAP folder /mail: Permission denied
Sep 27 13:15:16 ns2 dovecot: pop3(user at domain1.com): Failed to create storage with data: mbox:/var/spool/virtual/domain1.com/user
Sep 27 13:15:16 ns2 dovecot: pop3-login: Login: user=<user at domain1.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Sep 27 13:15:16 ns2 dovecot: child 19147 (pop3) returned error 89

I then created a /mail directory with file mode 777, then it is OK.

Why I need a IMAP folder in a POP3 only server and can I change that folder to /tmp directory.





More information about the dovecot mailing list