Ticket #2934 (closed defect: worksforme)

Opened 16 months ago

Last modified 7 months ago

Empty description field

Reported by: Bjorn Jensen Owned by: decoder
Priority: minor Milestone: Development Release Version 3.5
Component: Configuration Version: 3.5.1
Keywords: Cc:

Description

We found that when processing fuzzyocr rules, the spamassassin header would not include the description, what actually hit. Instead we would simply get this:

4.6 FUZZY_OCR_KNOWN_HASH BODY:

After looking in the source we found that the api function in spamassassin, _handle_hit (in perMsgStatus.pm) took a new parameter, that were not appended at the end of the function call, but were instead added where the description param were previously.

Changing the fuzzyocr code from:

$pms->_handle_hit( "FUZZY_OCR", $score, "BODY: ",

$pms->{conf}->{descriptions}->{FUZZY_OCR} . "\n".$debuginfo );

To:

$pms->_handle_hit( "FUZZY_OCR", $score, "BODY: ", "",

$pms->{conf}->{descriptions}->{FUZZY_OCR} . "\n".$debuginfo );

Fixed things

I'm by no means a perl coder, so I'd love to hear if this is the correct approach, or if we have broken something else in the process.

Some versions:

spamassassin -V SpamAssassin? version 3.2.5

running on Perl version 5.8.8

FuzzyOcr?: 3.5.1 (although the FuzzyOcr?.pm file says version 3.4)

Change History

in reply to: ↑ description   Changed 16 months ago by kispeter1974@…

I had the same problem, description was missing. I have changed fuzzyocr code (described below), description is now correct.

Before:

Content analysis details: (6.6 points, 3.5 required)

pts rule name description


0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS 6.5 FUZZY_OCR BODY:

After:

Content analysis details: (6.6 points, 3.5 required)

pts rule name description


0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS 6.5 FUZZY_OCR BODY: Mail contains an image with common spam text inside

Words found: "viagra" in 5 lines "profit" in 1 lines (9 word occurrences found)

(It is just a quick fix. I also hope, it hasn't broken something else in the process...)

Replying to Bjorn Jensen:

We found that when processing fuzzyocr rules, the spamassassin header would not include the description, what actually hit. Instead we would simply get this: 4.6 FUZZY_OCR_KNOWN_HASH BODY: After looking in the source we found that the api function in spamassassin, _handle_hit (in perMsgStatus.pm) took a new parameter, that were not appended at the end of the function call, but were instead added where the description param were previously. Changing the fuzzyocr code from: $pms->_handle_hit( "FUZZY_OCR", $score, "BODY: ", $pms->{conf}->{descriptions}->{FUZZY_OCR} . "\n".$debuginfo ); To: $pms->_handle_hit( "FUZZY_OCR", $score, "BODY: ", "", $pms->{conf}->{descriptions}->{FUZZY_OCR} . "\n".$debuginfo ); Fixed things I'm by no means a perl coder, so I'd love to hear if this is the correct approach, or if we have broken something else in the process. Some versions: spamassassin -V SpamAssassin? version 3.2.5 running on Perl version 5.8.8 FuzzyOcr?: 3.5.1 (although the FuzzyOcr?.pm file says version 3.4)

  Changed 16 months ago by Bjorn Jensen

If anyone else decide to manually change your .pm files according to my instructions, then be aware that you also need to change this 4 places in the Scoring.pm file (this is typically in /etc/mail/spamassassin/FuzzyOcr/Scoring.pm) Just search for all the lines with the handle_hit function and make sure that it has an extra value after the Body value. E.g. this has to be changed: $pms->_handle_hit( "FUZZY_OCR_CORRUPT_IMG", $score, "BODY: ", Into: $pms->_handle_hit( "FUZZY_OCR_CORRUPT_IMG", $score, "BODY: ", "",

  Changed 16 months ago by decoder

  • status changed from new to closed
  • resolution set to worksforme

FuzzyOcr? 3.5.x is incompatible to SA 3.2.x as stated on the download page. You need the SVN version which fixes this and other problems. When I get the time, I'll repack the SVN version and include some other fixes and do another release :)

Note: See TracTickets for help on using tickets.