Victor TARHON-ONU
2011-May-03 12:40 UTC
[Dovecot] mbox/maildir mixed setup with system/virtual mixed users
Hello Everyone, I'm using dovecot 1.0.7 (not sure how relevant it is though) configured to handle both sytem users and virtual users. The system users are handled by default (PAM), while the virtual users are handled pretty much like this: passdb passwd-file { args = /var/spool/vmail/%d/auth/%n } ...And mailbox and folder location settings: userdb static { args = uid=mail gid=mail home=/var/spool/vmail/%d/mail/%n mail=mbox:/var/spool/vmail/%d/imap/%n:INBOX=mbox:/var/spool/vmail/%d/mail/%n } Everything works perfectly with the inbox and mail foder in mbox format. Now, what I'm trying to accomplish is to reconfigure dovecot to create and handle the secondary mail folders (/home/user/mail for system users and /var/spool/vmail/domainname/imap/user/imap for virtual users) in maildir format. I tried to define some name spaces to make this happen, but whatever I to do make one work (either the virtual users or the system users) would make the other non-functional. By example, I have these name space definitions and the virtual users work fine with maildir: namespace private { separator = / prefix = "#mbox/" location = mbox:/var/spool/vmail/%d/imap/%n:INBOX=/var/spool/vmail/%d/mail/%n inbox = yes hidden = yes } namespace private { separator = / prefix location = maildir:/var/spool/vmail/%d/imap/%n hidden = yes } Maybe I didn't fully understand the namespace concept, but I was unable to make them apply only to one location of the imap folders locations or another. Can anyone give me a hand with this, if this setup is even possible? --
Timo Sirainen
2011-May-09 16:34 UTC
[Dovecot] mbox/maildir mixed setup with system/virtual mixed users
On Tue, 2011-05-03 at 15:40 +0300, Victor TARHON-ONU wrote:> ...And mailbox and folder location settings: > > userdb static { > args = uid=mail gid=mail home=/var/spool/vmail/%d/mail/%n mail=mbox:/var/spool/vmail/%d/imap/%n:INBOX=mbox:/var/spool/vmail/%d/mail/%nThere's no "mbox:" after INBOX=. I wonder how it works at all if you've it like that.> Now, what I'm trying to accomplish is to reconfigure dovecot to > create and handle the secondary mail folders (/home/user/mail for system > users and /var/spool/vmail/domainname/imap/user/imap for virtual users) in > maildir format. > > I tried to define some name spaces to make this happen, but > whatever I to do make one work (either the virtual users or the system > users) would make the other non-functional.You need to configure system users in dovecot.conf and for virtual users override the namespace location. I think something like this works: userdb static { args = .. namespace_2_location=maildir:/var/spool/vmail/%d/imap/%n The "2" there means the second listed namespace.