Hi, About one month ago, I sent a patch to this list to implement warnings when a user is close to reach his quota. I tried to follow Timo's advice to improve my code, and here (at last) is a new patch. Things I did not fix: - This patch is still for dovecot 1.0, as I will need warnings with dovecot 1.0. I may rewrite it for CVS HEAD in the future but can't promise. - I'm still using system() rather than fork()+exec()+waitpid() since I don't know a good time to run waitpid(). Comments are welcome. Timo, will you consider to add this to your unofficial patches? Cheers, Nicolas Boullis -------------- next part -------------- A non-text attachment was scrubbed... Name: dovecot_quota_warning.patch.gz Type: application/gzip Size: 2237 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20070331/f8b6c8f7/attachment-0002.bin>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicolas Boullis schrieb:> Hi, > > About one month ago, I sent a patch to this list to implement warnings > when a user is close to reach his quota. > > I tried to follow Timo's advice to improve my code, and here (at last) > is a new patch. Things I did not fix: > - This patch is still for dovecot 1.0, as I will need warnings with > dovecot 1.0. I may rewrite it for CVS HEAD in the future but can't > promise. > - I'm still using system() rather than fork()+exec()+waitpid() since I > don't know a good time to run waitpid(). > > Comments are welcome. > > Timo, will you consider to add this to your unofficial patches? > > > Cheers, > > Nicolas BoullisHi Nicolas, hi Timo, i would very welcome including this patch in the near future cause the function is wanted from from many of my users. For now i have written a shell script with cron to do something equal. Please do not see my wish as some kind of pressure to release it to the next stable cause i know you have a hard time to code it these days, but it would be nice to see it in the near future in dovecot. - -- Mit freundlichen Gruessen Best Regards Robert Schetterer https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGDuTGfGH2AvR16oERAjmqAJ9UWmPvX4BRKE7B09sf7h6MzmWQ2QCfV8LX QBTF4lrTMIByT6DqmKKVZus=ZVy5 -----END PGP SIGNATURE-----
On Sat, 2007-03-31 at 23:00 +0200, Nicolas Boullis wrote:> - I'm still using system() rather than fork()+exec()+waitpid() > since I > don't know a good time to run waitpid().struct child_wait * child_wait_new_with_pid(pid_t pid, child_wait_callback_t *callback, void *context); This would make it easy. That code is already written, but it's not in Dovecot's CVS yet. It would be useful also in dovecot-auth. Originally I was thinking about using the code to replace the waitpid() calls in master, but that change got a bit complex so I forgot about it then.> Timo, will you consider to add this to your unofficial patches?Added. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070402/268889bb/attachment.bin>
Timo Sirainen wrote:> On Sat, 2007-03-31 at 23:00 +0200, Nicolas Boullis wrote: > > >> - I'm still using system() rather than fork()+exec()+waitpid() >>since I >> don't know a good time to run waitpid(). > > > struct child_wait * > child_wait_new_with_pid(pid_t pid, child_wait_callback_t *callback, > void *context); > > This would make it easy. That code is already written, but it's not in > Dovecot's CVS yet. It would be useful also in dovecot-auth. Originally I > was thinking about using the code to replace the waitpid() calls in > master, but that change got a bit complex so I forgot about it then.OK, then I guess I should consider it when I do the porting to current CVS HEAD. Right? By the way, any documentation I should read about quota setups, quota rules, and quota roots for IMAP? When I had a look at the quota backport for 1.0, I failed to understand how things work together...>>Timo, will you consider to add this to your unofficial patches? > > Added.Does this mean it looks good enough for you and you have nothing to criticize? Wow! Cheers, -- Nicolas Boullis Ecole Centrale Paris
On Sat, 2007-03-31 at 23:00 +0200, Nicolas Boullis wrote:> Hi, > > About one month ago, I sent a patch to this list to implement warnings > when a user is close to reach his quota. > > I tried to follow Timo's advice to improve my code, and here (at last) > is a new patch. Things I did not fix: > - This patch is still for dovecot 1.0, as I will need warnings with > dovecot 1.0. I may rewrite it for CVS HEAD in the future but can't > promise.Quota warnings are now in v1.1 tree: http://hg.dovecot.org/dovecot/rev/6edca218d48a I ended up rewriting all of your code, but it still helped a lot. :) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070716/bb38fb65/attachment-0002.bin>