Roundcube, a popular webmail interface, doesn’t inherently display mailbox quotas by default. However, users might appreciate seeing their available storage space. Thankfully, this functionality can be added through a plugin.

This guide will walk you through installing and configuring the Roundcube Quota Plugin to display mailbox quotas for your users.

Install via Composer

This plugin has been published on Packagist by the name of jfcherng-roundcube/quota.

Go to your ROUNDCUBE_HOME< (i.e., the root directory of your Roundcube).

Run composer require jfcherng-roundcube/quota.

Install manually

Create folder quota in ROUNDCUBE_HOME/plugins if it does not exist.

Copy all plugin files there.

Copy config.inc.php.dist to config.inc.php and edit config.inc.php if you want.

Edit ROUNDCUBE_HOME/conf/config.inc.php. 

Locate $config[‘plugins’] and add ‘quota’, there:

<?php
// some other codes...
$config['plugins'] = array(
// some other plugins...
'quota', // <-- add this
);

Change Dovecot Settings

in dovecot/conf.d/90-quota.conf:

plugin {
  quota = fs:User quota
 quota_rule = *:storage=1M
  quota_exceeded_message = Quota exceeded
}

in dovecot/conf.d/20-imap.conf:

protocol imap {
 mail_plugins = $mail_plugins imap_quota
}

in dovecot/conf.d/10-mail.conf:

mail_plugins = $mail_plugins quota
sudo systemctl restart dovecot

By following these steps, you should now have the Roundcube Quota Plugin installed and functional, providing your users with valuable insight into their mailbox storage usage.