Bug 2469 - SA 2.60 chokes on messages without Message-ID
Summary: SA 2.60 chokes on messages without Message-ID
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other NetBSD
: P3 normal
Target Milestone: 2.60
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
: 2152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-16 16:32 UTC by Klaus Heinz
Modified: 2003-09-18 13:07 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
message which triggers the error message/rfc822 None Klaus Heinz [HasCLA]
suggested patch for the "one true way"(tm) patch None Theo Van Dinter [HasCLA]
suggested patch patch None Theo Van Dinter [HasCLA]
fixed a few buglets patch None Theo Van Dinter [HasCLA]
new suggested patch patch None Theo Van Dinter [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Heinz 2003-09-16 16:32:02 UTC
SA 2.60-rc4 and -rc5 both show the following error (I didn't test older versions):

  ...
  debug: bayes: found bayes db version 2
  debug: Score set 3 chosen.
  debug: Initialising learner
  Use of uninitialized value in substitution (s///) at /usr/pkg/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin.pm   line 442.
  debug: Learning Spam
  debug: uri tests: Done uriRE
  ...

Both messages where I saw this didn't have a "Message-ID" which explains, why line 442
  $TIMELOG->{mesgid} =~ s#/#-#g;
doesn't work.

ciao
     Klaus
Comment 1 Klaus Heinz 2003-09-16 16:35:52 UTC
Created attachment 1388 [details]
message which triggers the error
Comment 2 Theo Van Dinter 2003-09-16 19:35:37 UTC
this seems very related to my bug 2152 ...

I'm seeing if I can't get a generic patch done up now which doesn't really solve 
2152, but should make M::SA::Bayes->get_msgid() the "one true way"(tm) of 
getting Message-Id WRT bayes...
Comment 3 Theo Van Dinter 2003-09-16 19:43:02 UTC
Created attachment 1389 [details]
suggested patch for the "one true way"(tm)
Comment 4 Theo Van Dinter 2003-09-16 21:35:48 UTC
moving to 2.60
Comment 5 Theo Van Dinter 2003-09-16 21:37:38 UTC
*** Bug 2152 has been marked as a duplicate of this bug. ***
Comment 6 Theo Van Dinter 2003-09-17 13:25:15 UTC
Created attachment 1393 [details]
suggested patch

after discussing things with quinlan, I hacked through and removed the
message-id passing and such...

The attached message doesn't cause any uninitialized value warnings now, and
properly gets learned (it did before too) with a generated msgid:

debug: bayes: Learned '72c4e142e4f87d1289b6cc9f5215f0af4e9d5d1f@sa_generated'
Comment 7 Theo Van Dinter 2003-09-17 14:09:44 UTC
Created attachment 1394 [details]
fixed a few buglets
Comment 8 Theo Van Dinter 2003-09-17 20:16:44 UTC
Created attachment 1396 [details]
new suggested patch

after a discussion with quinlan, here's the new version.  it keeps the old API,
and now allows people to pass a message identifier in which will be used for
learning.
Comment 9 Daniel Quinlan 2003-09-18 18:48:05 UTC
+1 works in my testing

Also, the documentation at the top of PerMsgLearner.pm makes no sense to me.
Comment 10 Daniel Quinlan 2003-09-18 21:07:05 UTC
applied, closing