[Dovecot] shared mailboxes question
I'm using a virtual mailbox setup. Lets say my users have mailboxes in /home/vmail/domain/%u. What I'm trying to do is setup one namespace that points to /home/vmail/domain and contains everyones mailboxes that I can subscribe to. Is this possible?
I tried using a symlink to /home/vmail/domain but it doesn't work
because its looking for the dotFoldername. The only way I could get
this to work is by creating a symlink for each folder in every mailbox.
This is way too much maintenance especially since it will dynamically
change.
The only other way I could get it working was to create a namespace for each user and point to /home/vmail/domain/%u/Maildir/. Then inside everyones Maildir/ create a symlink for INBOX -> . This works but I'd have to do it for each user when I'd rather just use one namespace.
Is there an easier way of doing this?
On Thu, 27 Sep 2007, Cory Coager wrote:
I'm using a virtual mailbox setup. Lets say my users have mailboxes in /home/vmail/domain/%u. What I'm trying to do is setup one namespace that points to /home/vmail/domain and contains everyones mailboxes that I can subscribe to. Is this possible?
Seems kind of an odd workaround, but I just tried setting up: mail_location = maildir:/var/mail/.%u namespace public { separator = / prefix = users/ location = maildir:/var/mail } namespace private { separator = / prefix = inbox = yes }
It makes listing all user mailboxes possible. (Each test user I logged in with made another mailbox appear in LIST "" "users/%" )
For me, there are definite permissions problems, that I might be able to work around with one or more of: login scripts, ACL's, or the dovecot-shared file described in SharedMailboxes: http://wiki.dovecot.org/PostLoginScripting http://wiki.dovecot.org/ACL http://wiki.dovecot.org/SharedMailboxes#line-12
You, with virtual users, might want to use a single UID. (if you aren't already)
Best, Ben
Hmm, this didn't work for me. The namespace is empty, nothing to subscribe to.
Benjamin R. Haskell wrote:
On Thu, 27 Sep 2007, Cory Coager wrote:
I'm using a virtual mailbox setup. Lets say my users have mailboxes in /home/vmail/domain/%u. What I'm trying to do is setup one namespace that points to /home/vmail/domain and contains everyones mailboxes that I can subscribe to. Is this possible?
Seems kind of an odd workaround, but I just tried setting up: mail_location = maildir:/var/mail/.%u namespace public { separator = / prefix = users/ location = maildir:/var/mail } namespace private { separator = / prefix = inbox = yes }
It makes listing all user mailboxes possible. (Each test user I logged in with made another mailbox appear in LIST "" "users/%" )
For me, there are definite permissions problems, that I might be able to work around with one or more of: login scripts, ACL's, or the dovecot-shared file described in SharedMailboxes: http://wiki.dovecot.org/PostLoginScripting http://wiki.dovecot.org/ACL http://wiki.dovecot.org/SharedMailboxes#line-12
You, with virtual users, might want to use a single UID. (if you aren't already)
Best, Ben
On Thu, 27 Sep 2007, Cory Coager wrote:
Hmm, this didn't work for me. The namespace is empty, nothing to subscribe to.
Not sure if this is the problem, but it can't hurt to be more explicit:
It makes listing all user mailboxes possible. (Each test user I logged in with made another mailbox appear in LIST "" "users/%" )
I didn't mention that the namespace was initially empty. But, each time a user logged in, their maildir was created. With virtual users maybe the same auto-creation doesn't take place.
I also didn't explicitly mention that each user's maildir is then at: /var/mail/.username/{cur,new,tmp}
( Rather than: /var/mail/username/{cur,new,tmp} )
So, if you've already set up directories/folders for users, they'd need to be converted to the new names (==moved) before they show up.
Also, in case something else is affecting things: ( This is my “toy” dovecot installation, so it's pretty bare-bones. Just the gentoo settings. )
# dovecot -n # 1.0.3: /etc/dovecot/dovecot.conf listen: [::] ssl_cert_file: /etc/ssl/dovecot/server.pem ssl_key_file: /etc/ssl/dovecot/server.key login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login mail_extra_groups: mail mail_location: maildir:/var/mail/.%u:INDEX=/var/mail/.%u/dovecot mail_debug: yes mail_executable: /root/dovecot-login.sh namespace: type: public separator: / prefix: users/ location: maildir:/var/mail/:CONTROL=/var/mail/.%u/control/users:INDEX=/var/mail/.%u/index/users namespace: type: private separator: / inbox: yes auth default: passdb: driver: pam args: * userdb: driver: passwd plugin: acl: vfile:/etc/dovecot/acls
On Thu, 2007-09-27 at 10:53 -0400, Cory Coager wrote:
I'm using a virtual mailbox setup. Lets say my users have mailboxes in /home/vmail/domain/%u. What I'm trying to do is setup one namespace that points to /home/vmail/domain and contains everyones mailboxes that I can subscribe to. Is this possible?
Benjamin's setup should make it possible, but that works only for the other users' INBOXes, and you do need that kludgy setup where users' maildirs begin with ".".
I was originally planning on making this easily possible for v1.1, but it got delayed. v1.2 maybe will support this setup, but for now only ugly kludges are possible.
With v1.1 you could perhaps implement this more easily if you use :LAYOUT=fs instead of Maildir++ layout..
Timo Sirainen wrote:
On Thu, 2007-09-27 at 10:53 -0400, Cory Coager wrote:
I'm using a virtual mailbox setup. Lets say my users have mailboxes in /home/vmail/domain/%u. What I'm trying to do is setup one namespace that points to /home/vmail/domain and contains everyones mailboxes that I can subscribe to. Is this possible?
Benjamin's setup should make it possible, but that works only for the other users' INBOXes, and you do need that kludgy setup where users' maildirs begin with ".".
I was originally planning on making this easily possible for v1.1, but it got delayed. v1.2 maybe will support this setup, but for now only ugly kludges are possible.
With v1.1 you could perhaps implement this more easily if you use :LAYOUT=fs instead of Maildir++ layout..
I can't get this to work at all, nothing to subscribe to. I'm using version 1.0.3 though, could this be why?
On Mon, 1 Oct 2007, Cory Coager wrote:
Timo Sirainen wrote:
Benjamin's setup should make it possible, but that works only for the other users' INBOXes, and you do need that kludgy setup where users' maildirs begin with ".".
I was originally planning on making this easily possible for v1.1, but it got delayed. v1.2 maybe will support this setup, but for now only ugly kludges are possible.
With v1.1 you could perhaps implement this more easily if you use :LAYOUT=fs instead of Maildir++ layout..
I can't get this to work at all, nothing to subscribe to. I'm using version 1.0.3 though, could this be why?
Unless you're referring to ':LAYOUT=fs', it shouldn't be the issue. 1.0.3 is the version I used to test the kludgy method. Before, I tested directly (telnet localhost 143 and LIST "" "users/%" commands). And just now I confirmed that you can subscribe to users/(username) through Thunderbird. (But it still doesn't do much, since the permissions problems remain.)
Best, Ben
Benjamin R. Haskell wrote:
On Mon, 1 Oct 2007, Cory Coager wrote:
Timo Sirainen wrote:
Benjamin's setup should make it possible, but that works only for the other users' INBOXes, and you do need that kludgy setup where users' maildirs begin with ".".
I was originally planning on making this easily possible for v1.1, but it got delayed. v1.2 maybe will support this setup, but for now only ugly kludges are possible.
With v1.1 you could perhaps implement this more easily if you use :LAYOUT=fs instead of Maildir++ layout..
I can't get this to work at all, nothing to subscribe to. I'm using version 1.0.3 though, could this be why?
Unless you're referring to ':LAYOUT=fs', it shouldn't be the issue. 1.0.3 is the version I used to test the kludgy method. Before, I tested directly (telnet localhost 143 and LIST "" "users/%" commands). And just now I confirmed that you can subscribe to users/(username) through Thunderbird. (But it still doesn't do much, since the permissions problems remain.)
Best, Ben I'm using gentoo also so we must have the same exact version. Something strange though, my configuration file uses a different syntax than yours. Instead of using colons for variables it expects equals. So when I copied and pasted your config I got this error:
Error: Error in configuration file /etc/dovecot/dovecot.conf line 1: Expecting '=' Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Why is this happening?
I'm using gentoo also so we must have the same exact version. Something strange though, my configuration file uses a different syntax than yours. Instead of using colons for variables it expects equals. So when I copied and pasted your config I got this error:
Error: Error in configuration file /etc/dovecot/dovecot.conf line 1: Expecting '=' Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Why is this happening?
The colons are produced from the output of 'dovecot -n'... you can't just copy-n-paste that output to a config file...
I brought this up some time ago, right after Timo added the dovecot -n feature, that it should be formatted the same as the config file itself...
--
Best regards,
Charles
On Mon, 1 Oct 2007, Charles Marcus wrote:
I'm using gentoo also so we must have the same exact version. Something strange though, my configuration file uses a different syntax than yours. Instead of using colons for variables it expects equals. So when I copied and pasted your config I got this error:
Error: Error in configuration file /etc/dovecot/dovecot.conf line 1: Expecting '=' Fatal: Invalid configuration in /etc/dovecot/dovecot.conf
Why is this happening?
The colons are produced from the output of 'dovecot -n'... you can't just copy-n-paste that output to a config file...
I brought this up some time ago, right after Timo added the dovecot -n feature, that it should be formatted the same as the config file itself...
I second that suggestion. The namespace config is particularly different (the "type: public/private" part):
namespace: type: public separator: / prefix: users/ location: maildir:/var/mail:CONTROL=/var/mail/.%u/control/users:INDEX=/var/mail/.%u/index/users namespace: type: private separator: / inbox: yes
translates to:
namespace public { separator = / prefix = users/ location = maildir:/var/mail:CONTROL=/var/mail/.%u/control/users:INDEX=/var/mail/.%u/index/users } namespace private { separator = / inbox = yes }
Along with:
mail_location = maildir:/var/mail/.%u:INDEX=/var/mail/.%u/dovecot
I think those are the relevant changes (from the base Gentoo config) to my dovecot.conf.
Best, Ben
participants (4)
-
Benjamin R. Haskell
-
Charles Marcus
-
Cory Coager
-
Timo Sirainen