razor razor
2009-Jun-18 06:53 UTC
[Dovecot] ldap , quotes, upgrade from dovecot-1.0.14 (q2.0)
hello list help me please - i am trying to fix quotas about 2 days :( i was using 1.0.14+ldap as userdb/passwd+lda+exim, and after upgrading to last release my quotas goes away so> pkg_info | grep dovedovecot-1.1.16 Secure and compact IMAP and POP3 servers dovecot-sieve-1.1.6 A Sieve plugin for the Dovecot 'deliver' LDA dovecot.conf ... protocol imap { listen = *:143 ssl_listen = *:993 mail_plugin_dir = /usr/local/lib/dovecot/imap mail_plugins = quota imap_quota login_executable = /usr/local/libexec/dovecot/imap-login login_greeting_capability = yes imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep } ... protocol lda { postmaster_address = postmaster at lg.informjust.ua # mail_plugins = cmusieve quota mail_plugin_dir = /usr/local/lib/dovecot/lda mail_plugins = quota ... auth default { mechanisms = plain socket listen { master { path = /var/run/dovecot/auth-master mode = 0700 user = mailnull group = mail } } passdb ldap { args = /usr/local/etc/dovecot-ldap.conf } userdb prefetch { } userdb ldap { args = /usr/local/etc/dovecot-ldap.conf } user = mailnull } plugin { #########quota = maildir:storage=20240 quota = maildir:User quota quota_rule = maildir:storage=500000K ####quota_rule = *:bytes=500000K ####quota_rule = maildir:storage=50240K #####new for 1.1 ver quota_overide = *:storage=20M } ===========================dovecot-ldap.conf ... ldap_version = 3 ... #WAS IN 1.0.14 VER #for deliver #user_attrs uid,,,homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quota=dirsize:storage,status user_attrs homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=maildir:storage=%$K,status user_filter = (&(objectClass=posixAccount)(uid=%u)) pass_attrs uid=user,,,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:storage=%$K,userPassword=password,status=userdb_status pass_filter = (&(objectClass=posixAccount)(uid=%u)) ================plan is: 1. if there is a quota in ldap (boxQuota) - we use it 2. if not - quota_rule = maildir:storage=500000K but in real world i have : in my box maildirsize : 512000000S <----------- not 300 mb from my ldap 188854660 1623 1245 1 but in dovecot.log: dovecot: Jun 16 11:00:03 Info: auth(default): ldap(XXXXXXXX,10.2.29.1): pass search: base=cn=XX,dc=XX,dc=lg scope=subtree filter=(&(objectClass=posixAccount)(uid=XXXXXXXX)) fields=uid,homeDirectory,uidNumber,gidNumber,boxQuota,userPassword,status dovecot: Jun 16 11:00:03 Info: auth(default): ldap(XXXXXXXX,10.2.29.1): result: uid(user)=XXXXXXXX uidNumber(userdb_uid)=26 g idNumber(userdb_gid)=6 homeDirectory(userdb_home)=/nonexistent status(userdb_status)=True userPassword(password)=irfaxbr boxQuota(userdb_quota=maildir:storage=%$K)=maildir:storage=50000K <---- CORRECT!! dovecot: Jun 16 11:00:03 Info: auth(default): client out: OK 1 user=XXXXXXXX dovecot: Jun 16 11:00:03 Info: auth(default): master in: REQUEST 219 96373 1 dovecot: Jun 16 11:00:03 Info: auth(default): prefetch(XXXXXXXX,10.2.29.1): success dovecot: Jun 16 11:00:03 Info: auth(default): master out: USER 219 perevdvs uid=26 gid=6 home=/nonexistent status=True quota=maildir:storage=50000K dovecot: Jun 16 11:00:03 Info: imap-login: Login: user=<XXXXXXXX>, method=PLAIN, rip=10.2.29.1, lip=10.2.29.1, secured dovecot: Jun 16 11:00:03 Info: IMAP(perevdvs): Connection closed bytes=50/96360 and in dovecot-delivery.log: deliver(vrog): Jun 16 13:08:08 Info: Loading modules from directory: /usr/local/lib/dovecot/lda deliver(vrog): Jun 16 13:08:08 Info: Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so deliver(vrog): Jun 16 13:08:08 Info: auth input: uid=26 deliver(vrog): Jun 16 13:08:08 Info: auth input: gid=6 deliver(vrog): Jun 16 13:08:08 Info: auth input: home=/nonexistent deliver(vrog): Jun 16 13:08:08 Info: auth input: status=True deliver(vrog): Jun 16 13:08:08 Info: auth input: quote_rule=*:storage=50000K <-----CORRECT deliver(vrog): Jun 16 13:08:08 Info: Home dir not found: /nonexistent deliver(vrog): Jun 16 13:08:08 Info: Quota root: name=User quota backend=maildir argsdeliver(vrog): Jun 16 13:08:08 Info: Quota rule: root=User quota mailbox=maildir bytes=512000000 messages=0 <-----NOT CORRECT deliver(vrog): Jun 16 13:08:08 Info: Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=ye s deliver(vrog): Jun 16 13:08:08 Info: maildir: data=/XXXX/Maildir deliver(vrog): Jun 16 13:08:08 Info: maildir++: root=/XXXX/Maildir, index=, control=, inbox/XXX/Maildir what am i doing wrong? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Timo Sirainen
2009-Jun-18 23:47 UTC
[Dovecot] ldap , quotes, upgrade from dovecot-1.0.14 (q2.0)
On Thu, 2009-06-18 at 09:53 +0300, razor razor wrote:> plugin { > #########quota = maildir:storage=20240 > quota = maildir:User quota > quota_rule = maildir:storage=500000Kquota_rule = *:storage=500000k> user_attrs > homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=maildir:storage=%$K,status > user_filter = (&(objectClass=posixAccount)(uid=%u))boxQuota=quota_rule=*:storage=%$k> pass_attrs > uid=user,,,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:storage=%$K,userPassword=password,status=userdb_status > pass_filter = (&(objectClass=posixAccount)(uid=%u))boxQuota=userdb_quota_rule=*:storage=%$k And remove the extra commas after uid=user. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090618/3d572794/attachment-0002.bin>
razor razor
2009-Jun-19 08:14 UTC
[Dovecot] ldap , quotes, upgrade from dovecot-1.0.14 (q2.0)
> On Thu, 2009-06-18 at 09:53 +0300, razor razor wrote: > > plugin { > > #########quota = maildir:storage=20240 > > quota = maildir:User quota > > quota_rule = maildir:storage=500000K >quota_rule = *:storage=500000k >> user_attrs > > > homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=maildir:storage=%$K,status > > user_filter = (&(objectClass=posixAccount)(uid=%u)) >boxQuota=quota_rule=*:storage=%$k >> pass_attrs > > > uid=user,,,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:storage=%$K,userPassword=password,status=userdb_status > > pass_filter = (&(objectClass=posixAccount)(uid=%u)) >boxQuota=userdb_quota_rule=*:storage=%$k >And remove the extra commas after uid=user.thanks for your answer! but it seems that it still doesnt take data from ldap :( now: plugin { quota_rule = *:storage=500000K } user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=*:storage=%$k,status pass_attrs = uid=user,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:stora ge=%$K,userPassword=password,status=userdb_status ================but in log :> sudo /usr/local/etc/rc.d/dovecot startStarting dovecot. ILoading modules from directory: /usr/local/lib/dovecot/imap IModule loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so IModule loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so IEffective uid=65534, gid=65534, home=/tmp Iquota: No quota setting - plugin disabled <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Loading modules from directory: /usr/local/lib/dovecot/imap dovecot: Jun 19 10:58:56 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Jun 19 10:58:56 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Jun 19 10:58:56 Info: IMAP(test): Effective uid=26, gid=6, home=/nonexistent dovecot: Jun 19 10:58:56 Info: IMAP(test): Quota root: name=storage=1000K backend=maildir args= <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Quota rule: root=storage=1000K mailbox=* bytes=512000000 messages=0 <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscripti ons=yes dovecot: Jun 19 10:58:56 Info: IMAP(test): maildir: data=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir dovecot: Jun 19 10:58:56 Info: IMAP(test): maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir dovecot: Jun 19 10:58:56 Info: IMAP(test): Disconnected: Logged out bytes=131/492 deliver(test): Jun 19 10:53:46 Info: Loading modules from directory: /usr/local/lib/dovecot/lda deliver(test): Jun 19 10:53:46 Info: Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so deliver(test): Jun 19 10:53:46 Info: auth input: uid=26 deliver(test): Jun 19 10:53:46 Info: auth input: gid=6 deliver(test): Jun 19 10:53:46 Info: auth input: home=/nonexistent deliver(test): Jun 19 10:53:46 Info: auth input: status=true deliver(test): Jun 19 10:53:46 Info: auth input: quote_rule=*:storage=1000k <------------ deliver(test): Jun 19 10:53:46 Info: Home dir not found: /nonexistent deliver(test): Jun 19 10:53:46 Info: quota: No quota setting - plugin disabled <------------ deliver(test): Jun 19 10:53:46 Info: Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=ye s deliver(test): Jun 19 10:53:46 Info: maildir: data=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 19 10:53:46 Info: maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 19 10:53:46 Info: msgid=<op.uvrhtvdgwnsbdb at lg54>: saved mail to INBOX and in maildirsize - 512000000S but not 1000K :( and when i login to box via squirelmail with plugin quota it show "1.6% of 488.3MB" -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> On Thu, 2009-06-18 at 09:53 +0300, razor razor wrote: > > plugin { > > #########quota = maildir:storage=20240 > > quota = maildir:User quota > > quota_rule = maildir:storage=500000K > quota_rule = *:storage=500000k >> user_attrs > > > homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=maildir:storage=%$K,status > > user_filter = (&(objectClass=posixAccount)(uid=%u)) > boxQuota=quota_rule=*:storage=%$k >> pass_attrs > > > uid=user,,,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:storage=%$K,userPassword=password,status=userdb_status > > pass_filter = (&(objectClass=posixAccount)(uid=%u)) > boxQuota=userdb_quota_rule=*:storage=%$k > And remove the extra commas after uid=user.thanks for your answer! but it seems that it still doesnt take data from ldap :( now: plugin { quota_rule = *:storage=500000K } user_attrs homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=*:storage=%$k,status pass_attrs uid=user,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=maildir:stora ge=%$K,userPassword=password,status=userdb_status ================but in log :> sudo /usr/local/etc/rc.d/dovecot startStarting dovecot. ILoading modules from directory: /usr/local/lib/dovecot/imap IModule loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so IModule loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so IEffective uid=65534, gid=65534, home=/tmp Iquota: No quota setting - plugin disabled <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Loading modules from directory: /usr/local/lib/dovecot/imap dovecot: Jun 19 10:58:56 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Jun 19 10:58:56 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Jun 19 10:58:56 Info: IMAP(test): Effective uid=26, gid=6, home=/nonexistent dovecot: Jun 19 10:58:56 Info: IMAP(test): Quota root: name=storage=1000K backend=maildir args= <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Quota rule: root=storage=1000K mailbox=* bytes=512000000 messages=0 <------------ dovecot: Jun 19 10:58:56 Info: IMAP(test): Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscripti ons=yes dovecot: Jun 19 10:58:56 Info: IMAP(test): maildir: data=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir dovecot: Jun 19 10:58:56 Info: IMAP(test): maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir dovecot: Jun 19 10:58:56 Info: IMAP(test): Disconnected: Logged out bytes=131/492 deliver(test): Jun 19 10:53:46 Info: Loading modules from directory: /usr/local/lib/dovecot/lda deliver(test): Jun 19 10:53:46 Info: Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so deliver(test): Jun 19 10:53:46 Info: auth input: uid=26 deliver(test): Jun 19 10:53:46 Info: auth input: gid=6 deliver(test): Jun 19 10:53:46 Info: auth input: home=/nonexistent deliver(test): Jun 19 10:53:46 Info: auth input: status=true deliver(test): Jun 19 10:53:46 Info: auth input: quote_rule=*:storage=1000k <------------ deliver(test): Jun 19 10:53:46 Info: Home dir not found: /nonexistent deliver(test): Jun 19 10:53:46 Info: quota: No quota setting - plugin disabled <------------ deliver(test): Jun 19 10:53:46 Info: Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=ye s deliver(test): Jun 19 10:53:46 Info: maildir: data=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 19 10:53:46 Info: maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox/data/vmail/data/XXXXXXXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 19 10:53:46 Info: msgid=<op.uvrhtvdgwnsbdb at lg54>: saved mail to INBOX and in maildirsize - 512000000S but not 1000K :( and when i login to box via squirelmail with plugin quota it show "1.6% of 488.3MB" -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- ??????? ----------------------------------------------------------- http://FREEhost.com.ua - ??? ?????? ????? ? ???????????? ??? ?????? ????????. ????? ?????????.