dovecot ldap quota

Mirko ML ops at klez.it
Mon Oct 27 19:48:38 UTC 2014


First of all:

doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.7 ext4
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_debug = yes
mail_gid = vmail
mail_location = maildir:/home/vmail/domains/%d/%n
mail_plugins = " quota"
mail_temp_dir = /var/tmp
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 spamtest spamtestplus
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = INBOX.
  separator = .
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename
  quota = maildir:User quota
  sieve = ~/.dovecot.sieve
  sieve_default = /var/lib/dovecot/sieve/default.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +spamtest +spamtestplus +relational
+comparator-i;ascii-numeric
  sieve_global_dir = /var/lib/dovecot/sieve/global/
}
protocols = " imap sieve pop3"
service auth {
  unix_listener auth-userdb {
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    address = *
    port = 143
  }
  inet_listener imaps {
    address = *
    port = 993
    ssl = yes
  }
}
service managesieve-login {
  inet_listener sieve {
    address = 127.0.0.1
    port = 4190
  }
}
service pop3-login {
  inet_listener pop3 {
    address = *
    port = 110
  }
  inet_listener pop3s {
    address = *
    port = 995
    ssl = yes
  }
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
}
protocol pop3 {
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh


grep -v '^ *\(#.*\)\?$' dovecot-ldap.conf.ext
uris = ldap://localhost
dn = cn=phamm,o=hosting,dc=example,dc=com
dnpass = ops
auth_bind = yes
ldap_version = 3
base = o=hosting,dc=example,dc=com
deref = never
user_attrs = quota=quota_rule=*:bytes=%$
user_filter =
(&(objectClass=VirtualMailAccount)(accountActive=TRUE)(mail=%u))
pass_attrs = mail=user,userPassword=password
pass_filter =
(&(objectClass=VirtualMailAccount)(accountActive=TRUE)(mail=%u))

And at the end the problem that i see on log:


Oct 27 20:42:36 mail dovecot: imap: Debug: Loading modules from
directory: /usr/lib/dovecot/modules
Oct 27 20:42:36 mail dovecot: imap: Debug: Module loaded:
/usr/lib/dovecot/modules/lib10_quota_plugin.so
Oct 27 20:42:36 mail dovecot: imap: Debug: Added userdb setting:
plugin/quota_rule=*:bytes=20971520S
Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Debug: Effective
uid=1001, gid=1001, home=
Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Debug: Quota root:
name=User quota backend=maildir args=
Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Debug: Quota rule:
root=User quota mailbox=* bytes=20971520 messages=0
Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Error: user
ops at klez.it: Initialization failed: Failed to initialize quota: Invalid
quota root quota: Invalid rule *:bytes=20971520S: Invalid rule limit
value 'bytes=20971520S': Unknown unit: S
Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Error: Invalid user
settings. Refer to server log for more information.

I cant understand this 2 line:

Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Debug: Quota rule:
root=User quota mailbox=* bytes=20971520 messages=0

Oct 27 20:42:36 mail dovecot: imap(ops at klez.it): Error: user
ops at klez.it: Initialization failed: Failed to initialize quota: Invalid
quota root quota: Invalid rule *:bytes=20971520S: Invalid rule limit
value 'bytes=20971520S': Unknown unit: S

This is a situation that I want to migrate from courier to dovecot..
I see this post http://y6.gl/nnheTd that seems to have my problem.
Could you help me to prepare a working conf?
So I can write a simple doc for this?
TIA

-- 
Ciao
Mirko


More information about the dovecot mailing list