• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Mailbox disk usage calculation in psa database

Dave_G

New Pleskian
I have noticed in the psa.mail database there are fields for quota and disk_usage but they never seem to change.

We set our subscriptions up via API using service plans, with the mailbox limit set to 2Gb per mailbox. I have read in other articles that the quota set at -1 means its the default or unlimited, but the disk usage is always "0".

How and when is this calculated and stored in to the database?

Dave.
 
So, I created a ticket with Odin on this subject and after a few days they have come back and said its disabled on linux versions (not sure why yet!)

But they did provide me a one liner to get the disk usage:

Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -NBe"select m.mail_name, d.name from mail as m left join domains as d on m.dom_id=d.id;" | while read j i; do echo $j"@"$i; /usr/local/psa/admin/bin/mailmng-core --get-mailbox-size --domain-name=$i --mailname=$j; echo "";done
This will give a list of all mailboxes. If you want a single domain or single mailbox, then just alter the sql part.

Regards
Dave.
 
Back
Top