SA Bugzilla – Bug 4396
[review] spamcop plugin spamcop_max_report_size not defined
Last modified: 2005-07-28 03:17:54 UTC
When reporting spam, spamcop plugin reports that an undefined value is used in multiplication at lines 231 and 232. This must be spamcop_max_report_size which should be initialised from the configuration file, or default to 50.
Subject: Re: New: spamcop plugin spamcop_max_report_size not defined On Tue, Jun 07, 2005 at 11:22:32AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote: > When reporting spam, spamcop plugin reports that an undefined value is used in > multiplication at lines 231 and 232. This must be spamcop_max_report_size which > should be initialised from the configuration file, or default to 50. Well, it could be one of two things: if (length($original) > $self->{conf}->{spamcop_max_report_size} * 1024) { substr($original, ($self->{conf}->{spamcop_max_report_size} * 1024)) = spamcop_max_report_size is supposed to have a default of 50, so I don't think one can actually make it undef. Which means $original would have to be undef, which should also not be possible. ;)
No, I think that it must be spamcop_max_report_size (and I too cannot see how it can be undefined), as original is not used in the multiplication and a constant cannot be undefined. I have tried running with spamcop_max_report_size not defined or defined in one of or both local.cf and ~/.spamassassin/user_prefs, but it makes no difference. Also, I see this problem on 2 different systems, one running Gentoo and perl 5.8.6, the other SuSe and perl 5.8.3, both using the latest SVN. The report is sent to Spamcop, but it shows it as an error as the report is truncated. Below is an extract from spamassassin -D -r [22172] warn: Use of uninitialized value in multiplication (*) at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/Plugin/SpamCop.pm line 231. [22172] warn: Use of uninitialized value in multiplication (*) at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/Plugin/SpamCop.pm line 232. [22172] dbg: reporter: SpamCop sent FROM graham@gmurray.org.uk
Triage: Graham, could you create an attachment with the full "spamassassin -D -r" debug output, and others with your local.cf and user_prefs? Perhaps by looking at the full data report, someone will be able to see something.
Created attachment 2978 [details] Output of spamassassin -D -r The spamassassin -D -r output as requested. I have x'd out my spamcop reporting address.
Created attachment 2979 [details] local.cf local.cf as requested
Created attachment 2980 [details] user_prefs user_prefs as requested, again with the spamcop reporting address x'd out
Created attachment 3036 [details] fix the conf location see the patch. the conf is at $self->{main}->{conf}->{spamcop_max_report_size}, not $self->{conf}->{spamcop_max_report_size}
+1
Sending lib/Mail/SpamAssassin/Plugin/SpamCop.pm Transmitting file data . Committed revision 225189. Fixed in trunk. 3.0 isn't affected, please review for 3.1.
Bumping up severity/priority since 3.1.0 really shouldn't be released without this as SpamCop reporting is broken without it.
(In reply to comment #10) > Bumping up severity/priority since 3.1.0 really shouldn't be released without > this as SpamCop reporting is broken without it. +1
+1 (I wish perl would complain about this stuff)
Sending lib/Mail/SpamAssassin/Plugin/SpamCop.pm Transmitting file data . Committed revision 225838.
fixed