[Dovecot] Group-based filesystem quota

Scott Alter scott at symphonyhosting.com
Tue Jun 20 07:16:49 EEST 2006


Hello.  After using Dovecot for over a year, I have just started 
experimenting with the filesystem quotas, and I have a suggestion for 
improvement.  On my mail server, I use group-based quotas, and would 
like to have Dovecot be able to report these quotas.

It should be simple to implement, requiring only changes to the 
quota-fs.c file of the quota plugin.  Simply changing USRQUOTA to 
GRPQUOTA should do the trick.  In terms of the configuration file, 
"quota = fs" could be expanded to something like:
quota = fs:storage=group    # use filesystem quota with group storage limit

Adding in support for message (inode) limits is just as easy, replacing 
dqb_curblocks with dqb_curinodes and dqb_bsoftlimit with 
dqb_isoftlimit.  It could be easy to configure too, like:
quota = fs:storage=group:messages=user    # use filesystem quota with 
group storage limit and user messages limit

Although I think I know what would need to be changed, I'm not a C 
programmer and my code would not be clean nor efficient.  Since the 
messages and storage parameters of the quota setting are defined 
elsewhere (quota-maildir.c), I don't think it would be too difficult to 
duplicate this in the quota-fs.c file.


Also, I am having the same problem as others with used space off by a 
factor of 4096, total limit off by a factor of 4.  Stian's patch 
(http://dovecot.org/list/dovecot/2006-June/014159.html) does the trick, 
but I'm wondering if everyone is having this problem, or just those 
running Linux.

Thanks,
Scott


More information about the dovecot mailing list