On 17.04.18 13:11, Reio Remma wrote:
On 17.04.18 12:40, Reio Remma wrote:
On 17.04.18 12:38, Aki Tuomi wrote:



On 17.04.2018 12:36, Reio Remma wrote:
Hello!

I noticed SpamAssassin spamc usage has entered the documentation at https://wiki2.dovecot.org/HowTo/AntispamWithSieve

I'm wondering if the -C (report) option in sa-learn-ham.sh  should use revoke instead of report for --ham messages?

I started using imapsieve with spamc myself just a few weeks ago, but I haven't used the reporting ability yet.

Reio


Hi!

As the warning says, the scripts are untested. If you are able to test them and provide modified versions, or confirm they work it would be really welcome input!

Aki

The trouble is the revoke option for spamc is largely undocumented. :( I'll have a look at it anyway.

Thanks,
Reio

Okay, while the man page for spamc is unclear, spamc --help states that:
-C, --reporttype reporttype
    Report message to collaborative filtering databases.
    Report type should be 'report' for spam or 'revoke' for ham.

I've no idea why they can't pick that automatically. :) Off to testing.

Reio

Okay. The are two ways to do this - either learning (without reporting) or reporting (which includes learning).

--learntype=spam/ham and --reporttype=report/revoke are mutually exclusive.

The docs currently have:
sa-learn-spam.sh:
exec /usr/bin/spamc -u ${1} -L spam -C report

sa-learn-ham.sh:
exec /usr/bin/spamc -u ${1} -L ham -C report
For learning they should be:
sa-learn-spam.sh:
exec /usr/bin/spamc -u ${1} --learntype=spam

sa-learn-ham.sh:
exec /usr/bin/spamc -u ${1} --learntype=ham
For reporting (with learning included):
sa-learn-spam.sh:
exec /usr/bin/spamc -u ${1} --reporttype=report # SPAM

sa-learn-ham.sh:
exec /usr/bin/spamc -u ${1} --reporttype=revoke # HAM
Good luck, Reio