I realize this thread has not been updated in over a year. This information needs to be upgraded from "suggestions" to an actual working tutorial. Its not clear from going all the way through the thread if this method with the "sa-learn.cgi" actually works for anyone. It doesn't work for me - I get a server misconfiguration error.
I'm not an expert on perl, but I think the problem may be that there is no /usr/ directory for my account. It looks like the cgi script is trying to go to the spam assassin executable, and I can't tell where that is.
What do these lines do:
my $salearn = "/usr/bin/sa-learn";
$|;
Regards, Andy