Greetings I'm currently working on a design, to integrate an IMAP server into our existing mail architecture. It's proving to be a difficult exercise, mainly because of how we structure our quotas. In our system, the quota covers more than just email. We have a single quota that covers email, ftp directory, and personal homepage. The quota is stored in a mysql database, in a werid table structure. The quota allocation is stored against the user, while the quota usage is stored in 3 rows per user, in a seperate table; One row each for www, email, and ftp per user. I'm currently trying to figure out how we could integrate this quota into Dovecot. I'm quite happy to write plugin to handle updating the quota in our system, but I have no idea where to start. Any information you could provide on updating a quota in a third party system would be much appreciated. Thanks for you help. Andrew andrew at myinternet.com.au -- "If we don't have time to do it correctly now, will we have time to do it over once it's broken?" http://www.ranum.com/security/computer_security/editorials/dumb/
On Wed, 2006-03-29 at 12:16 +1000, Andrew Barrow wrote:> In our system, the quota covers more than just email. We have a single quota > that covers email, ftp directory, and personal homepage. The quota is stored > in a mysql database, in a werid table structure. The quota allocation is > stored against the user, while the quota usage is stored in 3 rows per user, > in a seperate table; One row each for www, email, and ftp per user. > > I'm currently trying to figure out how we could integrate this quota into > Dovecot. I'm quite happy to write plugin to handle updating the quota in our > system, but I have no idea where to start. Any information you could provide > on updating a quota in a third party system would be much appreciated.There's quota-dict plugin which should help you get started. Maybe the easiest way to handle this would be to change lib-dict/dict-sql.c's SQL statements to the ones you need. Less kludgy way would be to make dict-sql more configurable. :) There's some information about quota-dict in http://wiki.dovecot.org/LDA#head-41deec4958e7d40a03bfc1b63ffe4b829fc87af1