[Dovecot] namespaces, shared mailboxes
Hi!
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders.
Is there any workaround for this problem?
-------------------- 8< -------------------- namespace private { separator = / inbox = yes prefix = location = mbox:~/mail:INBOX=/var/mail/%u }
namespace shared {
separator = /
# hidden = yes
prefix = Shared/spamrep/
location =
maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail
dir/index/Shared/spamrep
}
-------------------- 8< --------------------
I'm using dovecot 1.0.8.
"Server supports folders that contain subfolders and messages" is enabled in Thunderbird's advanced server settings.
Thanks in advance, --leo
e-mail ::: Alexander.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: Computer Center | Vienna University of Economics | Austria
On 02.12.2007 1:59, Alexander 'Leo' Bergolth wrote:
Hi!
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders.
Is there any workaround for this problem?
-------------------- 8< -------------------- namespace private { separator = / inbox = yes prefix = location = mbox:~/mail:INBOX=/var/mail/%u }
namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail
dir/index/Shared/spamrep } -------------------- 8< --------------------I'm using dovecot 1.0.8.
"Server supports folders that contain subfolders and messages" is enabled in Thunderbird's advanced server settings.
Thanks in advance, --leo
Because AFAIK you can't create messages in prefix folder. Make your prefix less longer like prefix = Shared/
On 12/02/2007 09:41 AM, Nikolay Shopik wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. [...] Because AFAIK you can't create messages in prefix folder. Make your
On 02.12.2007 1:59, Alexander 'Leo' Bergolth wrote: prefix less longer like prefix = Shared/
The problem with this solution is that there are shared folders for different groups in Shared and dovecot will return an internal error when trying to list a mailbox for which the user doesn't have read permissions. See this thread for details: http://thread.gmane.org/gmane.mail.imap.dovecot/23528
That's why I had to write a post-login script that dynamically adds only those directories as seperate namespaces to which the current user has read-access.
Btw. I found out that if I create an empty directory "Shared/<mailboxname>/.INBOX/", Mails in "Shared/<mailboxname>" (not those in ".INBOX") are shown as a subfolder named INBOX in the client. (Mails in "Shared/<mailboxname>/.INBOX" are ignored.) Maybe there is a way to persuade the client to show those INBOX-Mails directly in "Shared/<mailboxname>"?
Cheers, --leo
e-mail ::: Alexander.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: Computer Center | Vienna University of Economics | Austria
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. .. namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail
dir/index/Shared/spamrep
I find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
On Sun, 2 Dec 2007, Timo Sirainen wrote:
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. .. namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail
dir/index/Shared/spamrepI find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
Having multiple namespaces setup that way seems reasonable to me.
e.g. /var/spool/mail/Shared/tech/... /var/spool/mail/Shared/financial/...
where 'Shared/tech' would be visible to many, but 'Shared/financial' would be visible only to execs/accountants. And both would show up under a common 'Shared/' prefix to keep them distinct from user folders.
It sounds like he just wants to be able to SELECT the root of a namespace.
Best, Ben
On 12/02/2007 08:59 PM, Benjamin R. Haskell wrote:
On Sun, 2 Dec 2007, Timo Sirainen wrote:
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. .. namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail\
dir/index/Shared/spamrep
I find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
Having multiple namespaces setup that way seems reasonable to me.
e.g. /var/spool/mail/Shared/tech/... /var/spool/mail/Shared/financial/...
where 'Shared/tech' would be visible to many, but 'Shared/financial' would be visible only to execs/accountants. And both would show up under a common 'Shared/' prefix to keep them distinct from user folders.
Yes, that's exactly my intention. There should be shared mailboxes for departments or other groups of people. People having access to those folders should be able to create subfolders but they should not be able to add new folders directly under "Shared".
It sounds like he just wants to be able to SELECT the root of a namespace.
I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
Cheers, --leo
e-mail ::: Alexander.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: Computer Center | Vienna University of Economics | Austria
On 02.12.2007 23:21, Alexander 'Leo' Bergolth wrote:
On 12/02/2007 08:59 PM, Benjamin R. Haskell wrote:
On Sun, 2 Dec 2007, Timo Sirainen wrote:
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders.
..
namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail\
dir/index/Shared/spamrep
I find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
Having multiple namespaces setup that way seems reasonable to me.
e.g. /var/spool/mail/Shared/tech/... /var/spool/mail/Shared/financial/...
where 'Shared/tech' would be visible to many, but 'Shared/financial' would be visible only to execs/accountants. And both would show up under a common 'Shared/' prefix to keep them distinct from user folders.
Yes, that's exactly my intention. There should be shared mailboxes for departments or other groups of people. People having access to those folders should be able to create subfolders but they should not be able to add new folders directly under "Shared".
It sounds like he just wants to be able to SELECT the root of a namespace.
I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
Cheers, --leo
You can't deliver to namespaces using 1.0 dovecot tree only 1.1 support it.
On Sun, 2 Dec 2007, Nikolay Shopik wrote:
On 02.12.2007 23:21, Alexander 'Leo' Bergolth wrote:
[...]
I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
Cheers, --leo
You can't deliver to namespaces using 1.0 dovecot tree only 1.1 support it.
Using dovecot's 'deliver' in 1.0, you can't. It's pretty easy using another MDA/LDA.
e.g. using procmail: DEFAULT=/var/spool/mail/Shared/tech/
Best, Ben
On 12/02/2007 09:35 PM, Benjamin R. Haskell wrote:
On Sun, 2 Dec 2007, Nikolay Shopik wrote:
On 02.12.2007 23:21, Alexander 'Leo' Bergolth wrote:
[...] I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
You can't deliver to namespaces using 1.0 dovecot tree only 1.1 support it.
Using dovecot's 'deliver' in 1.0, you can't. It's pretty easy using another MDA/LDA.
e.g. using procmail: DEFAULT=/var/spool/mail/Shared/tech/
Yes, I'm already doing exactly that: tech-support: "| /usr/bin/procmail DEFAULT=/var/spool/mail/Shared/tech/ UMASK=007"
But the problem is that clients won't see the mails, unless I create an empty directory "/var/spool/mail/Shared/tech/.INBOX". Once that directory is in place, clients will show the delivered mails in "Shared/tech/INBOX". (Even though I delivered them to "../tech/".)
Cheers, --leo
e-mail ::: Alexander.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: Computer Center | Vienna University of Economics | Austria
On Sun, 2 Dec 2007, Alexander 'Leo' Bergolth wrote:
On 12/02/2007 09:35 PM, Benjamin R. Haskell wrote:
On Sun, 2 Dec 2007, Nikolay Shopik wrote:
On 02.12.2007 23:21, Alexander 'Leo' Bergolth wrote:
[...] I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
You can't deliver to namespaces using 1.0 dovecot tree only 1.1 support it.
Using dovecot's 'deliver' in 1.0, you can't. It's pretty easy using another MDA/LDA.
e.g. using procmail: DEFAULT=/var/spool/mail/Shared/tech/
Yes, I'm already doing exactly that: tech-support: "| /usr/bin/procmail DEFAULT=/var/spool/mail/Shared/tech/ UMASK=007"
But the problem is that clients won't see the mails, unless I create an empty directory "/var/spool/mail/Shared/tech/.INBOX". Once that directory is in place, clients will show the delivered mails in "Shared/tech/INBOX". (Even though I delivered them to "../tech/".)
I figured as much; sorry to have been unclear. I was just pointing out that Nikolay's concern about 'deliver' was orthogonal to the non-SELECT-able namespace-root problem.
Best, Ben
On Sun, Dec 02, 2007 at 09:21:19PM +0100, Alexander 'Leo' Bergolth wrote:
On 12/02/2007 08:59 PM, Benjamin R. Haskell wrote:
On Sun, 2 Dec 2007, Timo Sirainen wrote:
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. .. namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail\
dir/index/Shared/spamrep
I find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
Having multiple namespaces setup that way seems reasonable to me.
e.g. /var/spool/mail/Shared/tech/... /var/spool/mail/Shared/financial/...
where 'Shared/tech' would be visible to many, but 'Shared/financial' would be visible only to execs/accountants. And both would show up under a common 'Shared/' prefix to keep them distinct from user folders.
Yes, that's exactly my intention. There should be shared mailboxes for departments or other groups of people. People having access to those folders should be able to create subfolders but they should not be able to add new folders directly under "Shared".
I am doing something very similar. I am using a shell script to deliver mail to various folders under a public namespace tree. I am also using dovecot's ACLs because they seem to make permissions smoother than depending on filesystem permissions, and the granularity on the permissions is much smaller. For example, I don't allow users to create new folders in the shared tree because the permissions will not be appropriate, and that also stops mail clients from making thinks like "Junk Mail" or Trash.
It sounds like he just wants to be able to SELECT the root of a namespace.
I'd like to be able to deliver e.g. new mail to the technical support directly to "Shared/tech/" but if that's not possible, it isn't a big problem, I'll just use "Shared/tech/INCOMING".
I haven't quite tried that. I'm matching a structure from an old mail server which had #shared/department/interest, and each department may or may not have more than one interest with different users having access. They used to have an In folder under that, but on dovecot I decided to deliver right to the interest folder to avoid a visually larger folder tree.
On 12/02/2007 02:45 PM, Timo Sirainen wrote:
On Sat, 2007-12-01 at 23:59 +0100, Alexander 'Leo' Bergolth wrote:
I'd like to provide shared mailboxes with maildir that should appear like 'Shared/<mailboxname>' to the clients.
Using the namespace configuration below, everything works fine, exept one thing: Mail clients (only tested with Thunderbird) won't allow to put mails directly in 'Shared/mailboxname' (the folder it is greyed out). You currently have to create subfolders and put the mails in those subfolders. .. namespace shared { separator = / # hidden = yes prefix = Shared/spamrep/ location = maildir:/var/spool/mail/Shared/spamrep:CONTROL=~/Maildir/control/Shared/spamrep:INDEX=~/Mail
dir/index/Shared/spamrepI find it strange that this kind of configuration even appears to work. :) If you somehow manage to get it working with v1.0, there's a good chance that it won't work anymore with v1.1.
So if you want to access "Shared/spamrep" as a mailbox, the prefix must be Shared/.
OK, I'll do mail delivery to some subfolder like "Shared/spamrep/INCOMING". If I don't put any mails directly in "Shared/spamrep", my setup is OK, isn't it?
If you wanted users to have different views of what the mailboxes look like, you could just change the location to be different for different users. Create symlinks to the visible global mailboxes to those locations.
I'd like to automatically show shared folders to my users based on group permissions to avoid having to manage symlinks for every user. Using a post-login script, this setup works just fine, so I'll try to stick to the current setup.
Thanks, --leo
e-mail ::: Alexander.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: Computer Center | Vienna University of Economics | Austria
participants (5)
-
Adam McDougall
-
Alexander 'Leo' Bergolth
-
Benjamin R. Haskell
-
Nikolay Shopik
-
Timo Sirainen