[Dovecot] Per-User MySQL Quota (postfixadmin)

Sehic, Haris hsehic at econtec.de
Fri Dec 9 00:51:53 EET 2011


Hi,
 
need some help setting per-user quota and postfixadmin. Setup is working on 1.2
dovecot. Tryin 2.1 dovecot now,  quota is working but overriden quota rule set
by 'user_query =' in /etc/dovecot/dovecot-sql.conf.ext takes no efffekt. What's
wrong here?
 
Greets
 
Haris
-------------- next part --------------
# 2.1.rc1: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.3 nfs
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
auth_verbose_passwords = plain
dict {
  quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
}
disable_plaintext_auth = no
first_valid_uid = 150
last_valid_uid = 150
login_trusted_networks = 127.0.0.1 10.213.1.0/24
mail_debug = yes
mail_gid = 8
mail_home = /var/vmail/%d/%u
mail_location = maildir:/var/vmail/%d/%u
mail_nfs_storage = yes
mail_plugins = " quota imap_quota imap_acl"
mail_uid = 150
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
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:/var/vmail/%%d/%%u:INDEX=/var/vmail/%%d/%%u/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_anyone = allow
  acl_shared_dict = file:/var/vmail/shared-mailboxes.db
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
  quota = dict:user quota::noenforcing:proxy::quotadict
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+100M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  quota_warning3 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = hsehic at econtec.de
protocols = imap sieve pop3 lmtp sieve
quota_full_tempfail = yes
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
  unix_listener auth-userdb {
    group = mail
    mode = 0600
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = mail
    mode = 0600
    user = vmail
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = vmail
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
protocol lmtp {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins = sieve quota acl mail_log notify imap_quota imap_acl
  postmaster_address = postmaster at localhost.de
  sendmail_path = /usr/local/sbin/sendmail
}
protocol lda {
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugin_dir = /usr/lib/dovecot/modules
  mail_plugins = quota sieve acl
  postmaster_address = postmaster at localhost.de
}
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
  imap_idle_notify_interval = 2 mins
  imap_logout_format = bytes=%i/%o
  imap_max_line_length = 64 k
  mail_plugins = quota imap_quota autocreate acl imap_acl mail_log notify fts fts_squat
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dovecot-sql.conf.ext
Type: application/vnd.novadigm.ext
Size: 358 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20111208/f795fc0f/attachment-0002.bin>
-------------- next part --------------
connect = host=localhost dbname=postfixadmindb user=mailusr password=12345678


map {
  pattern = priv/quota/storage
  table = quota2
  username_field = username
  value_field = bytes
}

map {
  pattern = priv/quota/messages
  table = quota2
  username_field = username
  value_field = messages
}


More information about the dovecot mailing list