https://docs.directadmin.com/other-.../incoming-spam.html#how-to-teach-spamassassin does not mention the sa-learn-ham.sh script
I love ham...learn-ham
#!/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}"
Check docs:But if anyone has a version of the 'sa-learn-ham.sh' script, please do share![]()
Hi Richard,Check docs:
point 10.
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.
IMAPSieve - permission issues (learn from user)
I have followed the tutorial at https://docs.directadmin.com/other-hosting-services/preventing-spam/incoming-spam.html#how-to-enable-pigeonhole and modified the last 2 shell scripts to be used for rspamd instead of spamassassin - as I want to teach rspamd from user input (when moving emails to...forum.directadmin.com
Otherwise... calling in friends... @bdacus01 oh you changed your name to @factor now? Do one has to create that ham script?
@k1l0b1t ?
I am a ghost writer now... HAHA@bdacus01 oh you changed your name to @factor now?
Yes correct.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}"
/usr/bin/spamc -h
-L, --learntype learntype
Learn message as spam, ham or forget to
forget or unlearn the message.
My findings are this: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