failed to pipe to program sa-learn-spam.sh

@lbutlr kremels at kreme.com
Thu May 30 10:46:01 EEST 2019


Error: program `/usr/lib/dovecot/sieve/sa-learn-spam.sh' terminated abnormally, signal 11
Error: sieve: pipe action: failed to pipe message to program `sa-learn-spam.sh': refer to server log for more information. [2019-05-29 17:59:12]

What server log? This is all that get logged.

 # pwd
/usr/lib/dovecot/sieve

 # ls -lsa
> total 96
> 8 drwxrwxrwx  3 root     wheel  512 Jun 18  2018 .
> 8 drwxr-xr-x  3 root     wheel  512 May 17 17:54 ..
> 8 -rw-r--r--  1 root     wheel   86 Jun 15  2018 default.sieve
> 8 drwxr-xr-x  2 root     wheel  512 Jun 13  2018 global
> 8 -rw-r--r--  1 root     wheel   62 May 14  2018 mark-read.sieve
> 8 -rw-r--r--  1 kremels  wheel  192 Jun 17  2018 mark-read.svbin
> 8 -rwxr-xr-x  1 root     wheel  314 Feb 12  2018 report-ham.sieve
> 8 -rw-r--r--  1 lbutler  wheel  448 Jun 18  2018 report-ham.svbin
> 8 -rwxr-xr-x  1 root     wheel  199 Feb 12  2018 report-spam.sieve
> 8 -rw-r--r--  1 kreme    wheel  354 Jun 15  2018 report-spam.svbin
> 8 -rwxr-xr-x  1 root     wheel  131 Jun 18  2018 sa-learn-ham.sh
> 8 -rwxr-xr-x  1 root     wheel   54 Feb 12  2018 sa-learn-spam.sh

 # cat sa-learn-spam.sh 
> #!/bin/sh
> exec /usr/local/bin/sa-learn -u ${1} --spam

 #  ls -ls /usr/local/bin/sa-learn
> 96 -rwxr-xr-x  1 root  wheel  45939 May 29 09:59 /usr/local/bin/sa-learn

report-spam.sieve:
> require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];
> 
> if environment :matches "imap.user" "*" {
>   set "username" "${1}";
> }
> 
> pipe :copy "sa-learn-spam.sh" [ "${username}" ];

in doveconf I have:

> managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
> 
> plugin {
>   imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
>   imapsieve_mailbox1_causes = COPY
>   imapsieve_mailbox1_name = Junk
>
It WAS working.




-- 
Women and cats will do as they please, and men and dogs should relax an
get used to the idea.




More information about the dovecot mailing list