How to get a list of all email accounts and their disk usage in Plesk via CLI

Follow

Comments

3 comments

  • Avatar
    Bobby Martin (Edited )

    Thanks Kuzma, very helpful!

    0
    Comment actions Permalink
  • Avatar
    Stavros T

    Thank you, nice one!

     

    In MB:

    plesk db "SELECT concat(mail.mail_name,'@',domains.name) AS 'Email address', concat(mn_param.val / 1048576, 'MB') AS 'Mailbox usage', concat(Limits.value / 1048576, 'MB') AS 'Mailbox limit' FROM mail LEFT JOIN mn_param ON mail.id=mn_param.mn_id LEFT JOIN domains ON mail.dom_id=domains.id LEFT JOIN Subscriptions ON domains.id=Subscriptions.object_id LEFT JOIN SubscriptionProperties ON Subscriptions.id=SubscriptionProperties.subscription_id LEFT JOIN Limits ON SubscriptionProperties.value=Limits.id WHERE mn_param.param='box_usage' AND Subscriptions.object_type='domain' AND SubscriptionProperties.name='limitsId' AND Limits.limit_name='mbox_quota'"
    0
    Comment actions Permalink
  • Avatar
    Taras Ermoshin

    Hi @Stavros T, thanks for sharing!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request