[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 dove dovecot-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:
- if there is a quota in ldap (boxQuota) - we use it
- 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 args= deliver(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/
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.
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 start Starting 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@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 - еще больше места и возможностей при заказе хостинга. Домен бесплатно.
On Fri, 2009-06-19 at 11:27 +0300, razor wrote:
pass_filter = (&(objectClass=posixAccount)(uid=%u)) boxQuota=userdb_quota_rule=*:storage=%$k
..
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
You didn't update this.
On Fri, 2009-06-19 at 11:27 +0300, razor wrote:
pass_filter = (&(objectClass=posixAccount)(uid=%u)) boxQuota=userdb_quota_rule=*:storage=%$k
..
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
You didn't update this.
sorry, wrong copypaste (
with
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=*:storage=%$K ,userPassword=password,status=userdb_status
=
sudo /usr/local/etc/rc.d/dovecot restart Stopping dovecot. Waiting for PIDS: 97782. Starting 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 <---------------------
deliver(test): Jun 22 07:39:38 Info: Loading modules from directory: /usr/local/lib/dovecot/lda deliver(test): Jun 22 07:39:38 Info: Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so deliver(test): Jun 22 07:39:38 Info: auth input: uid=26 deliver(test): Jun 22 07:39:38 Info: auth input: gid=6 deliver(test): Jun 22 07:39:38 Info: auth input: home=/nonexistent deliver(test): Jun 22 07:39:38 Info: auth input: status=true deliver(test): Jun 22 07:39:38 Info: auth input: quote_rule=*:storage=1000k deliver(test): Jun 22 07:39:38 Info: Home dir not found: /nonexistent deliver(test): Jun 22 07:39:38 Info: quota: No quota setting - plugin disabled deliver(test): Jun 22 07:39:38 Info: Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes deliver(test): Jun 22 07:39:38 Info: maildir: data=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 22 07:39:38 Info: maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 22 07:39:38 Info: msgid=<op.uvwsued5wnsbdb@lg54>: saved mail to INBOX
========================================= quota = maildir:User quota 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=*:storage=%$K ,userPassword=password,status=userdb_status
=
sudo /usr/local/etc/rc.d/dovecot restart Stopping dovecot. Waiting for PIDS: 52950. Starting 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 root: name=User quota backend=maildir args= IQuota rule: root=User quota mailbox=* bytes=512000000 messages=0
deliver(test): Jun 22 07:41:13 Info: Loading modules from directory: /usr/local/lib/dovecot/lda deliver(test): Jun 22 07:41:13 Info: Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so deliver(test): Jun 22 07:41:13 Info: auth input: uid=26 deliver(test): Jun 22 07:41:13 Info: auth input: gid=6 deliver(test): Jun 22 07:41:13 Info: auth input: home=/nonexistent deliver(test): Jun 22 07:41:13 Info: auth input: status=true deliver(test): Jun 22 07:41:13 Info: auth input: quote_rule=*:storage=1000k deliver(test): Jun 22 07:41:13 Info: Home dir not found: /nonexistent deliver(test): Jun 22 07:41:13 Info: Quota root: name=User quota backend=maildir args= deliver(test): Jun 22 07:41:13 Info: Quota rule: root=User quota mailbox=* bytes=512000000 messages=0 deliver(test): Jun 22 07:41:13 Info: Namespace: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes deliver(test): Jun 22 07:41:13 Info: maildir: data=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 22 07:41:13 Info: maildir++: root=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir, index=, control=, inbox=/data/vmail/data/XXXXXXXXXXXXXXX/test/Maildir deliver(test): Jun 22 07:41:13 Info: msgid=<op.uvwsw1ugwnsbdb@lg54>: saved mail to INBOX
- squrellmail gives an error with this config at login :(
-- реклама ----------------------------------------------------------- www.hostpro.ua – 8 лет! Тариф «Именинник»: 8Гб диска, 8 сайтов - $8/мес.
On Mon, 2009-06-22 at 07:56 +0300, razor wrote:
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=*:storage=%$k,status
quota_rule, not quote_rule.
pass_attrs = uid=user,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=*:storage=%$K ,userPassword=password,status=userdb_status
userdb_quota_rule, not userdb_quota.
On Mon, 2009-06-22 at 07:56 +0300, razor wrote:
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,boxQuota=quote_rule=*:storage=%$k,status
quota_rule, not quote_rule.
pass_attrs = uid=user,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=*:storage=%$K ,userPassword=password,status=userdb_status
userdb_quota_rule, not userdb_quota.
THANKS a lot!!!! my bad (((
-- реклама ----------------------------------------------------------- www.hostpro.ua – 8 лет! Тариф «Именинник»: 8Гб диска, 8 сайтов - $8/мес.
On Fri, 2009-06-19 at 11:27 +0300, razor wrote:
pass_filter = (&(objectClass=posixAccount)(uid=%u)) boxQuota=userdb_quota_rule=*:storage=%$k
..
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
You didn't update this.
dovecot: Jun 22 07:51:21 Info: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=10.2.29.1 rip=1 0.2.29.1 lport=143 rport=52727 resp=AHRlc3QAdGVzdA== dovecot: Jun 22 07:51:21 Info: auth(default): ldap(test,10.2.29.1): pass search: base=cn=People,dc=ic,dc=lg scope=subtree fil ter=(&(objectClass=posixAccount)(uid=test)) fields=uid,homeDirectory,uidNumber,gidNumber,boxQuota,userPassword,status dovecot: Jun 22 07:51:21 Info: auth(default): ldap(test,10.2.29.1): result: uid(user)=test uidNumber(userdb_uid)=26 gidNumber (userdb_gid)=6 homeDirectory(userdb_home)=/nonexistent userPassword(password)=test status(userdb_status)=true boxQuota(userdb _quota=*:storage=%$K)=*:storage=1000K dovecot: Jun 22 07:51:21 Info: auth(default): client out: OK 1 user=test dovecot: Jun 22 07:51:21 Info: auth(default): master in: REQUEST 3 93747 1 dovecot: Jun 22 07:51:21 Info: auth(default): prefetch(test,10.2.29.1): success dovecot: Jun 22 07:51:21 Info: auth(default): master out: USER 3 test uid=26 gid=6 home=/nonexistent statu s=true quota=*:storage=1000K dovecot: Jun 22 07:51:21 Info: IMAP(test): Loading modules from directory: /usr/local/lib/dovecot/imap dovecot: Jun 22 07:51:21 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Jun 22 07:51:21 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Jun 22 07:51:21 Info: IMAP(test): Effective uid=26, gid=6, home=/nonexistent dovecot: Jun 22 07:51:21 Error: IMAP(test): Unknown quota backend: * dovecot: Jun 22 07:51:21 Fatal: IMAP(test): Couldn't create quota root: *:storage=1000K
and if i make pass_attrs = uid=user,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,boxQuota=userdb_quota=%$K,
0.2.29.1 lport=143 rport=61742 resp=AHRlc3QAdGVzdA== dovecot: Jun 22 07:52:03 Info: auth(default): ldap(test,10.2.29.1): pass search: base=cn=People,dc=ic,dc=lg scope=subtree fil ter=(&(objectClass=posixAccount)(uid=test)) fields=uid,homeDirectory,uidNumber,gidNumber,boxQuota,userPassword,status dovecot: Jun 22 07:52:03 Info: auth(default): ldap(test,10.2.29.1): result: uid(user)=test uidNumber(userdb_uid)=26 gidNumber (userdb_gid)=6 homeDirectory(userdb_home)=/nonexistent userPassword(password)=test status(userdb_status)=true boxQuota(userdb _quota=%$K)=1000K dovecot: Jun 22 07:52:03 Info: auth(default): client out: OK 1 user=test dovecot: Jun 22 07:52:03 Info: auth(default): master in: REQUEST 3 93801 1 dovecot: Jun 22 07:52:03 Info: auth(default): prefetch(test,10.2.29.1): success dovecot: Jun 22 07:52:03 Info: auth(default): master out: USER 3 test uid=26 gid=6 home=/nonexistent statu s=true quota=1000K dovecot: Jun 22 07:52:03 Info: IMAP(test): Loading modules from directory: /usr/local/lib/dovecot/imap dovecot: Jun 22 07:52:03 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Jun 22 07:52:03 Info: IMAP(test): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Jun 22 07:52:03 Info: imap-login: Login: user=<test>, method=PLAIN, rip=10.2.29.1, lip=10.2.29.1, secured dovecot: Jun 22 07:52:03 Info: IMAP(test): Effective uid=26, gid=6, home=/nonexistent dovecot: Jun 22 07:52:03 Error: IMAP(test): Unknown quota backend: 1000K dovecot: Jun 22 07:52:03 Fatal: IMAP(test): Couldn't create quota root: 1000K
-- реклама ----------------------------------------------------------- www.hostpro.ua – 8 лет! Тариф «Именинник»: 8Гб диска, 8 сайтов - $8/мес.
participants (3)
-
razor
-
razor razor
-
Timo Sirainen