Jens Rey
2019-Nov-16 23:51 UTC
Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
Hello, I am trying to get rspam to learn what is spam and what is ham. After following the IMAPSieve guide in the dovecot wiki (https://wiki2.dovecot.org/HowTo/AntispamWithSieve), the mail.log shows the following, whenever I move a mail from the Spam folder to my inbox and vice versa: sieve: Opening script 1 of 1 from `/usr/lib/dovecot/sieve/report-ham.sieve' sieve: Loading script /usr/lib/dovecot/sieve/report-ham.sieve sieve: Script binary /usr/lib/dovecot/sieve/report-ham.svbin successfully loaded sieve: binary save: not saving binary /usr/lib/dovecot/sieve/report-ham.svbin, because it is already stored sieve: Executing script from `/usr/lib/dovecot/sieve/report-ham.svbin' sieve: action pipe: running program: sa-learn-ham.sh Mailbox INBOX: Opened mail UID=2996 because: mail stream Debug: waiting for program `/usr/lib/dovecot/sieve/sa-learn-ham.sh' to finish after 0 msecs Error: program `/usr/lib/dovecot/sieve/sa-learn-ham.sh' terminated abnormally, signal 11 Error: sieve: pipe action: failed to pipe message to program `sa-learn-ham.sh': refer to server log for more information. [2019-11-17 00:39:33] Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-ham.sieve failed My relevant dovecot configuration: plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * sieve = file:/var/vmail/sieve/%d/%n/scripts;active=/var/vmail/sieve/%d/%n/active-script.sieve sieve_before = /var/vmail/sieve/global/spam-global.sieve sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } $ dovecot --version 2.2.27 (c0f36b0) $ ls -l /usr/lib/dovecot/sieve/ total 24 -rw-r--r-- 1 root root 314 Nov 17 00:25 report-ham.sieve -rw-r--r-- 1 root root 448 Nov 17 00:30 report-ham.svbin -rw-r--r-- 1 root root 199 Nov 17 00:25 report-spam.sieve -rw-r--r-- 1 root root 354 Nov 17 00:30 report-spam.svbin -rwxr-xr-x 1 root root 41 Nov 17 00:32 sa-learn-ham.sh -rwxr-xr-x 1 root root 42 Nov 17 00:32 sa-learn-spam.sh $ cat sa-learn-ham.sh #!/bin/sh exec /usr/bin/rspamc learn_ham When I execute the script manually, it seems to work: $ cat [some-mail] | /usr/lib/dovecot/sieve/sa-learn-ham.sh Results for file: stdin (0.011 seconds) success = true; filename = "stdin"; scan_time = 0.012000; Again, with the same mail: $ cat [some-mail] | /usr/lib/dovecot/sieve/sa-learn-ham.sh Results for file: stdin (0.000 seconds) error = "<some-mail> has been already learned as ham, ignore it"; filename = "stdin"; scan_time = 0.0; Any ideas what causes the abnormal temrination of the script? Regards, Jens
Benny Pedersen
2019-Nov-17 00:22 UTC
Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
Jens Rey via dovecot skrev den 2019-11-17 00:51:> $ cat sa-learn-ham.sh > #!/bin/sh > exec /usr/bin/rspamc learn_hamrspamc is not spamc is rspamd installed ?, is spamassassn installed ? make sa-laern-ham.sh change name to rspamd-learn-ham.sh and addopt sieve to that name change i cant se other error on what you have
Jens Rey
2019-Nov-17 07:45 UTC
Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
> make sa-laern-ham.sh change name to rspamd-learn-ham.sh and addopt sieve > to that name changeI thought about the same thing while following the wiki guide. But in the end it's just the name of a bash script. Now I changed it as you proposed, since it just makes more sense, but the error remains: Error: program `/usr/lib/dovecot/sieve/rspamd-learn-ham.sh' terminated abnormally, signal 11 Error: sieve: pipe action: failed to pipe message to program `rspamd-learn-ham.sh': refer to server log for more information. [2019-11-17 08:35:58] Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-ham.sieve failed
Reasonably Related Threads
- Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
- Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
- Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
- Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11
- Learning ham/spam with IMAPSieve: sa-learn-ham.sh terminated abnormally, signal 11