How to get a list of all email accounts and their disk usage via a command-line interface in Plesk

Follow

Comments

5 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!

    1
    Comment actions Permalink
  • Avatar
    Luis Zubeldia

    Please modify your query to order by mailbox usage and show the values in MB can be more usefull

    0
    Comment actions Permalink
  • Avatar
    Brandon Truong

    Why each email user limit to only 100 MB? Is there anyway we can increase the storage size to 1 Gib?

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request