• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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