Enable Teach Spamassassin Problem

bens

New member
Joined
Jan 23, 2022
Messages
2
Hello,

I am trying to enable spamassassin learn as documented https://docs.directadmin.com/other-.../incoming-spam.html#how-to-teach-spamassassin

I am having some problems.

1. There is no sucs file as /usr/local/directadmin/custombuild/custom/systemd/spamassassin.service So i've modified the /etc/systemd/system/spamassassin.service file and add -l flag.

2. There is no directory at "For this edit to persist after updates, copy it to /usr/local/directadmin/custombuild/custom/dovecot/conf/". There is also no custom directory under /usr/local/directadmin/custombuild. So i created and copy the file.

The main problem is below:

3. I've created /usr/local/bin/dovecot-sieve/report-spam.sieve file as documented and when i run the command sievec report-spam.sieve it gives the error below:
report-spam: line 1: error: require command: unknown Sieve capability `vnd.dovecot.pipe'.
report-spam: line 1: error: require command: unknown Sieve capability `imapsieve'.
report-spam: line 7: error: unknown command 'pipe' (only reported once at first occurrence).
report-spam: error: validation failed.
sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'

The content of the file report-spam.sieve is below as documented:

require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];

if environment :matches "imap.user" "*" {
set "username" "${1}";
}

pipe :copy "sa-learn-spam.sh" [ "${username}" ];

Operating System: Ubuntu 20.04 LTS
DirectAdmin: 1.63.5

UPDATE:
Same error occurs after running "sievec report-ham.sieve" command

How can i enable sa-learn?
Thank you
 
SOLVED:

I don't know how but i tried to rebuild dovecot (./build dovecot) several times and the errors are fixed now.
 
Back
Top