[Dovecot] [SOLVED] quota with: postfixadmin, postfix, mysql & dovecot

Peter Fern dovecot at obfusc8.org
Sun Oct 1 14:22:48 EEST 2006


Peter Veerman wrote:
> Marcus Jodorf wrote:
>   
>> But the real problem IMHO is not bytes vs. kilobytes (solution is very
>> simple as you showed above) but dovecot treating '0' values in the
>> database literally. All the other programs take '0' as unlimited quota
>> and therefore it's very easy to experience an unpleasant surprise with
>> dovecot-lda.
>>
>>     
> Luckily i don't have any users with unlimited quota so i did not ran in
> to this problem but, is there any solution to solve this in the (My)SQL
> query?
>
> Peter
>   


You could use an IF statement in your SQL query to return NULL if  = 0,
like:

IF(mailbox.quota = 0, NULL, ROUND( mailbox.quota / 1024 ) )) AS quota




More information about the dovecot mailing list