Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to provide access to some mailing lists via a set of public, read-only mailboxes in Dovecot. I have a public namespace define in my dovecot (dovecot-2.0.9) configuration that looks like this:

namespace {
  type = public
  separator = .
  prefix = news.
  location = maildir:/var/spool/news
  subscriptions = no  
}

I would like to make all the mailboxes in this namespace read-only. I've got the following configuration for the ACL plugin:

plugin {
  acl = vfile:/etc/dovecot/acls:cache_secs=300
}

After perusing the documentation, it seemed as if I had a mailfolder /var/spool/news/.foo.bar that I could place the following into /var/spool/news/.foo.bar/dovecot-acl:

anyone rl

But that doesn't have any affect. I also tried creating a file /usr/local/etc/dovecot/acls/news.foo.bar with the same contents, but that didn't do anything, either. I've turned on mail debugging:

mail_debug = yes

But the log doesn't produce anything that appears to be relevant to ACL processing. I'm curious to know if anyone has gotten this to work correctly and if so if you could provide some configuration examples.

Also, if there's any way to do this that doesn't involve per-mailbox configuration (.e.g, the ability to apply an ACL to news.* or something), that would be awesome. Getting the documented behavior for default ACLs working would be a step in the right direction.

share|improve this question

1 Answer 1

up vote 1 down vote accepted
+150

I see this is an old post, so I imagine you've got this figured out by now. Otherwise, I hope you find the following helpful.

Make sure you've defined a private namespace, in addition to the public one. Something along the lines of:

namespace {
  type = private
  separator = . # don't mix separators
  prefix =
  #location defaults to mail_location.
  inbox = yes
}

At this point mail_location is a required parameter, give it a value appropriate for your environment, i.e.:

mail_location = maildir:~/Maildir

The following is also required in dovecot.conf (or in one of the additional configs in etc/conf.d) to enable the acl plugin:

mail_plugins = acl
protocol imap {
  mail_plugins = $mail_plugins imap_acl
} 

If you installed dovecot from source with the default prefix of /usr/local -- as would seem to be the case -- then I expect the following is more appropriate for configuring Global ACLs:

plugin {
  acl = vfile:/usr/local/etc/dovecot/acls:cache_secs=300
}

Restart dovecot and you should be good to go.

You may also find the following documentation useful:

  1. http://wiki2.dovecot.org/SharedMailboxes/Public
  2. http://wiki2.dovecot.org/ACL

Good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.