[Dovecot] Listing shared mailboxes with a domainpart

Mathias Tausig mathias.tausig at a-cert.at
Fri Aug 7 14:29:48 EEST 2009


Hy!

I am currently configuring a new mailserver using postfix and dovecot
1.2.1. The filesystem strucutre in my spool directory is
user1/
user2/
domain/info/
domain/office/

user1 and unser2 are ordinary users mailboxes, the latter two contain
the virtual mailboxes for info at domain and office at domain as created by
postfix. I want these virtual mailboxes (all of them are in maildir
format) to be shared to certain real users.

I configured a shared namespace:

namespace shared {
        separator = /
        prefix = shared/%%d/%%n/
        location = maildir:/var/spool/vmaildir/%%d/%%n/
#I tried ths as well
#        prefix = shared/%%u/
#        location = maildir:/var/spool/vmaildir/%%u/
        hidden = no
        subscriptions = no
        list = yes
        inbox = no
}
Then I configured a dictionary to list the folders, as described in the
wiki:

plugin {
acl_shared_dict = proxy::acl
}
dict {
  acl = mysql:/etc/dovecot/dovecot-dict-sql.conf
}
where /etc/dovecot/dovecot-dict-sql.conf holds

map {
  pattern = shared/shared-boxes/user/$to/$from
  table = virtual_user_shares
  value_field = dummy

  fields {
    from_user = $from
    to_user = $to
  }
}
The database table consists of
+-------------+------------+-------+
| from_user   | to_user    | dummy |
+-------------+------------+-------+
| info at domain | user1      | 1     | 
+-------------+------------+-------+

But when I login as user1 I can neither see nor subscribe to the
info at domain mailbox.
In the "flat" case (sharing the user2 mailbox to user1), this setup
works.

I am pretty clueless how to go on.

cheers
Mathias



More information about the dovecot mailing list