How to list all mailboxes, their size, mail quota and mailbox occupation?

Started by senthil, Apr 12, 2025, 04:36 AM

Previous topic - Next topic

senthil

Question
How to list all mailboxes, their size, mail quota and mailbox occupation?

Answer
  • Connect to the server via SSH
  • Use the following command:
# plesk db "SELECT CONCAT(mail_name,'@',name) as 'Email',
(truncate(mn.val/(1024*1024), 1)) as 'Megabytes',
(truncate(mail.mbox_quota/(1024*1024), 1)) as 'Mailbox Size',
(truncate((mn.val/mail.mbox_quota)*100, 1)) as 'Ocuppation' FROM mail,domains
join mn_param mn WHERE dom_id=domains.id and mail.id=mn.mn_id and
mn.param='box_usage' AND postbox='true' order by 4 desc"