tibby at tibby.hu
2012-Dec-01 14:07 UTC
[Dovecot] Store mailbox usage in mysql not just the limit
Hello! I have dovecot working using mysql for auth and mailbox quota. in the mail database I have a user table with colums for: email, password, quota_kb, quota_messages I want to make a php script that would get the quota_kb and substract the usage to display the total free space left for mail usage. How can I do this? Is there a function in dovecot to store the current usage per mailbox ? Thanks!
Daniel Parthey
2012-Dec-03 21:44 UTC
[Dovecot] Store mailbox usage in mysql not just the limit
Hi Tibby, tibby at tibby.hu wrote:> I have dovecot working using mysql for auth and mailbox quota. > > in the mail database I have a user table with colums for: > email, password, quota_kb, quota_messages > > I want to make a php script that would get the quota_kb and > substract the usage to display the total free space left for mail > usage. > How can I do this? > Is there a function in dovecot to store the current usage per mailbox ?Yes, you can store current usage quota in an SQL dictionary: http://wiki2.dovecot.org/Quota/Dict For this you should create two more columns in your database, into which dovecot may write the current usage values. Regards Daniel -- https://plus.google.com/103021802792276734820