failed to pipe to program sa-learn-spam.sh
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.
Op 30-5-2019 om 9:46 schreef @lbutlr via dovecot:
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.
Output from dovecot -n is needed to answer this one. Does it crash when you invoke sa-learn-spam.sh manually from shell?
Regards,
Stephan.
# 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.
On Jun 4, 2019, at 1:43 PM, Stephan Bosch via dovecot dovecot@dovecot.org wrote:
Op 30-5-2019 om 9:46 schreef @lbutlr via dovecot:
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.
Output from dovecot -n is needed to answer this one. Does it crash when you invoke sa-learn-spam.sh manually from shell?
The last time this happened (march 2018) it filled up the mailq when someone dumped thousands of messages into Junk and after letting that clear and restarting dovecot, it started to work again. I was hoping for something similar since th configuration has not changed.
Invoking from the shell:
# /usr/lib/dovecot/sieve/sa-learn-spam.sh SpamAssassin version 3.4.2 Please select either --spam, --ham, --folders, --forget, --sync, --import, --dump, --clear, --backup or —restore
Mail debug output:
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: Mailbox Junk: Mailbox opened because: UID COPY
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: Mailbox INBOX: UID 17605: Opened mail because: copying
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: imapsieve: mailbox Junk: COPY event
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: imapsieve: Matched static mailbox rule [1]
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: file storage: Using Sieve script path: /usr/lib/dovecot/sieve/report-spam.sieve
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: file script: Opened script report-spam' from
/usr/lib/dovecot/sieve/report-spam.sieve'
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: Opening script 1 of 1 from /usr/lib/dovecot/sieve/report-spam.sieve' Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: Loading script /usr/lib/dovecot/sieve/report-spam.sieve Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: Script binary /usr/lib/dovecot/sieve/report-spam.svbin successfully loaded Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: binary save: not saving binary /usr/lib/dovecot/sieve/report-spam.svbin, because it is already stored Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: Executing script from
/usr/lib/dovecot/sieve/report-spam.svbin'
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: sieve: action pipe: running program: sa-learn-spam.sh
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: Mailbox Junk: UID 303742: Opened mail because: mail stream
Jun 06 04:43:24 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: waiting for program /usr/lib/dovecot/sieve/sa-learn-spam.sh' to finish after 0 msecs Jun 06 04:43:25 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Error: program
/usr/lib/dovecot/sieve/sa-learn-spam.sh' terminated abnormally, signal 11
Jun 06 04:43:25 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Error: sieve: pipe action: failed to pipe message to program `sa-learn-spam.sh': refer to server log for more information. [2019-06-06 04:43:25]
Jun 06 04:43:25 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Info: sieve: left message in mailbox 'Junk'
Jun 06 04:43:25 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-spam.sieve failed
Jun 06 04:43:26 imap(kreme)<87686><Dq6MXaWKcMdJDqGg>: Debug: imapsieve: mailbox Junk: FLAG event (changed flags: $Junk Junk)
Jun 06 04:43:26 imap(kreme)<87686><Dq6MXaWKcMdJDqGg>: Debug: imapsieve: mailbox Junk: FLAG event (changed flags: $NotJunk NotJunk)
Jun 06 04:43:26 imap(kreme)<86722><7vCHXaWKa8dJDqGg>: Debug: imapsieve: mailbox INBOX: FLAG event (changed flags: \Deleted)
I included the relevant lines from doveconf -n in the original post, but here is the whole thing.
# 2.3.6 (7eab80676): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.6 (92dc263a)
# OS: FreeBSD 11.2-RELEASE-p10 i386
# Hostname: mail.covisp.net
auth_failure_delay = 5 secs
auth_mechanisms = PLAIN LOGIN
default_client_limit = 4096
default_process_limit = 1024
default_vsz_limit = 768 M
disable_plaintext_auth = no
first_valid_uid = 89
imap_id_log = *
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_log_format_elements = user=<%u> %r %m %c
mail_location = maildir:~/Maildir
mail_max_userip_connections = 90
mail_plugins = " lazy_expunge acl"
managesieve_notify_capability = mailto
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
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
username_filter = !*@*
}
passdb {
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_name = Junk
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_name = *
imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve
imapsieve_mailbox3_causes = COPY
imapsieve_mailbox3_name = Archive
quota_rule2 = .EXPUNGED:ignore
sieve = file:~/.sieve;active=~/.active_sieve
sieve_default = /usr/lib/dovecot/sieve/default.sieve
sieve_default_name = spamassassin
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
}
service imap-login {
inet_listener imaps {
port = 993
ssl = yes
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
service stats {
unix_listener stats-reader {
group = dovecot
mode = 0666
user =
}
unix_listener stats-writer {
group = dovecot
mode = 0666
user =
}
}
ssl_cert =
On Jun 6, 2019, at 4:45 AM, @lbutlr via dovecot dovecot@dovecot.org wrote:
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = *
One other note, this sieve works just fine.
-- A closed mouth gathers no feet.
On Jun 6, 2019, at 1:03 PM, @lbutlr via dovecot dovecot@dovecot.org wrote:
On Jun 6, 2019, at 4:45 AM, @lbutlr via dovecot dovecot@dovecot.org wrote:
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = *
One other note, this sieve works just fine.
Hang on. I think this might be sa-learn that is crashing. Will report back after I sort that out (wi the help of the sa users list I hope).
-- I CANNOT ABSOLVE SINS Bart chalkboard Ep. AABF14
On Jun 6, 2019, at 1:18 PM, @lbutlr via dovecot dovecot@dovecot.org wrote:
Hang on. I think this might be sa-learn that is crashing.
Fixing sa-learn eliminated the error dovecot was reporting.
-- When the stars threw down their spears And watered heaven with their tears, Did He smile his work to see? Did He who made the Lamb make thee?
Hi @lbutlr,
----- Nachricht von "@lbutlr via dovecot" dovecot@dovecot.org --------- Datum: Thu, 6 Jun 2019 15:27:47 -0600 Von: "@lbutlr via dovecot" dovecot@dovecot.org Antwort an: "@lbutlr" kremels@kreme.com Betreff: Re: failed to pipe to program sa-learn-spam.sh An: "@lbutlr via dovecot" dovecot@dovecot.org
On Jun 6, 2019, at 1:18 PM, @lbutlr via dovecot dovecot@dovecot.org wrote:
Hang on. I think this might be sa-learn that is crashing.
Fixing sa-learn eliminated the error dovecot was reporting.
-- When the stars threw down their spears And watered heaven with their tears, Did He smile his work to see? Did He who made the Lamb make thee?
----- Ende der Nachricht von "@lbutlr via dovecot" dovecot@dovecot.org -----
(not only) just for the records: could you please tell us, how fixed
you sa-learn?
Thanks Christoph.
-- Christoph Haas
participants (3)
-
@lbutlr
-
Christoph Haas
-
Stephan Bosch