ports/103308: [patch] SpamAssassin 3.1.5 sa-learn --mbx broken

Larry Rosenman ler at lerctr.org
Sat Sep 16 00:10:27 UTC 2006


>Number:         103308
>Category:       ports
>Synopsis:       [patch] SpamAssassin 3.1.5 sa-learn --mbx broken
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 16 00:10:26 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Larry Rosenman
>Release:        FreeBSD 6.1-STABLE amd64
>Organization:
LERCTR Consulting
>Environment:
System: FreeBSD thebighonker.lerctr.org 6.1-STABLE FreeBSD 6.1-STABLE #70: Fri Sep 8 10:39:44 CDT 2006 root at thebighonker.lerctr.org:/usr/obj/usr/src/sys/THEBIGHONKER amd64


>Description:
SpamAssassin's sa-learn --mbx is broken,  I've reported it upstream to 
their BugZilla as bug 5101.  below is the patch to fix it.  Can we 
include this patch?
>How-To-Repeat:
sa-learn --mbx --spam --showdots /path/to/a/mbx/file
>Fix:

Index: lib/Mail/SpamAssassin/Constants.pm
===================================================================
--- lib/Mail/SpamAssassin/Constants.pm	(revision 442421)
+++ lib/Mail/SpamAssassin/Constants.pm	(working copy)
@@ -265,7 +265,7 @@
 
 # regular expression that matches message separators in The University of
 # Washington's MBX mailbox format
-use constant MBX_SEPARATOR => qr/([\s|\d]\d-[a-zA-Z]{3}-\d{4}\s\d{2}:\d{2}:\d{2}.*),(\d+);([\da-f]{12})-(\w{8})/;
+use constant MBX_SEPARATOR => qr/^([\s|\d]\d-[a-zA-Z]{3}-\d{4}\s\d{2}:\d{2}:\d{2}.*),(\d+);([\da-f]{12})-(\w{8})\r?$/;
 # $1 = datestamp (str)
 # $2 = size of message in bytes (int)
 # $3 = message status - binary (hex)
Index: lib/Mail/SpamAssassin/ArchiveIterator.pm
===================================================================
--- lib/Mail/SpamAssassin/ArchiveIterator.pm	(revision 442421)
+++ lib/Mail/SpamAssassin/ArchiveIterator.pm	(working copy)
@@ -1141,7 +1141,7 @@
 	  }
 
           $self->bump_scan_progress();
-	  $info->{"$file.$offset"} = Mail::SpamAssassin::Util::receive_date($header);
+	  $info->{$offset} = Mail::SpamAssassin::Util::receive_date($header);
 
 	  # go onto the next message
 	  seek(INPUT, $offset + $size, 0);

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list