Hi All. I am developing plugin for Dovecot. And I needs for read some configuration file at startup and store configuration in application wide variable. As I see the plugin_init() method calls multiple times and allocates plugin's variables each time. Could you suggest better way to store variable in application context. Thank you Valery Gorbunov
On 8.2.2010, at 17.40, Valery Gorbunov wrote:> I am developing plugin for Dovecot. And I needs for read some configuration file at startup > and store configuration in application wide variable. As I see the plugin_init() method calls > multiple times and allocates plugin's variables each time. Could you suggest better way to > store variable in application context.plugin_init() is called once for every process (and a separate process is created for each connection). If you want to share state between multiple processes, you need to use files or something else.
Hi All I needs to write plugin which converting messages by replacing entier message by one of parts of this message. In another words I need show part of multipart message instead entire message. Stream substitution in *mail->v.get_stream()* function gives incorrect results because mail indexed and cached before. Therefore I should wrap email during indexing too. something like: ----- struct index_transaction_context * it; it->ibox->mail_vfuncs->get_stream = convert_get_stream; ----- Is it enough or idea to replace mail stream by another will don't work anyway? Could you suggest how to show one mail instead another in Dovecot environment? Thank you Valery Gorbunov