Quotas

jigster

Verified User
Joined
Jul 23, 2021
Messages
90
I'd like to see the quota/space usage of a specific DA user and all the email accounts for that user, using just the command line. I'm coming from cPanel where I wrote a script to pull the data from the backend files where disk usage for each user/email is stored. Does anyone have something like that for DA or can tell me where the quotas and disk space usage are stored for both DA users and their email accounts? Thanks.
 
Thanks for the tip, that's really helpful. It doesn't show each individual email account usage which is what I'd like to see too. Any ideas? Should I just use
Code:
doveadm quota get -u [email protected]

I'm a bit confused by the way usage is reported in DA. I have a test user setup and the quota usage is different depending on where you look:
in DA logged in as admin
Show all users - usage = 316.01 KB
View User > Usage Statistics - usage = 316.01 KB
View User > Usage Statistics - E-mail Disk Usage = 7.82 MB
The above matches what is shown in /usr/local/directadmin/data/users/username/user.usage for 'quota' & 'email_quota'

BUT when logged into DA as the user
Disk Usage = 6.91 MB
E-mail Total Usage 6.44 MB
doveadm quota get -u [email protected] command line, usage = 6.44 MB

Code:
du -sh /home/username
shows usage = 7.0M

The quotas when logged into DA as admin and when logged in as the user don't match, none of which match the du command line value!! The user figures are the correct ones. Why are the usage stats reported incorrectly in DA logged in as admin?

Also, why doesn't the usage include the email space usage when logged in as admin? Any way to change this?

Thanks :)
 
Last edited:
The quota is updated several times a day by the tally, so this is why sometimes the real usage and usage in the GUI can differ.
There is no seperate mail and and disk quota. There is only 1 quota, which counts for disk and mail together.

Ah wait. I was just looking for information about running the tally more often, because that has been asked before too.
And then I found this:
so on new installs the quota's are updated realtime. It also contains some other information.

For the rest I can't be of help, because that's all I know about it. Maybe somebody else or support.
 
Thanks a lot. After about 30-45 minutes the usage stats in Admin access level updated and the email usage was included in the overall usage figure. So I assume the user level reports space usage in real-time but not at the admin level which takes a while to catch up? Could anyone confirm that is the case, and how often it updates?

However, even almost a day later the email quotas still don't quite match between admin level and user level (admin says email usage for my test user is 6.71MB and user level says 6.44MB, both agree on overall space usage 6.91MB). So I'm guessing that for some reason the quotas are calculated from different places at admin level and user level? Perhaps DirectAdmin support could confirm if this is the case, and why? And which one is used when limiting users to their individual email quota?

Being new to DA and as clients exceeding quota is common, I'm just trying to understand the details of how it works so we know what to advise clients and so I can write a command line script to report correct quotas (really just for our convenience).
 
Back
Top