From owner-freebsd-ports@FreeBSD.ORG Thu Mar 23 17:46:26 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5220316A400 for ; Thu, 23 Mar 2006 17:46:26 +0000 (UTC) (envelope-from forrie@forrie.com) Received: from forrie.com (c-24-62-224-60.hsd1.nh.comcast.net [24.62.224.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id E246243D48 for ; Thu, 23 Mar 2006 17:46:25 +0000 (GMT) (envelope-from forrie@forrie.com) Received: from [192.168.1.98] (monster.forrie.com [192.168.1.98]) (authenticated bits=0) by forrie.com (8.13.6/8.13.5) with ESMTP id k2NHkOqV083442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Mar 2006 12:46:24 -0500 (EST) (envelope-from forrie@forrie.com) Message-ID: <4422DF61.7080402@forrie.com> Date: Thu, 23 Mar 2006 12:48:17 -0500 From: Forrest Aldrich User-Agent: Thunderbird 1.5.0.2 (Windows/20060320) MIME-Version: 1.0 To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1353/Thu Mar 23 05:23:33 2006 on mail.forrie.com X-Virus-Status: Clean Cc: Subject: Spamass-Milter Patch for recent Spamassassin 3.1.1 PerMsgStatus.pm changes... X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2006 17:46:26 -0000 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