<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 31.07.18 0:45,
<a class="moz-txt-link-abbreviated" href="mailto:spamvoll@googlemail.com">spamvoll@googlemail.com</a> wrote:<br>
</div>
<blockquote
cite="mid:CAHOVZaJDu2NJBwHzj1zYrUXU-G19FW1CcouAUK7h4_6xXH6SYg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>quick questions about sieve pipe:</div>
<div>I want to pipe spam messages to an external program with
additional parameters</div>
<div><br>
</div>
<div>my spamlearn.sieve script:</div>
<div><br>
</div>
<div>
<div>require ["vnd.dovecot.pipe", "copy", "imapsieve"];</div>
<div>pipe :copy "mybin" ["-h <a moz-do-not-send="true"
href="http://127.0.0.1:44444">127.0.0.1:44444</a>" ,
"markspam"];</div>
</div>
<div><br>
</div>
<div>I also tried:</div>
<div>
<span
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">pipe
:copy "mybin" ["-h <a moz-do-not-send="true"
href="http://127.0.0.1:44444">127.0.0.1:44444</a>
markspam"];</span>
<br>
</div>
<div>
<span
style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">pipe
:copy "mybin" ["-h <a moz-do-not-send="true"
href="http://127.0.0.1:44444">127.0.0.1:44444</a>"]
["markspam"];</span><br>
</div>
<div><span
style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline"><span
style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">pipe
:copy :args ["-h <a moz-do-not-send="true"
href="http://127.0.0.1:44444">127.0.0.1:44444</a>
markspam"] <span
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">"mybin"</span>
;</span><span
style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br>
</span></div>
<div><span
style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline"><br>
</span></div>
<div><span
style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">It
never executes correct, it always ends with:</span></div>
<div><span
style="text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">
<div>
<span
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Error:
sieve: Execution of script /my/path/to/spamlearn.sieve</span>
failed</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">So whats the correct syntax ?</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">What works is a single
argument:</div>
<div style="font-size:small">
<span
style="text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">pipe
:copy "myscript" ["<span
style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">markspam</span>"];</span><span
style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br>
</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">Dovecot Version 2.3.2.1</div>
</span></div>
</div>
</blockquote>
<br>
My spam script is executed with:<br>
<br>
pipe :copy "sa-learn-sieve.sh" ["spam", "${username}",
"${message}"];<br>
<br>
The latter two arguments are variables in the sieve script.<br>
<br>
Good luck,<br>
Reio<br>
</body>
</html>