SA Bugzilla – Bug 6409
Plugin TextCat Breaks SpamAssassin on Win2003
Last modified: 2011-10-29 01:53:51 UTC
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"); } }
Are you sure this is a problem regarding Textcat or may it be possible that something else is corrupted with your Perl distribution? Did you turn on debug flag and investigated if there were any other serious warnings like failing plugins or so? I wasn't able to reproduce it since I use ActivePerl, so this is what output from 3.3.1 looks for me: Apr 15 08:37:33.761 [3984] dbg: plugin: loading Mail::SpamAssassin::Plugin::TextCat from @INC Apr 15 08:37:33.772 [3984] dbg: textcat: loading languages file... Apr 15 08:37:33.822 [3984] dbg: textcat: loaded 73 language models [...] Apr 15 08:37:34.511 [3984] dbg: plugin: Mail::SpamAssassin::Plugin::TextCat=HASH(0x53402c0) implements 'extract_metadata', priority 0 Apr 15 08:37:34.511 [3984] dbg: message: ---- MIME PARSER START ---- Apr 15 08:37:34.511 [3984] dbg: message: parsing normal part Apr 15 08:37:34.512 [3984] dbg: message: ---- MIME PARSER END ---- Apr 15 08:37:34.512 [3984] dbg: message: no encoding detected Apr 15 08:37:34.512 [3984] dbg: textcat: classifying, skipping: yi sco lv is bs sl la ga sa eu et rm cy eo fy gd lt Apr 15 08:37:34.534 [3984] dbg: textcat: can't determine language uniquely enough Apr 15 08:37:34.534 [3984] dbg: textcat: X-Languages: "", X-Languages-Length: 3411 Daniel
Closing as Daniel could not replicate with no feedback from the original reporter.