Get disk space used by mail accounts

Guys, I might be missing something obvious but I'd like to find email uses on the system that have too much storage. Quota's won't work because this is an openvz container. If there's a way I can use quota's please point me in the right direction.

Barring that, what would be the best way to find offending users (too much disk space used) across all domains or for a specific domain?

Command line is desired.

Thanks!
-- Craig

Status: 
Active

Comments

For a specific domain, you can see this at Administration Options -> Disk Usage.

OK, so there isn't a way do this this on the command line. And no way to do it for all domains.

The web interface won't do for what we want, show disk usage by email account.

I'll try to figure out something else, though maybe there was a virtualmin command to detail mail usage...

Thanks!
-- Craig

I guess from the command line you could use a command like cd /home ; du -h */homes/*

Here is a couple other commands that can help find the biggest maildirs.

For top level virtual servers:

$ du -h -s /home/*/homes

For sub servers:

$ du -h -s /home/\*/domains/\*/homes