[Dovecot] Plugin execution order and Sieve
Hello, I use dovecot 2.0.1 and pigeonhole Sieve (version of August), I try to create a deliver plugin (lda or lmtp), but if I declare, in addition to my plugin, sieve, sieve is called first, and my plugin is never called. I tried to change the order of declaration of plugins, but nothing changes. If I remove Sieve, my plugin is properly called. protocol lmtp { #mail_plugins = $mail_plugins myplugin sieve ## sieve called first, my plugin is never called #mail_plugins = $mail_plugins sieve myplugin ## sieve called first, my plugin is never called mail_plugins = $mail_plugins myplugin ## my plugin is called } I try to patch Pigeonhole Sieve to call other plugin at the end of execution with : --- dovecot-2-0-pigeonhole-d51650c8af85/src/plugins/lda-sieve/lda-sieve-plugin.c.next_deliver 2010-08-23 19:26:12.000000000 +0200 +++ dovecot-2-0-pigeonhole-d51650c8af85/src/plugins/lda-sieve/lda-sieve-plugin.c 2010-09-02 11:48:22.000000000 +0200 @@ -775,7 +775,8 @@ } T_END; - return ret; + //return ret; + return next_deliver_mail(mdctx,storage_r); } /* With this patch, my plugin is called, but, always AFTER Sieve... How can I call my plugin before Sieve and do I need to patch Pigeonhole Sieve ? Thank you, Charly.
On Mon, 2010-09-06 at 16:10 +0200, Charly wrote:
dovecot-2-0-pigeonhole-d51650c8af85/src/plugins/lda-sieve/lda-sieve-plugin.c 2010-09-02 11:48:22.000000000 +0200 @@ -775,7 +775,8 @@
} T_END;
- return ret; + //return ret; + return next_deliver_mail(mdctx,storage_r);
I think that's a bug.
How can I call my plugin before Sieve and do I need to patch Pigeonhole Sieve ?
It ordering is based on the filename. Note that Pigeonhole plugin is called lib90_sieve_plugin. Because of the ugly hooking mechanism you probably need to call yours after Pigeonhole, so try naming yours lib91_mysieve_plugin.
Thank you Timo, it works if I rename my plugin lib91. My plugin is called first and I call next_deliver_plugin at the end of my plugin execution. Charly. Le 06/09/2010 16:32, Timo Sirainen a écrit :
On Mon, 2010-09-06 at 16:10 +0200, Charly wrote:
dovecot-2-0-pigeonhole-d51650c8af85/src/plugins/lda-sieve/lda-sieve-plugin.c 2010-09-02 11:48:22.000000000 +0200 @@ -775,7 +775,8 @@
} T_END;
- return ret; + //return ret; + return next_deliver_mail(mdctx,storage_r);
I think that's a bug.
How can I call my plugin before Sieve and do I need to patch Pigeonhole Sieve ?
It ordering is based on the filename. Note that Pigeonhole plugin is called lib90_sieve_plugin. Because of the ugly hooking mechanism you probably need to call yours after Pigeonhole, so try naming yours lib91_mysieve_plugin.
participants (2)
-
Charly
-
Timo Sirainen