Hi!
I'm quite new to Dovecot. helping my friend to migrate from Courier-IMAP to something more efficient, we are evaluating Dovecot at the moment.
I had to prepare 2 small patches for Dovecot to suit our needs, and I've decided to post it here. I'm not fully familiar with Dovecot architecture yet, I'd appreciate if someone could look if these changes make sense (i.e. doesn't break anything). And of course, maybe someone is interested as well.
- Customized "quota exceeded" message.
http://czajnick.sitenet.pl/dovecot/dovecot_1.0.9_quota_exceeded_message.diff
- quick hack to let me define custom message instead of typical "Quota exceeded", simply by using plugins { quota_exceeded_message = ... }. Browsing this mailing list I've seen some posts about such feature being implemented in Dovecot. Is it done in a similar way? Which stable version is the first to include this functionality?
- Sieve filter modification
http://czajnick.sitenet.pl/dovecot/dovecot_sieve_1.0.2_envscript_patch.diff
In our systems we currently use a modified maildrop MDA that picks the filter script from the database instead of the file. This has proven useful - end-user's administration panel doesn't need any special permissions (or networking capabilities), as it doesn't need to access the filesystem - it is reduced to a plain database web-app.
The patch above makes the delivery agent check for the sieve script present in SIEVE_SCRIPT environment variable. If this is the case, env var content is used instead of the script stored in a usual file pointed to by SIEVE variable. This makes it trivial to pass the script from the database using base dovecot functionality.
A minor drawback of such solution is that the script is re-compiled on each delivery, but I don't think it takes much time to compile a few lines of a script using (f)lex/bison-or-yacc parser. Yes, I've noticed the sieve-manage patch, but I don't want the complexity of managing sieve script over the socket connection (if my understanding of the script is wrong, please correct me).
BR, Przemyslaw