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

Timothy Benjamin Martin instanttim at mac.com
Sun Oct 1 07:15:52 EEST 2006


On Sep 30, 2006, at 7:47pm, 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.
>
> If you run postfixadmin as mentioned above you will probably  
> completely lock out all your users with unlimited quota. I could be  
> wrong here but IIRC postfixadmin uses '0' for unlimited/unset  
> quota, too.

Although I agree i've seen many systems use zero for "unlimited"  
wouldn't it be a bad assumption on dovecot's part? I would assume  
there be a boolean that defines if the user has a quota.

For awhile I had a database where zero did mean 'unset' but that in  
turn didn't mean 'unlimited' but rather was an indication that that  
user should follow the domain default quota. I made a rather nice  
query that evaluated and selected the greater of the domain or user  
quota. But that's neither here nor there.

I would think a quota returned to dovecot as a zero should really  
mean the account can't hold mail. If you want unlimited don't return  
a quota value at all, which would cause dovecot to fall back on it's  
default (which is easily defined as no quota at all).

FYI: as far as the bytes and kilobytes issue is concerned, my  
database has an integer for megabytes :P I had to multiply instead of  
divide.

.tim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dovecot.org/pipermail/dovecot/attachments/20060930/da2fef67/attachment-0001.htm 


More information about the dovecot mailing list