[Dovecot] Listing shared mailboxes with a domainpart
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@domain and office@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@domain | user1 | 1 | +-------------+------------+-------+
But when I login as user1 I can neither see nor subscribe to the info@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
On Fri, 2009-08-07 at 13:29 +0200, Mathias Tausig wrote:
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/
I configured a shared namespace:
namespace shared { separator = / prefix = shared/%%d/%%n/ location = maildir:/var/spool/vmaildir/%%d/%%n/
I don't think you should use a shared namespace for this. You just want everything in domain/ to be shared to users in that domain? Do you have multiple domains? Do user1 and user2 contain @domain?
If you have multiple domains and user1 is really user1@domain, I'd use something like:
namespace public { separator = / prefix = shared/ location = maildir:/var/spool/vmail/%d subscriptions = no }
If that doesn't do what you want, explain more clearly what you need.
plugin { acl_shared_dict = proxy::acl } dict { acl = mysql:/etc/dovecot/dovecot-dict-sql.conf }
These aren't needed with public namespaces.
Hy!
Am Freitag, den 07.08.2009, 14:13 -0400 schrieb Timo Sirainen:
On Fri, 2009-08-07 at 13:29 +0200, Mathias Tausig wrote:
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/
I configured a shared namespace:
namespace shared { separator = / prefix = shared/%%d/%%n/ location = maildir:/var/spool/vmaildir/%%d/%%n/
I don't think you should use a shared namespace for this. You just want everything in domain/ to be shared to users in that domain?
Not neccesarily everything. I want to be able to share info@domain to user1 and office@domain to user2.
Do you have multiple domains?
Yes.
Do user1 and user2 contain @domain?
No. They can receive mails under various domains which are aggregated into one domainless account.
[...]
If that doesn't do what you want, explain more clearly what you need.
I hope I was able to clarify my (desired) setup now. Thanks for trying to help me.
cheers Mathias
On Mon, 2009-08-10 at 10:03 +0200, Mathias Tausig wrote:
namespace shared { separator = / prefix = shared/%%d/%%n/ location = maildir:/var/spool/vmaildir/%%d/%%n/
I don't think you should use a shared namespace for this. You just want everything in domain/ to be shared to users in that domain?
Not neccesarily everything. I want to be able to share info@domain to user1 and office@domain to user2.
Two easiest ways to do this:
a) Just create symlinks to those mailboxes to user1's and user2's Maildir.
b) Put all such shared mailboxes under e.g. /var/spool/shared-mails and then create a public namespace pointing there and set up permissions properly to dovecot-acl files.
participants (2)
-
Mathias Tausig
-
Timo Sirainen