Page 1 of 1

Workaround for RoundCube Quota Display

Posted: Wed Sep 02, 2015 12:30 am
by SCelik
Image

If you want to display Quota on RoundCube like above, you have to enable quota plugins from dovecot first. Then you have to change password files on mail configs...

Let's start changing password files on create/update/passwordchange/quotachange. For this you have to edit:

bin/v-change-mail-account-password

Code: Select all

-    str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
+    str="$account:$md5:$user:mail::$HOMEDIR/$user::userdb_quota_rule=*:storage=${quota}M"
bin/v-add-mail-account

Code: Select all

-    str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
+    str="$account:$md5:$user:mail::$HOMEDIR/$user::userdb_quota_rule=*:storage=${quota}M"
bin/v-change-mail-account-quota

Code: Select all

-    str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
+    str="$account:$md5:$user:mail::$HOMEDIR/$user::userdb_quota_rule=*:storage=${quota}M"
Secondly enable quota plugins on dovecot:

/etc/dovecot/conf.d/90-quota.conf
Remove comment on line quota = maildir:User quota

Code: Select all

plugin {
  #quota = dirsize:User quota
  quota = maildir:User quota 
  #quota = dict:User quota::proxy::quota
  #quota = fs:User quota
}
/etc/dovecot/conf.d/20-pop3.conf
Add line mail_plugins = quota

Code: Select all

 mail_plugins = quota
/etc/dovecot/conf.d/20-imap.conf
Add line mail_plugins = quota imap_quota

Code: Select all

mail_plugins = quota imap_quota
Go to panel, and update mail accounts so, password files will be recreated with quota.

After all, restart dovecot

Code: Select all

service dovecot restart
Login to RoundCube, and see quota is working...

Re: Workaround for RoundCube Quota Display

Posted: Sat Oct 10, 2015 5:42 pm
by hafeezksa
How to update quota for existing users because it is showing for new created users only ?

Re: Workaround for RoundCube Quota Display

Posted: Sat Oct 10, 2015 9:58 pm
by SCelik
Update users mail account from panel. Edit / Save even if you don't change anything. Just save again.

Re: Workaround for RoundCube Quota Display

Posted: Sun Oct 11, 2015 4:22 am
by hafeezksa
I tried these two command also working fine and all emails quota updated now.

Code: Select all

$ v-update-user-stats
$ v-update-sys-queue disk

Re: Workaround for RoundCube Quota Display

Posted: Mon Nov 09, 2015 5:11 am
by nicknone
hafeezksa wrote:I tried these two command also working fine and all emails quota updated now.

Code: Select all

$ v-update-user-stats
$ v-update-sys-queue disk
Hi

Is this really working?? please let me know.

Re: Workaround for RoundCube Quota Display

Posted: Thu Feb 04, 2016 2:06 pm
by Spheerys
I was looking for this way to recalculate the used quota.
Thank you :)

Re: Workaround for RoundCube Quota Display

Posted: Tue May 10, 2016 4:32 pm
by SS88
Thank you for this.

I am using Roundcube Webmail 1.1.5 and Vesta 0.9.8-15, and I did not have to edit any Vesta files - just Dovecot

Re: Workaround for RoundCube Quota Display

Posted: Sat May 21, 2016 8:20 pm
by Felix
Thanks for the workaround!

One thing to note... On my VESTA installation on Ubuntu 14.04 the file /etc/dovecot/conf.d/90-quota.conf didn't exist so I had to create it.

Re: Workaround for RoundCube Quota Display

Posted: Wed Jan 10, 2018 4:54 am
by huloza
this post should be sticky.