[Dovecot] Virtual and system users with public mailboxes

Timo Sirainen
Thu, 17 Mar 2011 16:35:08 -0000

On Wed, 2011-03-16 at 11:54 -0700, Kendall Shaw wrote:
> Hi,
>
> I am running dovecot 1.2.9 and postfix, and I am trying to setup a
> public mailbox. My thought is that there would be one system user with
> a sieve script to deliver messages to the public mailbox. And, I would
> like to give virtual users access to the mailbox.

Why can't the public mail delivery user be virtual as well?

> On this list, I read how you can have both system and virtual users by
> using passdb and static userdbs. But, I don't understand how this can
> be combined with namespaces, where I specify the location.
>
> For all virtual users I had:
>
> mail_location = maildir:/var/somewhere/%u/maildir/
>
> I think I need that for virtual users and:
>
> maildir:~/Maildir
>
> for the system users.

Not really.. I think you should just keep everything virtual and create
a new virtual user for the deliver user, e.g. "publicmail". That would
be just like any other user, except would also have a sieve script
in /var/somewhere/publicmail/.dovecot.sieve.

> namespace private {
>   location = ? # how do I have the location be different for system
> and virtual users?

Keep your old mail_location, no need to set this.

> }
> namespace public {
>   location = ? # ditto (for the index)?

location = maildir:/var/public/Maildir:INDEX=/var/somewhere/%u/public-index

or something.

Then as necessary use mailbox ACLs.