Feature #2433
Dashboard mail quota usage report
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-mail-server | |||
Target version: | v6.5-beta3 | |||
Resolution: | NEEDINFO: | No |
Description
Add a Dashboard plugin where mail quota usage is summarized. For each user the following informations must be reported:
- user name
- quota % usage
- quota GB usage
- quota GB total
Nice to have: mail partition usage (now available elsewhere).
Related issues
Associated revisions
Dashboard: add mail quota usage widget. Refs #2433
Parse values from doveadm output as integers. Refs #2433
The perl int() function trims whitespaces around the integer token.
Multiply quota with powers of 2. Refs #2433
Avoid trunking the quota size to a decimal value.
History
#1 Updated by Giacomo Sanchietti over 7 years ago
- Subject changed from Mail quota usage report to Dasboard: mail quota usage report
#2 Updated by Giacomo Sanchietti over 7 years ago
- Assignee set to Giacomo Sanchietti
#3 Updated by Giacomo Sanchietti over 7 years ago
We can use the doveadm
command.
Example:
[root@localhost new]# doveadm -f tab quota get -A Username Quota name Type Value Limit % admin User quota STORAGE 0 1024000 0 admin User quota MESSAGE 1 - 0 davidem User quota STORAGE 0 1024000 0 davidem User quota MESSAGE 0 - 0 tecnici User quota STORAGE 0 1024000 0 tecnici User quota MESSAGE 0 - 0 faxmaster User quota STORAGE 0 1024000 0 faxmaster User quota MESSAGE 0 -
#4 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#5 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
#6 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 60 to 70
- nethserver-mail-server-1.5.0-13.0git25918282.ns6.noarch.rpm
- Enable mail quota
- Send some big emails
- Check the dashboard widget displays correct statistics
Check quota:
/usr/bin/doveadm quota get -A
#7 Updated by Davide Principi over 7 years ago
- Subject changed from Dasboard: mail quota usage report to Dashboard mail quota usage report
#8 Updated by Davide Principi over 7 years ago
- Assignee set to Davide Principi
#9 Updated by Davide Principi over 7 years ago
- Status changed from ON_QA to TRIAGED
- % Done changed from 70 to 20
FAILED
The percentage is always reported as 1. I was expecting 4%
for primo.utente
. Output from /usr/libexec/nethserver/mail-quota
:
{ "admin": { "max": "1024000", "msg": "4", "perc": "1", "size": "4" }, "primo.utente": { "max": "10240000", "msg": "13824", "perc": "1", "size": "488281" }, "terzo.utente": { "max": "1024000", "msg": "0", "perc": "1", "size": "0" } }
Indeed output from doveadm
is
# doveadm quota get -A Username Quota name Type Value Limit % primo.utente User quota STORAGE 488281 10240000 4 primo.utente User quota MESSAGE 13824 - 0 terzo.utente User quota STORAGE 0 1024000 0 terzo.utente User quota MESSAGE 0 - 0 admin User quota STORAGE 4 1024000 0 admin User quota MESSAGE 4 - 0
#10 Updated by Davide Principi over 7 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#11 Updated by Davide Principi over 7 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
Test case
- Check percent values are correct
- 1GB quota must be displayed as 1GB (not as 1000 MB)
- 15GB quota must be displayed as 15GB (not as 14.65GB)
#12 Updated by Davide Principi over 7 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In nethserver-testing:
nethserver-mail-server-1.5.0-19.0git60b911f3.ns6.noarch.rpm
#13 Updated by Giacomo Sanchietti over 7 years ago
- Assignee set to Giacomo Sanchietti
#14 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
Information are correctly displayed inside Dashboard plugin:
[root@localhost internal_access]# /usr/bin/doveadm quota recalc -A [root@localhost internal_access]# /usr/bin/doveadm quota get -A Username Quota name Type Value Limit % admin User quota STORAGE 92294 1048576 8 admin User quota MESSAGE 9 - 0 davidem User quota STORAGE 0 1048576 0 davidem User quota MESSAGE 0 - 0 tecnici User quota STORAGE 0 1048576 0 tecnici User quota MESSAGE 0 - 0 faxmaster User quota STORAGE 0 1048576 0 faxmaster User quota MESSAGE 0 - 0
Marking as VERIFIED.
#15 Updated by Davide Principi over 7 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
Released in nethserver/6.5/base
repository.