spamassassin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzilla-dae...@bugzilla.spamassassin.org
Subject [Bug 5740] New: It is impossible to report (to remote service) a message via spamc if bayes is disabled
Date Wed, 05 Dec 2007 18:38:30 GMT
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5740

           Summary: It is impossible to report (to remote service) a message
                    via spamc if bayes is disabled
           Product: Spamassassin
           Version: 3.2.1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: spambugz@lelik.org


spamassasin has a -r option to report message as spam (or ham). By default it
also calls learn method which fails if bayes is disabled. This may be disabled
by setting bayes_learn_during_report to 0. 
spamc has -C option for the same purpose, but it will never work if bayes is
disabled. spamc always sets set_remote and set_local flags, and spamd always
calls learn() if set_local flag is set - so bayes_learn_during_report option is
not checked and spamd fails with 'Can't call method "learn" on an undefined
value'. workaround is to comment following code in spamd, but this is ugly.

#  if ($hdrs->{set_local}) {
#    my $status = $spamtest->learn($mail, undef, ($hdrs->{message_class} eq
'spam' ? 1 : 0), 0);

#    push(@did_set, 'local') if ($status->did_learn());
#    $status->finish();
#  }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message