https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6409

           Summary: Plugin TextCat Breaks SpamAssassin on Win2003
           Product: Spamassassin
           Version: 3.3.1
          Platform: PC
        OS/Version: Windows 2003
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Attempts to use SpamAssassin on Win2003 break with plugin TextCat on Strawberry
Perl.

Steps to recreate
1. install strawberry perl
2. cpan install Mail::SpamAssassin
3. A default install has all the conf and shared files in
c:\strawberry\perl\site\

sa-learn is broken and spamc is broken by this issue. I did not try other
applications.

It produces a number of errors:

textcat: languages filename not defined

textcat: no language models loaded

Digging around in the plugin, it looks like it cannot find the path to the
languages file.  In Win2003+Strawberry Perl it's
c:\strawberry\perl\site\usr\share\spamassassin\language

Attempts to force the path eliminate the "languages filename not defined"
error, but still the plugin reports "no language models loaded" with a properly
configured language file.

If you hare having the same problem, a very quick and dirty hack follows.
  if (! @nm) {
    warn "textcat: no language models loaded\n";
    if ($^O eq 'MSWin32') {
    $ngram->{"language"} = "en";
     push (@nm, $ngram);
     warn "forced load of en because TextCat doesn't work on Win32 \n";
    }
    } else {
    dbg("textcat: loaded " . scalar(@nm) . " language models");
  }
}

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to