Hey Guys,
running i-MSCP trunk on a Server now.
I use dovecot and want to set a quota higher than 2GB.
So i change the value an the DB for the user but everytime when i save the record it is max. 2147483647 ?
Any suggestions ?
Thanks & Greez
BeNe
Hey Guys,
running i-MSCP trunk on a Server now.
I use dovecot and want to set a quota higher than 2GB.
So i change the value an the DB for the user but everytime when i save the record it is max. 2147483647 ?
Any suggestions ?
Thanks & Greez
BeNe
Seems that the table definition
`quota` int(10) default '10485760',
makes a signed INT type going from -2G till +2G
changing to unsigned will lift the limit to 4GB but I think it rather should be an unsigned BIGINT - so we can set till 18446744073709551615 Bytes...
= 18446744TB = around 18 Exa Bytes... ???
(should be enough...
/Joxi
a creative solution... maybe it's enough to set Megabytes instead of Bytes - so
is maybe ok... the limit then is 2 PetaBytes... - or 4PB if you change to unsigned INT
Default - my opinion:
Default limit should be configurable via hostingplan...
The POP users do not need more than some hundrets of MB, the IMAP people often need >10GB...
/Joxi
QuoteCONCAT('*:bytes=', `quota` * 1024*1024, 'B') AS 'userdb_quota_rule'
Have you noticed the 'B' in here? I think we could safely change this to 'M' (meaning that we could specify quotas from -2TB to 2TB with int, 0-4TB with biging). More than enough and no ugly quota*1024 hacks...
Good idea killburn
but wrong math afterwards...
int = -2*1024*1024*1024 .. +2*1024*1024*1024, so -2G ..+2G
or in decimal: -2*10^9 .. +2*10^9
with MB (= 10^6B) instead of B it's from -2 * 10^15 .. +2*10^15 which is -2Petabyte .. +2Petabyte
and with unsigned it's 0 .. 4Petabytes.... - which should be enough for mails...
/J
PS: we do not speak about mysql bigint... this would be toooo much...
I must have been drunk or something when I wrote that XD. First, you're totally right in that I made the calculation using Kb's instead of Mb's (which was my proposal of unit to use). Second, I wanted to refer to "unsigned int", not "big int" in the last part
stay cool
no need for school - you are member in the i-mscp forum