Date: Thu, 23 Mar 2006 12:48:17 -0500 From: Forrest Aldrich <forrie@forrie.com> To: ports@freebsd.org Subject: Spamass-Milter Patch for recent Spamassassin 3.1.1 PerMsgStatus.pm changes... Message-ID: <4422DF61.7080402@forrie.com>
next in thread | raw e-mail | index | archive | help
The recent change to SA-3.1.1 in PerMsgStatus.pm caused some headers to leak into the displayed message when using spamass-milter, due to the handing of LF/CR. I corresponded with Dan Nelson, the author of Spamass-Milter, and he kindly replicated the problem and provided the following patch, which I've verified as working. It should be checked in to CVS as "patch-aa" in the files section of the port: --- spamass-milter.cpp 2 Jun 2005 18:30:25 -0000 1.89 +++ spamass-milter.cpp 23 Mar 2006 05:51:39 -0000 @@ -679,9 +679,16 @@ if (header[field_end-1] == '\r') field_end--; - // Maybe remove the whitespace picked up when a header wraps - this - // might actually be a requirement - return header.substr( field_start, field_end - field_start ); + string data = header.substr( field_start, field_end - field_start ); + + /* Replace all CRLF pairs with LF */ + idx = 0; + while ( (idx = data.find("\r\n", idx)) != string::npos ) + { + data.replace(idx,2,"\n"); + } + + return data; } Thanks. Forrest
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4422DF61.7080402>