https://spamassassin.apache.org/full/3.1.x/doc/spamc.html says: -L learn type Send message to spamd for learning. The learn type can be either spam, ham or forget. The exitcode for spamc will be set to 5 if the message was learned, or 6 if it was already learned.
Note that the spamd must run with the --allow-tell option for this to work. But when I run: spamc -L ham --max-size=2000000 <filename I get as output: Message was already un/learned But as exit code 0 I get while if the documentation is correct it should be 6. I tried adding -x and -E, but this did not change anything. Is the documentation wrong, or is something going wrong? I am on Debian 12 and the version is: SpamAssassin Client version 4.0.0 compiled with SSL support (OpenSSL 3.0.8 7 Feb 2023) I am running spamc as a non root user. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof