<div dir="ltr"><div>Hi Aki,</div><div><br></div><div>It works now with the commas!</div><div><br></div><div>Thanks<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le jeu. 22 nov. 2018 à 19:32, Aki Tuomi <<a href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I noticed that you sent replies to me directly...<br>
<br>
Anyways, seems the problem was that the LDAP user_attrs is missing commas, and the mailRoutingAddress is used wrong, so the correct syntax would be:<br>
<br>
user_attrs = \<br>
mailRoutingAddress=user, \<br>
=uid=vmail, \<br>
=gid=mail, \<br>
=home=/var/mail/%d/%n, \<br>
=quota_rule=*:bytes=%{ldap:departmentNumber}<br>
<br>
Aki<br>
<br>
> On 22 November 2018 at 15:29 Vincent Seynhaeve <<a href="mailto:vlamsdoem@gmail.com" target="_blank">vlamsdoem@gmail.com</a>> wrote:<br>
> <br>
> <br>
> doveadm quota recalc -u test doesn't give anything.<br>
> Bellow the ouput of the `doveconf -n` and `doveadm user test`<br>
> <br>
> doveconf -n<br>
> # 2.2.10: /etc/dovecot/dovecot.conf<br>
> # OS: Linux 3.10.0-862.11.6.el7.x86_64 x86_64 CentOS Linux release 7.5.1804<br>
> (Core) xfs<br>
> auth_debug = yes<br>
> auth_mechanisms = plain login<br>
> auth_verbose = yes<br>
> mail_debug = yes<br>
> mail_gid = mail<br>
> mail_home = /var/mail/%d/%n<br>
> mail_location = maildir:/var/mail/%d/%n/Maildir<br>
> mail_plugins = " quota"<br>
> mail_uid = vmail<br>
> managesieve_notify_capability = mailto<br>
> managesieve_sieve_capability = fileinto reject envelope encoded-character<br>
> vacation subaddress comparator-i;ascii-numeric relational regex imap4flags<br>
> copy include variables body enotify environment mailbox date ihave<br>
> mbox_write_locks = fcntl<br>
> namespace inbox {<br>
> inbox = yes<br>
> location =<br>
> mailbox Drafts {<br>
> special_use = \Drafts<br>
> }<br>
> mailbox Junk {<br>
> special_use = \Junk<br>
> }<br>
> mailbox Sent {<br>
> special_use = \Sent<br>
> }<br>
> mailbox "Sent Messages" {<br>
> special_use = \Sent<br>
> }<br>
> mailbox Trash {<br>
> special_use = \Trash<br>
> }<br>
> prefix =<br>
> }<br>
> passdb {<br>
> args = /etc/dovecot/dovecot-ldap.conf.ext<br>
> driver = ldap<br>
> }<br>
> plugin {<br>
> quota = maildir:User quota<br>
> quota_grace = 10%%<br>
> quota_rule2 = Trash:storage=+100M<br>
> quota_status_nouser = DUNNO<br>
> quota_status_overquota = 552 5.2.2 Mailbox is full<br>
> quota_status_success = DUNNO<br>
> sieve = ~/.dovecot.sieve<br>
> sieve_dir = ~/sieve<br>
> }<br>
> protocols = imap pop3 lmtp sieve<br>
> service auth {<br>
> unix_listener /var/spool/postfix/private/auth {<br>
> group = postfix<br>
> mode = 0666<br>
> user = postfix<br>
> }<br>
> unix_listener auth-userdb {<br>
> group = mail<br>
> mode = 0600<br>
> user = vmail<br>
> }<br>
> }<br>
> service imap-login {<br>
> inet_listener imap {<br>
> port = 0<br>
> }<br>
> }<br>
> service managesieve-login {<br>
> inet_listener sieve {<br>
> port = 4190<br>
> }<br>
> }<br>
> service pop3-login {<br>
> inet_listener pop3 {<br>
> port = 0<br>
> }<br>
> inet_listener pop3s {<br>
> port = 0<br>
> }<br>
> }<br>
> ssl = required<br>
> ssl_cert = </etc/pki/tls/certs/imap.example.com.crt<br>
> ssl_key = </etc/pki/tls/private/imap.example.com.key<br>
> userdb {<br>
> args = /etc/dovecot/dovecot-ldap.conf.ext<br>
> driver = ldap<br>
> }<br>
> protocol lda {<br>
> mail_plugins = " quota sieve"<br>
> }<br>
> protocol imap {<br>
> mail_plugins = " quota imap_quota"<br>
> }<br>
> <br>
> <br>
> <br>
> <br>
> doveadm user test<br>
> field value<br>
> uid vmail<br>
> gid mail<br>
> home /var/mail//test<br>
> mail maildir:/var/mail//test/Maildir<br>
> mailRoutingAddress user =uid=vmail =gid=mail =home=/var/mail//test<br>
> =quota_rule=*:bytes=1M<br>
> <br>
> <br>
> Le jeu. 22 nov. 2018 à 14:18, Aki Tuomi <<a href="mailto:aki.tuomi@open-xchange.com" target="_blank">aki.tuomi@open-xchange.com</a>> a<br>
> écrit :<br>
> <br>
> > Can you provide output of `doveconf -n` and `doveadm user test`?<br>
> ><br>
> > Aki<br>
> ><br>
> > > On 22 November 2018 at 10:44 Maciej Milaszewski IQ PL <<br>
> > <a href="mailto:maciej.milaszewski@iq.pl" target="_blank">maciej.milaszewski@iq.pl</a>> wrote:<br>
> > ><br>
> > ><br>
> > > Hi<br>
> > > Do you try recalc and get ?<br>
> > ><br>
> > > On 22.11.2018 08:56, Vincent Seynhaeve wrote:<br>
> > > ><br>
> > > > Hello,<br>
> > > ><br>
> > > > I'm trying to set up LDAP stored quota on Dovecot but it doesn't work<br>
> > > > and doesn't get reported by the command doveadm quota get.<br>
> > > ><br>
> > > > I'm using the field departmentNumber in my LDAP server to store the<br>
> > quota.<br>
> > > ><br>
> > > ><br>
> > > > doveadm quota get -u test<br>
> > > ><br>
> > > > Quota name Type Value<br>
> > > ><br>
> > Limit<br>
> > > > %<br>
> > > > User quota STORAGE 0<br>
> > > ><br>
> > -<br>
> > > > 0<br>
> > > > User quota MESSAGE 0<br>
> > > ><br>
> > -<br>
> > > > 0<br>
> > > ><br>
> > > ><br>
> > > > log file associated with doveadm quota get command:<br>
> > > ><br>
> > > > Nov 21 11:38:47 imap dovecot: auth: Debug: master in:<br>
> > > > USER#0111#011test#011service=doveadm<br>
> > > > Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): user search:<br>
> > > > base=ou=People,dc=example,dc=com scope=subtree<br>
> > > > filter=(&(objectClass=posixAccount)(uid=test)) fields=departmentNumber<br>
> > > > Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): result:<br>
> > > > departmentNumber=1M; departmentNumber unused<br>
> > > > Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): result:<br>
> > > > departmentNumber=1M<br>
> > > > Nov 21 11:38:47 imap dovecot: auth: Debug: userdb out:<br>
> > > > USER#0111#011test#011mailRoutingAddress=user =uid=vmail =gid=mail<br>
> > > > =home=/var/mail//test =quota_rule=*:bytes=1M<br>
> > > ><br>
> > > ><br>
> > > > Bellow my configuration files:<br>
> > > ><br>
> > > > conf.d/10-mail.conf<br>
> > > ><br>
> > > > mail_plugins = $mail_plugins quota<br>
> > > ><br>
> > > ><br>
> > > > conf.d/20-imap.conf<br>
> > > ><br>
> > > ><br>
> > > > protocol imap {<br>
> > > > mail_plugins = $mail_plugins imap_quota<br>
> > > > }<br>
> > > ><br>
> > > ><br>
> > > > conf.d/90-quota.conf<br>
> > > ><br>
> > > > plugin {<br>
> > > ><br>
> > > > quota = maildir:User quota<br>
> > > > quota_rule2 = Trash:storage=+100M<br>
> > > > quota_grace = 10%%<br>
> > > > quota_status_success = DUNNO<br>
> > > > quota_status_nouser = DUNNO<br>
> > > > quota_status_overquota = "552 5.2.2 Mailbox is full"<br>
> > > ><br>
> > > > }<br>
> > > ><br>
> > > ><br>
> > > > dovecot-ldap.conf.ext<br>
> > > ><br>
> > > > user_attrs= \<br>
> > > > =mailRoutingAddress=user \<br>
> > > > =uid=vmail \<br>
> > > > =gid=mail \<br>
> > > > =home=/var/mail/%d/%n \<br>
> > > > =quota_rule=*:bytes=%{ldap:departmentNumber}<br>
> > > ><br>
> > > ><br>
> > > > Can somebody help me with this or give me some advice for debugging?<br>
> > > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Maciej Miłaszewski<br>
> > > IQ PL Sp. z o.o.<br>
> > > Administrator Systemowy<br>
> > ><br>
> > > Biuro Obsługi Klienta:<br>
> > > e-mail: <a href="mailto:bok@iq.pl" target="_blank">bok@iq.pl</a><br>
> > > tel.: +48 58 326 09 90 - 94<br>
> > > fax: +48 58 326 09 99<br>
> > ><br>
> > > Dział pomocy: <a href="https://www.iq.pl/pomoc" rel="noreferrer" target="_blank">https://www.iq.pl/pomoc</a><br>
> > > Informacja dotycząca przetwarzania danych osobowych:<br>
> > <a href="https://www.iq.pl/kontakt" rel="noreferrer" target="_blank">https://www.iq.pl/kontakt</a><br>
> > > Jakość gwarantuje: ISO 9001:2000<br>
> > ><br>
> > > IQ PL Sp. z o.o. z siedzibą w Gdańsku (80-298), ul. Geodetów 16, KRS<br>
> > 0000007725, Sąd rejestrowy: Sąd Rejonowy w Gdańsku VII Wydział KRS,<br>
> > > kapitał zakładowy: 140.000 PLN, NIP 5832736211, REGON 192478853<br>
> > ><br>
> ><br>
</blockquote></div>