Thanks for the patch. I will look into this and consider commiting it after the tree unlocks.
jim * Thorsten Glaser <[email protected]> [090703 06:06]: > Hi everyone, > > this patch (tested on 4.4/i386 and MirBSD #10) fixes mail/bmf to > correctly remove second (and follow-up) lines of a folded header. > > Please apply. > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/mail/bmf/Makefile,v > retrieving revision 1.12 > diff -N -u -p Makefile > --- Makefile 11 Sep 2007 07:17:42 -0000 1.12 > +++ Makefile 3 Jul 2009 09:57:08 -0000 > @@ -2,7 +2,7 @@ > > COMMENT= easy to use Bayesian spam filter > DISTNAME= bmf-0.9.4 > -PKGNAME= ${DISTNAME}p2 > +PKGNAME= ${DISTNAME}p3 > CATEGORIES= mail > HOMEPAGE= http://sourceforge.net/projects/bmf/ > > Index: patches/patch-lex_c > =================================================================== > RCS file: patches/patch-lex_c > diff -N -u -p patches/patch-lex_c > --- /dev/null 3 Jul 2009 09:57:08 -0000 > +++ patches/patch-lex_c 3 Jul 2009 09:57:08 -0000 > @@ -0,0 +1,38 @@ > +$OpenBSD$ > +$MirOS: ports/mailnews/bmf/patches/patch-lex_c,v 1.1 2009/07/03 09:14:12 tg > Exp $ > +--- lex.c.orig Sun Oct 20 20:28:53 2002 > ++++ lex.c Fri Jul 3 09:06:51 2009 > +@@ -682,7 +682,7 @@ again: > + void lex_passthru( lex_t* pthis, bool_t is_spam, double hits ) > + { > + char szbuf[256]; > +- bool_t in_headers = true; > ++ bool_t ign_header = false; > + > + assert( pthis->bom < pthis->buflen && pthis->eom <= pthis->buflen ); > + assert( pthis->bom <= pthis->eom ); > +@@ -701,7 +701,7 @@ void lex_passthru( lex_t* pthis, bool_t > + } > + > + /* existing headers */ > +- while( in_headers && pthis->pos < pthis->eom ) > ++ while( pthis->pos < pthis->eom ) > + { > + cpchar pbuf = pthis->pbuf + pthis->pos; > + uint len = 0; > +@@ -722,9 +722,14 @@ void lex_passthru( lex_t* pthis, bool_t > + } > + > + /* write header, ignoring existing spam headers */ > +- if( strncasecmp( pbuf, "X-Spam-", 7 ) != 0 ) > ++ if( ign_header && (pbuf[0] == ' ' || pbuf[0] == '\t') ) > ++ /* continuation line of an ignored header */ ; > ++ else if( strncasecmp( pbuf, "X-Spam-", 7 ) == 0 ) > ++ ign_header = true; > ++ else > + { > + write( STDOUT_FILENO, pbuf, len ); > ++ ign_header = false; > + } > + > + pthis->pos += len; > > > //mirabilos > -- > tarent Gesellschaft f??r Softwareentwicklung und IT-Beratung mbH > > Heilsbachstr. 24, 53123 Bonn | Weigandufer 45, 12059 Berlin > fon: +49(0)228 / 52675-0 | fon: +49(0)30 / 5682943-30 > fax: +49(0)228 / 52675-25 | fax: +49(0)228 / 52675-25 > > Sch??tzenstr. 18, 10117 Berlin > fon: +49(0)30 / 27594853 > fax: +49(0)30 / 78709617 > > Gesch??ftsf??hrer: Boris Esser, Elmar Geese > HRB AG Bonn 5168 - Ust-ID: DE122264941 >
