Hi in Dovecot 2.x with virtual domains, is there a way specify what domains can create shared directories and who can't? For example I have 3 domains, domain1.com, domain2.com and domain3.com. Let's say I only want domain1.com's users to create shared folders how can I go about doing this.
Thanks, Paul
I think I figured it out but im still having an issue.
If location = maildir:/var/vmail/domain1.com/%%u and that's the only domain that can share folders, domain2/3.com will not be able to share anything. If location = maildir:/var/vmail/%%d/%%u then all domains will be able to see and share folders.
However if for add another share for domain2.com
namespace { type = shared separator = / prefix = domain1.com/%%u/ location = maildir:/var/vmail/domain1.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
namespace { type = shared separator = / prefix = domain2.com/%%u/ location = maildir:/var/vmail/domain2.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
when a user from domain 2 looks at the available folder subscriptions it doesn't see the shared folders just domain2.com/%u
-----Original Message----- From: dovecot-bounces+razor=meganet.net@dovecot.org [mailto:dovecot-bounces+razor=meganet.net@dovecot.org] On Behalf Of PA Sent: Thursday, January 27, 2011 1:10 PM To: 'Dovecot Mailing List' Subject: [Dovecot] dovecot ACL
Hi in Dovecot 2.x with virtual domains, is there a way specify what domains can create shared directories and who can't? For example I have 3 domains, domain1.com, domain2.com and domain3.com. Let's say I only want domain1.com's users to create shared folders how can I go about doing this.
Thanks, Paul
On Thu, 2011-01-27 at 13:10 -0500, PA wrote:
Hi in Dovecot 2.x with virtual domains, is there a way specify what domains can create shared directories and who can't? For example I have 3 domains, domain1.com, domain2.com and domain3.com. Let's say I only want domain1.com's users to create shared folders how can I go about doing this.
One dirty way would be to enable imap_acl plugin only for users in domain1.com, i.e. override mail_plugins setting to include imap_acl only for domain1.com users in userdb extra fields. http://wiki.dovecot.org/UserDatabase/ExtraFields
Timo thanks for the reply. To do what your suggested I would need a specific user_query for that domain correct? Ex: WHERE userid = '%u@domain1.com'. Also how would I override the mail_plugins setting, can you give me an example, the example on the URL below doesn't make that clear to me.
Also I was trying to have 2 shared namespaces which would have been ideal, why allowing any user to share a folder it wouldn't work unless the from path is listed on the location field but it looks like I can't have more than one shared namespace is this correct?
Thanks for your help, paul
namespace { type = shared separator = / prefix = domain1.com/%%u/ location = maildir:/var/vmail/domain1.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
namespace { type = shared separator = / prefix = domain2.com/%%u/ location = maildir:/var/vmail/domain2.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
-----Original Message----- From: dovecot-bounces+razor=meganet.net@dovecot.org [mailto:dovecot-bounces+razor=meganet.net@dovecot.org] On Behalf Of Timo Sirainen Sent: Thursday, January 27, 2011 8:20 PM To: PA Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] dovecot ACL
Hi in Dovecot 2.x with virtual domains, is there a way specify what domains can create shared directories and who can't? For example I have 3 domains, domain1.com, domain2.com and domain3.com. Let's say I only want domain1.com's users to create shared folders how can I go about doing
On Thu, 2011-01-27 at 13:10 -0500, PA wrote: this.
One dirty way would be to enable imap_acl plugin only for users in domain1.com, i.e. override mail_plugins setting to include imap_acl only for domain1.com users in userdb extra fields. http://wiki.dovecot.org/UserDatabase/ExtraFields
On Fri, 2011-01-28 at 09:59 -0500, PA wrote:
Timo thanks for the reply. To do what your suggested I would need a specific user_query for that domain correct? Ex: WHERE userid = '%u@domain1.com'. Also how would I override the mail_plugins setting, can you give me an example, the example on the URL below doesn't make that clear to me.
Something like:
user_query = SELECT if('%d'='domain1.com', 'quota imap_quota acl imap_acl', null) as mail_plugins, ..etc..
Also I was trying to have 2 shared namespaces which would have been ideal, why allowing any user to share a folder it wouldn't work unless the from path is listed on the location field but it looks like I can't have more than one shared namespace is this correct?
"from path"? I haven't tried more than one shared namespace, but I don't really see why it couldn't work.
Timo, thanks for the example I will use that for what I'm trying to accomplish.
As for multiple shared namespaces if I have two shared namespaces in dovecot 2.x the second shared namespace never works. For example if the 1st shared namespace is
namespace { type = shared separator = / prefix = domain1.com/%%u/ location = maildir:/var/vmail/domain1.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
this will work perfectly, users in domain1.com will create a shared folder and those users in domain1.com will see the share in the subscription options (thunderbird/squirrelmail etc) under domain1.com/email_address/share_name.
However when I create another shared namespace like the one below users in domain2.com never get to see the shared folder they just see domain2.com/%u
namespace { type = shared separator = / prefix = domain2.com/%%u/ location = maildir:/var/vmail/domain2.com/%%u:CONTROL=/var/vmail/%d/controlprivate/%%u: INDEX=/var/vmail/%d/sharedindexprivate/%%u subscriptions = no ##list = children list = yes
It's not a big deal now that I know I can use your method above but I was wondering if you have any thoughts
Thanks again, Paul
-----Original Message----- From: dovecot-bounces+razor=meganet.net@dovecot.org [mailto:dovecot-bounces+razor=meganet.net@dovecot.org] On Behalf Of Timo Sirainen Sent: Friday, January 28, 2011 1:02 PM To: PA Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] dovecot ACL
On Fri, 2011-01-28 at 09:59 -0500, PA wrote:
Timo thanks for the reply. To do what your suggested I would need a specific user_query for that domain correct? Ex: WHERE userid = '%u@domain1.com'. Also how would I override the mail_plugins setting, can you give me an example, the example on the URL below doesn't make that clear to me.
Something like:
user_query = SELECT if('%d'='domain1.com', 'quota imap_quota acl imap_acl', null) as mail_plugins, ..etc..
Also I was trying to have 2 shared namespaces which would have been ideal, why allowing any user to share a folder it wouldn't work unless the from path is listed on the location field but it looks like I can't have more than one shared namespace is this correct?
"from path"? I haven't tried more than one shared namespace, but I don't really see why it couldn't work.
participants (2)
-
PA
-
Timo Sirainen