Christopher McBride
Basic Pleskian
Hi,
I've created my own script to alert me when email accounts are reaching or exceeded their capacity.
This checks the size of the Maildir directory for each account (/var/qmail/mailnames/domain.com/user/Maildir) and compares it to the PSA database for the individual mailbox quota (if set) or general domain mailbox quota.
When logging into webmail (both Horde and Atmail), it shows a different value than I achieve from checking the actual used diskspace.
e.g.
# du /var/qmail/mailnames/domain.com/name/ --max-depth=2
652 /var/qmail/mailnames/domain.com/name/Maildir/.Sent Items
4 /var/qmail/mailnames/domain.com/name/Maildir/tmp
9640 /var/qmail/mailnames/domain.com/name/Maildir/cur
208 /var/qmail/mailnames/domain.com/name/Maildir/.Trash
52 /var/qmail/mailnames/domain.com/name/Maildir/.ham_learn
3768 /var/qmail/mailnames/domain.com/name/Maildir/.Deleted Items
4 /var/qmail/mailnames/domain.com/name/Maildir/new
528 /var/qmail/mailnames/domain.com/name/Maildir/courierimapkeywords
28 /var/qmail/mailnames/domain.com/name/Maildir/.junk_learn
32 /var/qmail/mailnames/domain.com/name/Maildir/.sent-mail
28 /var/qmail/mailnames/domain.com/name/Maildir/.Sent
28 /var/qmail/mailnames/domain.com/name/Maildir/.Spam
28 /var/qmail/mailnames/domain.com/name/Maildir/.Drafts
15044 /var/qmail/mailnames/domain.com/name/Maildir
4 /var/qmail/mailnames/domain.com/name/@attachments
15056 /var/qmail/mailnames/domain.com/name/
This totals around 15MB.
The quota is set at 1GB and I'd expect the percentage to be 1.46%.
Both Horde and Atmail show a percentage of 1.16%.
OK, so this isn't a problem for me - since I have a large quota.
Some of my clients are on a 100mb quota with disk usage of 86mb, but webmail showing ~40%.
Can anyone offer any advice as to:
*What provides the quota information - Courier IMAP?
*What directories (in the above listing) are included or excluded in this listing?
*How Plesk calculates the mailbox quota.
Thanks
I've created my own script to alert me when email accounts are reaching or exceeded their capacity.
This checks the size of the Maildir directory for each account (/var/qmail/mailnames/domain.com/user/Maildir) and compares it to the PSA database for the individual mailbox quota (if set) or general domain mailbox quota.
When logging into webmail (both Horde and Atmail), it shows a different value than I achieve from checking the actual used diskspace.
e.g.
# du /var/qmail/mailnames/domain.com/name/ --max-depth=2
652 /var/qmail/mailnames/domain.com/name/Maildir/.Sent Items
4 /var/qmail/mailnames/domain.com/name/Maildir/tmp
9640 /var/qmail/mailnames/domain.com/name/Maildir/cur
208 /var/qmail/mailnames/domain.com/name/Maildir/.Trash
52 /var/qmail/mailnames/domain.com/name/Maildir/.ham_learn
3768 /var/qmail/mailnames/domain.com/name/Maildir/.Deleted Items
4 /var/qmail/mailnames/domain.com/name/Maildir/new
528 /var/qmail/mailnames/domain.com/name/Maildir/courierimapkeywords
28 /var/qmail/mailnames/domain.com/name/Maildir/.junk_learn
32 /var/qmail/mailnames/domain.com/name/Maildir/.sent-mail
28 /var/qmail/mailnames/domain.com/name/Maildir/.Sent
28 /var/qmail/mailnames/domain.com/name/Maildir/.Spam
28 /var/qmail/mailnames/domain.com/name/Maildir/.Drafts
15044 /var/qmail/mailnames/domain.com/name/Maildir
4 /var/qmail/mailnames/domain.com/name/@attachments
15056 /var/qmail/mailnames/domain.com/name/
This totals around 15MB.
The quota is set at 1GB and I'd expect the percentage to be 1.46%.
Both Horde and Atmail show a percentage of 1.16%.
OK, so this isn't a problem for me - since I have a large quota.
Some of my clients are on a 100mb quota with disk usage of 86mb, but webmail showing ~40%.
Can anyone offer any advice as to:
*What provides the quota information - Courier IMAP?
*What directories (in the above listing) are included or excluded in this listing?
*How Plesk calculates the mailbox quota.
Thanks