Re: [Dovecot] force to recalculate quotadict

2010-03-08 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 8 Mar 2010, Andre Hübner wrote:

http://www.dovecot.org/list/dovecot/2009-March/038249.html

Quota is updated whenever Dovecot is the one doing changes and quota
plugin is loaded.

Hmm, I would expect a quota recalculation, too, if there is no current 
quota at all.


In the parents of the mail, there is the outline:

1. remove the quota in the DB,
2. make same changes.

With | dovecot --exec-mail imap you can do changes or request the 
current quota easily.


However, you probably need to set some environment variables or su to the 
user for dovecot running as the correct system user and mail user.


Regards,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBS5TJN7+Vh58GPL/cAQK1+Af/ckGKX+5KqVXkYIg4ZmLd2qvt9JkYjEvq
gn1H9tyDi3P9wcC1rI+oioi7j79OMvFqDzLSTR7RZAOi/gVR/upOLzvSU6x+cCGU
jit8IDlUYUql0tsgpx3XqYI6c/bugMwNX69feuvuh8gg3grtBs/NefshEv51p8u8
IOvt2D0RG5s+qPSCm+DNe+P2LEOfjfhAJt3xtUzkB7+TgWQIZGrHUIhRpu3MIhR0
FDuOQXy2qLl0Ze5agjAkCduYjzJ4GA4aSnmwDU0xk8bfJKkWUaT48M9MzDo9NJU3
wN7orKhNTA+n5ZJ/I4L7ae9GwJlh1BdyAc2BPgvj/8ot4m1OJtZ5rQ==
=H9SS
-END PGP SIGNATURE-

Re: [Dovecot] force to recalculate quotadict

2010-03-08 Thread Andre Hübner

Hello,


1. remove the quota in the DB,
2. make same changes.


hmm, i see. but unfortunately this is not a way  i can do. it would be 
acceptable in private scope but not for bussinesscustomers.
to make a change i would manipulate customers maildata which is not allowed 
this way.
a simple command to update complete quota for the single user would be the 
best way.
now i tried to connect per telnet and use command Getquotaroot, seems also 
to work. this should be scriptable...


ok thanks, i will try something...
Andre




Re: [Dovecot] force to recalculate quotadict

2010-03-08 Thread Pascal Volk
On 03/08/2010 11:45 AM Andre Hübner wrote:
 Hello,
 
 1. remove the quota in the DB,
 2. make same changes.
 
 hmm, i see. but unfortunately this is not a way  i can do. it would be 
 acceptable in private scope but not for bussinesscustomers.
 to make a change i would manipulate customers maildata which is not allowed 
 this way.
 a simple command to update complete quota for the single user would be the 
 best way.
 now i tried to connect per telnet and use command Getquotaroot, seems also 
 to work. this should be scriptable...
 
 ok thanks, i will try something...

You found 'something'? If not, have a look at:
http://wiki.dovecot.org/Quota/Dict#Insert_used_quotas_to_the_new_table_after_upgrade_to_1.2.x


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1006...@localdomain.org


Re: [Dovecot] force to recalculate quotadict

2010-03-08 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 8 Mar 2010, Pascal Volk wrote:


You found 'something'? If not, have a look at:
http://wiki.dovecot.org/Quota/Dict#Insert_used_quotas_to_the_new_table_after_upgrade_to_1.2.x


Oh, cool, so Dovecot does calculate the quota, if there is none in the 
database:


1) delete the quota of user $M
2) call

echo x GETQUOTAROOT Inbox | \
USER=$M /usr/sbin/dovecot --exec-mail imap

should do it.

Maybe, one needs to add

HOME=
MAIL=
sudo -u mail_user

Regards,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBS5Tbtr+Vh58GPL/cAQLFNAf/esUR5u0Fxe0+pZz2+jyyOME6RU3FuZu2
R7w+8SbgpDUimLUu6/z4RXhhO8058/RA+LsPHJvkyEs7pmpGY9JfVJ9Q/pGpTOrW
SzJRcVOUDGwIqUwd9H/mVWW5Nlsp1/hCogwiBhtD/US1GLTka2DRk3G+J2FU7V0b
trvoZgPfCSwOYHGAWMMC3J98QCborDrkz55LdcRf8LkTZd4PzlSIRNft0Gqh8AN5
9TRN6urInKd6Ik/Cj9fvoh5mdoug/usalSn0b4VtSYFJocBwp3leD9GBIMFfHg8U
BwOoWFHoNXlappOqRkhNYWDixWDbjpLn4m5QwDIeSC0byFA3edzpRw==
=qx4c
-END PGP SIGNATURE-


Re: [Dovecot] force to recalculate quotadict

2010-03-08 Thread Timo Sirainen
BTW. v2.0 can now do:

doveadm quota username recalc



signature.asc
Description: This is a digitally signed message part