Autolearn documentation missing report ham script

Now that I've tried this for over a week now, I dont think any of the documentation works. I have over 2000+ spam messages in my spam folder, and none of the repetitive spams get marked as spam, and spamassassin isnt learning anything after viewing the results from the sa-learn --dump data. But venturing out to different instructions I've found on setting up learnspam, I got it working, though I have to manually enter the mailbox for sa-learn to work. sa-learn --spam /path/to/spam/folder
Debian 11.7
 
Last edited:
Hi tristan,

Good idea, thank you for the suggestion. Will place it there, too.
But if anyone has a version of the 'sa-learn-ham.sh' script, please do share :)

I assume it would be this:


Bash:
#!/bin/bash
# you can also use tcp/ip here, consult spamc(1)
inputmail=`/usr/bin/cat`
ddomain=`/usr/bin/echo "${1}"| /usr/bin/cut -d'@' -f2`
dusername=`/usr/bin/egrep "^${ddomain}:" /etc/virtual/domainowners| /usr/bin/cut -d' ' -f2`
exec /usr/bin/spamc -u ${dusername} -L ham <<< "${inputmail}"
 
Last edited:
Hello Indominus.

I'm sorry, you are correct. I don't use that option myself but I'm trying to help.
Could it be that the pipe command just creates that file? So it can be used by the other script?

I've found something, maybe of use to you.

Otherwise... calling in friends... @bdacus01 oh you changed your name to @factor now? Do one has to create that ham script?
@k1l0b1t ?
 
Thanks Richard! Always appreciate you helping people on the forum here :)
Hello Indominus.

I'm sorry, you are correct. I don't use that option myself but I'm trying to help.
Could it be that the pipe command just creates that file? So it can be used by the other script?

I've found something, maybe of use to you.

Otherwise... calling in friends... @bdacus01 oh you changed your name to @factor now? Do one has to create that ham script?
@k1l0b1t ?
 
Bash:
#!/bin/bash
# you can also use tcp/ip here, consult spamc(1)
inputmail=`/usr/bin/cat`
ddomain=`/usr/bin/echo "${1}"| /usr/bin/cut -d'@' -f2`
dusername=`/usr/bin/egrep "^${ddomain}:" /etc/virtual/domainowners| /usr/bin/cut -d' ' -f2`
exec /usr/bin/spamc -u ${dusername} -L ham <<< "${inputmail}"
Yes correct.
Help (-h) is your friend.
Code:
/usr/bin/spamc -h

All -L does is tell
Code:
 -L, --learntype learntype
                      Learn message as spam, ham or forget to
                      forget or unlearn the message.

There is also this on the Wayback machine.

Its real old but could still be made to work.
 
I know how to use the help function, thank you.
Does not mean per definition that is all what was added to the script, and imho it would be nice to have a up-to-date documentation on the subject.
 
Now that I've tried this for over a week now, I dont think any of the documentation works. I have over 2000+ spam messages in my spam folder, and none of the repetitive spams get marked as spam, and spamassassin isnt learning anything after viewing the results from the sa-learn --dump data. But venturing out to different instructions I've found on setting up learnspam, I got it working, though I have to manually enter the mailbox for sa-learn to work. sa-learn --spam /path/to/spam/folder
Debian 11.7
My findings are this:

If you train SA with sa-learn for about 3 years, you'll finally see a result. That result? False positives that force you to delete the learning.

Bayesian learning is not appropriate in 2023. It just isn't.
 
Back
Top