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 and the passwd format is: user: md5 encrpted password and the email is store in /var/spool/virtual/domain1.com/user /var/spool/virtual/domain2.com/user and we login as user at domain1.com, user at domain2.com . We want to maintain this format as login id and the password format. What should be changed in dovecot.conf? Thanks.
Bonjour Barry Kwok,> 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[....]> and we login as user at domain1.com, user at domain2.com . > We want to maintain this format as login id and the password format. > What should be changed in dovecot.conf? Thanks.See mailling list last week exchange Subject: "v1.0.alpha2, virtual domain authentication." A bientot -- =========================================================================Jean-Marc Pigeon Internet: Jean-Marc.Pigeon at safe.ca SAFE Inc. Phone: (514) 493-4280 Fax: (514) 493-1946 Clement's Home base <"http://www.clement.safe.ca"> ==========================================================================
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/passwdpassdb passwd-file { args = /etc/virtual/%d/passwd } This requires Dovecot 1.0.alpha2 or later.> and the passwd format is: > user: md5 encrpted passwordIn 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/userAs 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
>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=MEMORYThank 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.
>On Tue, 2005-09-27 at 13:29 +0800, Barry Kwok wrote: >> userdb static { >> args = uid=503 gid=503 mail=mbox:/var/spool/virtual/%d/%n >> } > >Drop the "mail" part from here. You already have it in default_mail_env, >and it's correct there. Here you're saying that the .../%d/%n is the >mail directory, not file. If it refuses to start up without the mail>part, replace it with home=/tmp instead. > >> Why I need a IMAP folder in a POP3 only server > >Dovecot is mostly an IMAP server, POP3 was just an afterthought. > >> and can I change that folder to /tmp directory. > >Yes, as long as nothing actually gets written there (and with >INDEX=MEMORY and POP3 nothing should get written there). > >Thank you Timo, I have just tried. But I found that I must add the mail=mbox:/var/spool/virtual/%d/%n part. Without this part, the dovecot seems not checking the right location of mail spool and simply say that "no new email". Now I added this part together with "home=/tmp" part into userdb config and It works now with IMAP folder in /tmp directory. But I want to ask if there is any file locking problem as I am running virtual email with vmail as owner for all mbox accounts. And it seems that they are all share the same IMAP folder located in /tmp directory.