1

Topic: sql

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):1.2.1
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: CentOS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Good afternoon.
I want to share my experience with the society, it may be useful.
List of users who need to increase the mailbox size.
============================================
SELECT vmail.used_quota.username,vmail.used_quota.bytes/1024/1024
FROM vmail.used_quota
INNER JOIN vmail.mailbox
ON vmail.used_quota.username = vmail.mailbox.username
WHERE vmail.mailbox.active = '1'
and
vmail.used_quota.bytes/1024/1024 +1024 > vmail.mailbox.quota;