<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Op 30/07/2018 om 23:45 schreef
<a class="moz-txt-link-abbreviated" href="mailto:spamvoll@googlemail.com">spamvoll@googlemail.com</a>:<br>
</div>
<blockquote type="cite"
cite="mid:CAHOVZaJDu2NJBwHzj1zYrUXU-G19FW1CcouAUK7h4_6xXH6SYg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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 href="http://127.0.0.1:44444"
moz-do-not-send="true">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 href="http://127.0.0.1:44444"
moz-do-not-send="true">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 href="http://127.0.0.1:44444"
moz-do-not-send="true">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 href="http://127.0.0.1:44444"
moz-do-not-send="true">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>
</span></div>
</div>
</blockquote>
<br>
What usually helps debugging is enabling mail_debug=yes, or using
the sieve-test tool with -D.<br>
<br>
Regards,<br>
<br>
Stephan.<br>
<br>
</body>
</html>