[Dovecot] 2.2.1 and quota-status

Christian Rößner cr at sys4.de
Tue May 14 12:20:53 EEST 2013


Hi,

maybe this question already came up and I missed it in my mails, but if not… :

I have configured Quota for Dovecot since decades and now with the new policy service, I wanted to include this into Postfix. I have followed Ralf's Blog and there a two Problems:

I need to do this:

ls -la /var/run/dovecot/config
srw------- 1 root root 0 May 14 11:06 /var/run/dovecot/config

chown vmail  /var/run/dovecot/config

ls -la /var/run/dovecot/config
srw------- 1 vmail root 0 May 14 11:06 /var/run/dovecot/config

Where can I tell Dovecot to set user vmail here? If I do not do this, I get the following error in the logs:

May 14 10:54:50 mx0 dovecot: quota-status(c at roessner-network-solutions.com): Error: user c at roessner-network-solutions.com: Error reading configuration: net_connect_unix(/var/run/dovecot/config) failed: Permission denied

Also the following test does not succeed:

telnet localhost 12340
Trying ::1...
Connected to localhost.
Escape character is '^]'.
request=smtpd_access_policy
sender=foo at bar.tld
recipient=c at roessner-network-solutions.com
size=10000000000

action=

^]
telnet> quit
Connection closed.

Nothing in the logs. Just an empty answer.

Here is my config:

doveconf -n
# 2.2.1: /etc/dovecot/dovecot.conf
# OS: Linux 3.8.6-hardened x86_64 Gentoo Base System release 2.2 
auth_master_user_separator = *
auth_mechanisms = plain login cram-md5 digest-md5 ntlm
auth_verbose = yes
hostname = mail.roessner-net.de
lda_mailbox_autosubscribe = yes
mail_access_groups = vmail
mail_attachment_dir = /var/mail/virtual/copymail/attachments
mail_gid = vmail
mail_location = mdbox:~/mdbox
mail_plugins = quota acl fts fts_solr zlib
mail_privileged_group = mail
mail_uid = vmail
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 ihave
mdbox_rotate_size = 128 M
namespace {
  list = children
  location = mdbox:%%h/mdbox
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location = 
  mailbox "Deleted Messages" {
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk-E-Mail {
    special_use = \Junk
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  mailbox junkmail {
    auto = subscribe
    special_use = \Junk
  }
  prefix = 
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  acl = vfile
  acl_shared_dict = file:/var/mail/virtual/shared-mailboxes.db
  fts = solr
  fts_solr = break-imap-search url=http://localhost:8080/solr/
  quota = dict:User quota::file:%h/mdbox/dovecot-quota
  quota_rule = *:storage=300M:messages=20000
  quota_status_nouser = DUNNO
  quota_status_overquota = 552 5.2.2 Mailbox is full
  quota_status_success = DUNNO
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  zlib_save = gz
  zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  extra_groups = ssl-cert
  unix_listener auth-worker {
    mode = 0600
    user = vmail
  }
  user = vmail
}
service auth {
  extra_groups = ssl-cert
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = vmail
}
service dict {
  unix_listener dict {
    mode = 0600
    user = vmail
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/lmtp-dovecot {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service quota-status {
  client_limit = 1
  executable = quota-status -p postfix
  inet_listener {
    port = 12340
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = dovecot
}
ssl_ca = </etc/ssl/certs/SSL123_CA_Bundle.pem
ssl_cert = </etc/ssl/certs/mail.roessner-net.de.pem
ssl_key = </etc/ssl/private/mail.roessner-net.de.key.pem
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins = quota acl fts fts_solr zlib sieve
}
protocol lda {
  mail_plugins = quota acl fts fts_solr zlib sieve
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
  mail_max_userip_connections = 50
  mail_plugins = quota acl fts fts_solr zlib imap_quota imap_acl imap_zlib
}

Thanks for helping me… 

Kind regards

-Christian Rößner

--
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein



More information about the dovecot mailing list