<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Dovecot] Loadable module</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Hi Timo,</FONT>
</P>
<P><FONT SIZE=2>[snipped possible scenario's]</FONT>
</P>
<P><FONT SIZE=2>> OK. 3) is the best idea :) But it requires a few changes to </FONT>
<BR><FONT SIZE=2>> make it work.</FONT>
<BR><FONT SIZE=2>I wouldn't expect it to work out of the box :)</FONT>
</P>
<P><FONT SIZE=2>But if I read your suggestions right, you propose a "fixed" change in the maildir functions that call the quota update functions if necessary. So perhaps we should make a quota_enabled = yes|no flag int the config file, and use that? I would still be trying to make the quota update functions for you, and try to put them in.</FONT></P>
<P><FONT SIZE=2>> Actually, I think this is exactly how I want quota and ACLs </FONT>
<BR><FONT SIZE=2>> to be implemented. No extra interface changes for either one of them.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> For quota, you'd want to do something like:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> expunge(): nothing special, just update the quota file after expunges</FONT>
<BR><FONT SIZE=2>Expunge should recalculate the whole mailfolder?</FONT>
</P>
<P><FONT SIZE=2>> save_next(): Check data istream's size and if it's over quota, fail.</FONT>
</P>
<P><FONT SIZE=2>Ok. So this one can be "easy". Just check if mailsize + current usage < max_quota. :)</FONT>
</P>
<P><FONT SIZE=2>> copy(): this is somewhat problematic, if there wasn't the </FONT>
<BR><FONT SIZE=2>> maildir hardlinks you wouldn't have to touch it at all..</FONT>
</P>
<P><FONT SIZE=2>A copy can duplicate a message in the same store, but do hardlinks work on nfs? If not, we should add the message to the quota list. And maybe we should just add size of the email anyway, it won't be that much of a loss to the user, and it would save us a lot of checking. :)</FONT></P>
<P><FONT SIZE=2>And how about a user that has no quota file (yet), can we "recreate" them? Maybe do a quota lookup for the user (database or file)? This can be done using a module I guess, so it could be "user configurable".</FONT></P>
<P><FONT SIZE=2>Regards,</FONT>
</P>
<BR>
<P><FONT SIZE=2>Maikel Verheijen.</FONT>
</P>
</BODY>
</HTML>