Until now the space consumed by mailboxes (at least in maildir mode) is not shown in the domain statistics. I've read before that this is caused by file permissions. Of course these permissions should stay as they are, because mails should stay private.
My suggestion: Making use of the output of the quota command.
Problem: Only root can view all users' quotas.
Options: Run quota as root or run quota as one of the domain's users.
I know this isn't that easy, especially because making quota suid root wouldn't be that nice...
But it is possible to grant root-access to quota without opening it to everyone.
Simply create some script, e.g. /usr/local/bin/suid_quota:
if [ "$1" == "somepassword" ]
/usr/bin/quota $2 $3 $4 $5 $6
# chmod ug+s /usr/local/bin/suid_quota
# chmod go-r /usr/local/bin/suid_quota
# chgrp www-data /usr/local/bin/suid_quota
After that you can query all quotas by using /usr/local/bin/suid_quota if you provide the hardcoded password as first parameter to the script.
If this would be integrated into ISPConfig, of course every server should have it's own password. Possible way to achieve this: Simply generate a random password in setup, paste it into this script and also save it in the database (or any config file) that ISPConfig knows it when a query has to be made.
Btw.: I use this construction to enable Horde IMP to show up quotas, and until now it just works fine.