dovecot ldap quota
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@klez.it): Debug: Effective uid=1001, gid=1001, home= Oct 27 20:42:36 mail dovecot: imap(ops@klez.it): Debug: Quota root: name=User quota backend=maildir args= Oct 27 20:42:36 mail dovecot: imap(ops@klez.it): Debug: Quota rule: root=User quota mailbox=* bytes=20971520 messages=0 Oct 27 20:42:36 mail dovecot: imap(ops@klez.it): Error: user ops@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@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@klez.it): Debug: Quota rule: root=User quota mailbox=* bytes=20971520 messages=0
Oct 27 20:42:36 mail dovecot: imap(ops@klez.it): Error: user ops@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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 27 Oct 2014, Mirko ML wrote:
What value is in the LDAP attribute, with our without the pending 'S'?
http://wiki2.dovecot.org/Quota/Configuration says: "All of these support also b/k/M/G/T/% suffixes." (No "S" here.) and:
"Backend-specific configuration currently is used only with Maildir++ quota backend. It means you can have the quota in Maildir++ format (e.g. "10000000S")." Which I interprete as: If the quote is read from Maildir storage.
You read the quota from LDAP, hence, the 2nd statement does not apply.
If you have a "S" suffix in LDAP, remove it.
You could patch Dovecot to accept the "S" suffix like "B", see src/plugins/quota/quota-util.c in function quota_limit_parse().
Maybe, ask the Dovecot development team for an enhancement.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBVE9IlXz1H7kL/d9rAQJKSgf6Aiinsm3Q2o3AodUG7OPFt9lUyrCirGdC LRmO9R83V4+N8bkJRLVZYUO0pRStVk0RUKzrko8ixXKp62qYkZmU8pP+rzGcFt6T NbfDNRoBNo3iHQ7nhYY0772XOvIgN2ne1KFhCFp6UxOgQFSjUlAqAV1pZ4LVgVHF 2815TK5Uugeiz4BWVYsb4F4lU6k7K2yEemTSTwe/gaYNxyUZdqmDOujbSnfYX4cd Uv4ujk9yeFDZ7jqCJvWNI9yPau1zdJ0vp/f7u6U1pOqeDUYcj2d7Q8W+SPaHvmNz +kw65HmP8YrwbbCdLOZOeqmSz5PoGQ4CdWXUrpLPhhmH7xkBrxGAjA== =OJvT -----END PGP SIGNATURE-----
Il 28/10/2014 08:41, Steffen Kaiser ha scritto: [...] Thanks a lot for the answer.
Probably you are right, but why root quota are correct? (without S at the end) If I change the value in LDAP the root quota follow this change
You read the quota from LDAP, hence, the 2nd statement does not apply.
If you have a "S" suffix in LDAP, remove it.
see above :)
You could patch Dovecot to accept the "S" suffix like "B", see src/plugins/quota/quota-util.c in function quota_limit_parse().
This could be a good idea.
Maybe, ask the Dovecot development team for an enhancement.
This is a better idea, that can help migration from courier
-- Ciao Mirko
participants (3)
-
Mirko ML
-
Steffen Kaiser
-
Toni Mattila