[Dovecot] Plugin execution order and Sieve

Charly cc at alinto.net
Mon Sep 6 17:10:20 EEST 2010


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.


More information about the dovecot mailing list