On Tuesday, October 21, 2003, at 12:50 PM, Jochen Schug wrote:
# quota for entire domain, in megabytes
# example shows a domain with a 100MB quota and a limit of 10,000 messages
#quota 100
Unless the behaviour changed, shouldn't this read 104857600 instead of 100?
Actually, that's a little inconsistency we have right now.
I checked my existing .qmailadmin-limits file for the values that are written by vmoddomlimits, that's where I got the 104857600 from.
maildirquota.c multiplies the number by 1024*1024, so it definitely considers it MB.
vmoddomlimits writes it out exactly as provided on the command line, which probably isn't a good idea now that we allow KB and MB modifiers (since if I say "-Q 100M", I want 100MB, not 100TB). The reason it's currently parsed, was in response to earlier bug reports that it wasn't (and it wasn't because it shouldn't have been).
I've updated vmoddomlimits to indicate that the -Q option is megabytes and -q is bytes. The -S options adds "MB" after the domain quota and "bytes" after the default user quota when displaying the information.
Ok, fair enough. But - again just my humble opinion - this introduces two different metrics the user/admin has to get right... changing the code in maildirquota.c so that it expects a value in bytes instead of megabytes, and consitent metrics for vmoddomlimits' -q and -Q options (incl. parsing of the latter) would be easier to handle.
A general question regarding domain limits: What would be the correct behaviour when I add a new domain and have the limits in ~vpopmail/etc/vlimits.default? Should a .qmaladmin-limits under the new domain, with the data from the default file, be created? Or should such a domain automatically refer to the data from default file (-> when I change the defaults, all existing domains with no .qmailadmin-limits are affected by the change)?
Current (and I think the expected) behavior is to not create a .qmailadmin-limits file. For sites that don't have domain-specific limits, this allows for easy updating of limits.
Exactly... this can be good or bad, depending on whether or not this is desired by the user. I really don't know what's better :) Maybe giving the user the choice (by adding another option to vadddomain) to copy or "symlink" the defaults would be a convenient solution.
I noticed that there's no .qmailadmin-limits file created when I add a new domain, but when I check the domain limits with vmoddomlimits -S, the default values from the time when I added the domain are shown (even when I edit the vlimits-default file in the meantime). Where do these values come from?
They come from ~vpopmail/etc/vlimits.default (not vlimits-default). I checked on my system, and after modifying vlimits.default, vmoddomlimits -S reported the updated values.
You're right - I tried it again, and it works as expected... don't know what I did before, I was pretty sure that I saw the behaviour as I stated above. Sorry for the false alarm.
Regards Jochen