vmailmgr vchattr softquota and hardquota only support up to unsigned int or 65535 in len or 4294967295-1 value
Giam Teck Choon <[email protected]> Sun, 2 Oct 2016 13:23:08 +0800
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Organization | CHOON.NET |
| Message-ID | <[email protected]> |
Hi Bruce, Do you intend to support more than 4GB allocation for hard/soft quota in vmailmgr client? This is getting more and more common when users try to set quotas for their mailbox to more than 4GB since these days disk space capacity increased (hardware getting cheaper and cheaper)? Recently one of my client tried to set some of their domain mailboxes to 5GB or more than 4GB and unable to. Here are some real example: $ vchattr -q 4294967295 tt123 vchattr: attribute for user 'tt123' successfully changed. $ dumpvuser tt123 Name: tt123 Encrypted-Password: <SNAP> Directory: ./users/tt123 Hard-Quota: N/A Soft-Quota: N/A Message-Size-Limit: N/A Message-Count-Limit: N/A Creation-Time: 1475227036 Expiry-Time: N/A Has-Mailbox: true Mailbox-Enabled: true Trying to set softquota to 4294967295 failed and result is N/A when doing dumpvuser to check as above. When I try -1 value of 4294967295 = 4294967294 I can without issue. So this is something related to unsigned int type since it hold up to 4294967295 (65535). I searched in bglibs source and found something related to vmailmgr especially in ./vmailmgr/vpwentry.h and ./vmailmgr/client.h then noticed that VCLIENT_MAXLEN is defined as 65535 in ./vmailmgr/client.h and in ./vmailmgr/vpwentry.h has struct vpwentry that declare unsigned hardquota and softquota. Thanks. Kindest regards, Giam Teck Choon