Ticket #345 (new defect)

Opened 2 years ago

Last modified 1 year ago

fuzzy-find cannot learn from provided digest

Reported by: daveroth@acm.org Assigned to: decoder
Priority: major Milestone:
Component: Configuration Version:
Keywords: fuzzy-find Cc:

Description

I was trying to add an entry to my database using fuzzy-find and the digest reported in the debugging log output.

% fuzzy-find --learn-spam --score=10 265236:171:518:256::8:4:4:5:29022::19:4:28:11:26214::28:20:9:21:20377::17:41:10:30:5039::247:210:219:222:358::83:74:80:77:344

The command would add an entry to the database, but it would not be found when I ran spamassassin again.

I think the problem is that $key is not initialized when providing the digest on the command-line. The following patch fixed the issue for me:

  • bin/fuzzy-find

    old new  
    117117while (@ARGV) { 
    118118    my $file = shift @ARGV; 
    119119    my @data = (); 
    120     if ($file =~ m/(\d+):(\d+):(\d+):(\d+)/) { 
     120    my $key = ''; 
     121    if ($file =~ m/(\d+):(\d+):(\d+):(\d+)::(.*)/) { 
     122        push @data, $1,$2,$3,$4; 
     123        $key = $5; 
     124    } 
     125    elsif ($file =~ m/(\d+):(\d+):(\d+):(\d+)/) { 
    121126        push @data, $1,$2,$3,$4; 
    122127    } elsif ($file eq ':::0') { 
    123128        $key = $file; 
     
    125130    } else { 
    126131        next unless -r $file; 
    127132    } 
    128     my $key = ''; 
    129133    my $ctype = ''; 
    130134    my $ftype = 0; 
    131135    unless (@data) { 

Attachments

Change History

08.07.2007 10:39:03 changed by anonymous

11.07.2007 15:48:14 changed by anonymous

http://corp.cwsurf.de/game/free-downloadable/ - Arcade download free galaga game - Full Version Free Games Download, Free download games. http://www12.asphost4free.com/allmask/game/pogo-game/index.html pogo game


Add/Change #345 (fuzzy-find cannot learn from provided digest)