[Dovecot] Shared Mailboxes with VirtualUsers and mail_location retrieved from ldap

mailing lists listas.correo at yahoo.es
Thu Sep 8 14:14:20 EEST 2011


Hello,


On 09/07/2011 07:22 PM, Timo Sirainen wrote:
> On 6.9.2011, at 14.27, mailing lists wrote:
>> At this point I need shared mailboxes but since user mail/home locations are ldap attributes, how is it supposed I must configure this for shared mailboxes?
>>
>> for the users' mail/home directories I set this line:
>>
>> user_attrs = mailbox=mail=maildir:/var/maildir/%$,homeFilter=home
> 
> Are home dirs and mail dirs related in any way? The only way you can get it working is by using home dirs, e.g.:

>

> user_attrs = mailbox=home=/var/maildir/%$

yes, my virtual users have separate directories for home and mail. Their locations are stored in ldap attributes (with random generated paths), so a flat scheme like /var/maildr/%%u isn't valid.


for typical (virtual) users the location returned looks like:

Sep  8 12:48:33 imap1 dovecot: auth: Debug: ldap(user012,::1): result: mailbox(mail=maildir:/var/maildir/%$)=vol06/1/15/user012 homeFilter(home)=/var/mailfilter/vol06/1/15/user012

...
Sep  8 12:54:50 imap1 dovecot: imap(user012): Debug: maildir++: root=/var/maildir/vol06/1/15/user012, index=, control=, inbox=/var/maildir/vol06/1/15/user012, alt=


 

> Then in dovecot.conf:
> 
> mail_location = maildir:~/
>

>> namespace {
>>    type = shared
>>    separator = /
>>    prefix = shared/%%u/
>>    subscriptions = no
>>    list = children

>

> location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u

this is that I see in  logs and not shared folders are seen by imap clients:


Sep  8 12:57:11 imap1 dovecot: imap(user012): Debug: Namespace : type=shared, prefix=shared.%u., sep=., inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/Maildir/shared/%u
Sep  8 12:57:11 imap1 dovecot: imap(user012): Debug: shared: root=/var/run/dovecot/, index=, control=, inbox=, alt=
Sep  8 12:57:11 imap1 dovecot: imap(user012): Debug: acl: initializing backend with data: vfile


I fail to understand how %%u is retrieved from ldap...



  /----------/


# dovecot -n
# 2.0.14: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.34.7-0.7-xen x86_64 openSUSE 11.3 (x86_64) 
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
mail_debug = yes
mail_fsync = always
mail_gid = 5000
mail_location = maildir:~/
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = acl
mail_uid = 5000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
mmap_disable = yes
namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  separator = .
}
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared.%%u.
  separator = .
  subscriptions = no
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  acl = vfile
  acl_shared_dict = file:/var/maildir/shared-mailboxes
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap
ssl = no
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 100
  mail_plugins = acl imap_acl autocreate
}



More information about the dovecot mailing list