spamvoll at googlemail.com
2018-Jul-30 21:45 UTC
[SIEVE] pipe :copy to external program with arguments
Hi all, quick questions about sieve pipe: I want to pipe spam messages to an external program with additional parameters my spamlearn.sieve script: require ["vnd.dovecot.pipe", "copy", "imapsieve"]; pipe :copy "mybin" ["-h 127.0.0.1:44444" , "markspam"]; I also tried: pipe :copy "mybin" ["-h 127.0.0.1:44444 markspam"]; pipe :copy "mybin" ["-h 127.0.0.1:44444"] ["markspam"]; pipe :copy :args ["-h 127.0.0.1:44444 markspam"] "mybin" ; It never executes correct, it always ends with: Error: sieve: Execution of script /my/path/to/spamlearn.sieve failed So whats the correct syntax ? What works is a single argument: pipe :copy "myscript" ["markspam"]; Dovecot Version 2.3.2.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180730/3e58aad5/attachment.html>
On 31.07.18 0:45, spamvoll at googlemail.com wrote:> Hi all, > > quick questions about sieve pipe: > I want to pipe spam messages to an external program with additional > parameters > > my spamlearn.sieve script: > > require ["vnd.dovecot.pipe", "copy", "imapsieve"]; > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444>" , > "markspam"]; > > I also tried: > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444> > markspam"]; > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444>"] > ["markspam"]; > pipe :copy :args ["-h 127.0.0.1:44444 <http://127.0.0.1:44444> > markspam"] "mybin" ; > > It never executes correct, it always ends with: > Error: sieve: Execution of script /my/path/to/spamlearn.sieve failed > > So whats the correct syntax ? > > What works is a single argument: > pipe :copy "myscript" ["markspam"]; > > Dovecot Version 2.3.2.1My spam script is executed with: pipe :copy "sa-learn-sieve.sh" ["spam", "${username}", "${message}"]; The latter two arguments are variables in the sieve script. Good luck, Reio -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180731/d2e991d3/attachment.html>
Op 30/07/2018 om 23:45 schreef spamvoll at googlemail.com:> Hi all, > > quick questions about sieve pipe: > I want to pipe spam messages to an external program with additional > parameters > > my spamlearn.sieve script: > > require ["vnd.dovecot.pipe", "copy", "imapsieve"]; > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444>" , > "markspam"]; > > I also tried: > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444> > markspam"]; > pipe :copy "mybin" ["-h 127.0.0.1:44444 <http://127.0.0.1:44444>"] > ["markspam"]; > pipe :copy :args ["-h 127.0.0.1:44444 <http://127.0.0.1:44444> > markspam"] "mybin" ; > > It never executes correct, it always ends with: > Error: sieve: Execution of script /my/path/to/spamlearn.sieve failed > > So whats the correct syntax ? > > What works is a single argument: > pipe :copy "myscript" ["markspam"];What usually helps debugging is enabling mail_debug=yes, or using the sieve-test tool with -D. Regards, Stephan. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180802/010c6074/attachment.html>