multiple shared/mail format namespaces

Aki Tuomi aki.tuomi at dovecot.fi
Mon Jan 2 18:21:09 UTC 2017


Yeah, that's valid configuration. As long as they have unique prefix.

Aki

> On January 2, 2017 at 5:58 PM Michal Soltys <soltys at ziu.info> wrote:
> 
> 
> Hi,
> 
> Are configurations (with separate formats per namespace) - such as ...
> 
> namespace {
>    type = shared
>    list = children
>    inbox = no
>    separator = /
>    subscriptions = no
>    prefix = shared1/%%n/
>    location = maildir:/var/mail1/%%n/
> }
> 
> namespace {
>    type = shared
>    list = children
>    inbox = no
>    separator = /
>    subscriptions = no
>    prefix = shared2/%%n/
>    location = mdbox:/var/mail2/%%n/
> }
> 
> With separate userdbs serving part of the users with maildirs in /var/mail1/ 
> and the other part with mdboxes in /var/mail2
> 
> ... valid in dovecot ?
> 
> To be more precise:
> 
> 1) Is current version dovecot expected to work with configuration as above ? 
> E.g. if some user's mail location returned from userdb doesn't match 
> location/format from one of the above namespaces - would it be ignored for it 
> ? A very old version of dovecot I could check quickly (2.1.7) was segfaulting 
> (imap processes) all the time with this kind of config. While I'll be 
> upgrading it and the whole system to modern versions, I'm wondering if this 
> kind of thing is formally allowed at all.
> 
> An interesting variation of the above setup I tested - with the second 
> namespace "un-variabled" and pointing to single user (with matching 
> passwd-file returning that user) managed to work somehow - but the user itself 
> was still created on the fly for the 1st namespace - having just a directory 
> with empty dovecot-acl-list file. This essentially seemed to have worked like 
> a typical public profile (shared acl db didn't seem to be used either)
> 
> 2) For shared namespace with variables, would overriding shared namespace 
> location in userdb query work ? For example if we had single namespace such as 
> the first one (maildir) above with explicit share1 name, and then in userdb 
> for some users:
> 
> userdb_namespace/share1/location=mdbox:/var/mail2/some_user_name
> 
> Would that override a shared namespace pattern on per user basis correctly ?
> 
> 3) Is there perhaps a way to constraint which userdbs are considered per which 
> shared namespace ?
> 
> 4) Not strictly related to the above, but in LDAP part of documentation - 
> namely http://wiki2.dovecot.org/AuthDatabase/LDAP/Userdb - why
> 
> user_attrs = \
>    =home=%{ldap:homeDirectory}, \
>    =uid=%{ldap:uidNumber}, \
>    =gid=%{ldap:gidNumber}
> 
> instead of
> 
> user_attrs = \
>    homeDirectory=home, \
>    uidNumber=uid, \
>    gidNumber=gid
> 
> Do both are equivalent with differet syntax (opening the way for templates for 
> %{} based syntax), or are there some subtle differences between those ? (aside 
> later example with 'attr=' instead of just '=').
> 
> Would this kind of syntax also be correct for pass_attrs, such as:
> 
> pass_attrs = \
> 	=password=%{ldap:uid}, \
> 	=userdb_home=%{ldap:homeDirectory}


More information about the dovecot mailing list