From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 29 19:40:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B9C216A419 for ; Thu, 29 Nov 2007 19:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0B94613C44B for ; Thu, 29 Nov 2007 19:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lATJe0TS099027 for ; Thu, 29 Nov 2007 19:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lATJe0HC099026; Thu, 29 Nov 2007 19:40:00 GMT (envelope-from gnats) Resent-Date: Thu, 29 Nov 2007 19:40:00 GMT Resent-Message-Id: <200711291940.lATJe0HC099026@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nikola Lecic Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6D416A41A for ; Thu, 29 Nov 2007 19:34:14 +0000 (UTC) (envelope-from nikola.lecic@anthesphoria.net) Received: from anthesphoria.net (anthesphoria.net [200.46.204.219]) by mx1.freebsd.org (Postfix) with ESMTP id AC2FF13C474 for ; Thu, 29 Nov 2007 19:34:12 +0000 (UTC) (envelope-from nikola.lecic@anthesphoria.net) Received: from anthesphoria.net (anthesphoria.net [200.46.204.219]) by anthesphoria.net (8.14.1/8.14.1) with ESMTP id lATJYAkd072972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 29 Nov 2007 20:34:11 +0100 (CET) (envelope-from nl@anthesphoria.net) Received: (from nl@localhost) by anthesphoria.net (8.14.1/8.14.1/Submit) id lATJYAlP072966; Thu, 29 Nov 2007 20:34:10 +0100 (CET) (envelope-from nl) Message-Id: <200711291934.lATJYAlP072966@anthesphoria.net> Date: Thu, 29 Nov 2007 20:34:10 +0100 (CET) From: Nikola Lecic To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/118334: [patch] mail/squirrelmail: loses References: and In-Reply-To: headers when replying X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nikola Lecic List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2007 19:40:01 -0000 >Number: 118334 >Category: ports >Synopsis: [patch] mail/squirrelmail: loses References: and In-Reply-To: headers when replying >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 29 19:40:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Nikola Lecic >Release: FreeBSD 6.3-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD xxx.xxx 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Mon Nov 26 16:30:52 2007 root@xxx.xxx.xxx:/usr/obj/usr/src/sys/kernel amd64 >Description: SquirrelMail fails to create proper References: and In-Reply-To: headers, and the problem appears only on 6.3-PRERELEASE (amd64). Exactly the same config worked on i386 and squirrelmail-devel works normally in both cases. The problem is that in function deliverMessage of src/compose.php $composeMessage arrives without $composeMessage->reply_rfc822_header, although it was properly set earlier. Consequently, the conditonal if (is_object($reply_rfc822_header) && isset($reply_rfc822_header->message_id) && $reply_rfc822_header->message_id) { (of class/deliver/Deliver.class.php, line 452) fails and message will not be treated as a reply => will be sent without those two headers. I don't precisely know what is the cause and how this relates to the architecture, but the patch below solved the problem for me on amd64. BTW, I have "session.auto_start = 1", but this doesn't seem to be related to the problem. All php5 ports are up-to-date. >How-To-Repeat: cd /usr/ports/mail/squirrelmail ; make install Then try to reply to any message, preferably to one which already has References: header. References will be lost and no In-Reply-To: header will be added (message won't be treated as a reply in class/deliver/Deliver.class.php). >Fix: Notes: * This is a patch against _installed_ (FreeBSD-patched) file. * The replacement code is taken from the equivalent file of squirrelmail-devel. --- squirrelmail-1.4.11-src-compose.php.patch begins here --- --- squirrelmail.orig/src/compose.php 2007-11-29 19:00:04.000000000 +0100 +++ squirrelmail/src/compose.php 2007-11-29 19:45:11.000000000 +0100 @@ -354,13 +354,17 @@ $composesession = $session; sqsession_register($composesession,'composesession'); } -if (!empty($compose_messages[$session])) { - $composeMessage = $compose_messages[$session]; + +if (!isset($compose_messages[$session]) || ($compose_messages[$session] == NULL)) { + $composeMessage = new Message(); + $rfc822_header = new Rfc822Header(); + $composeMessage->rfc822_header = $rfc822_header; + $composeMessage->reply_rfc822_header = ''; + $compose_messages[$session] = $composeMessage; + + sqsession_register($compose_messages,'compose_messages'); } else { - $composeMessage = new Message(); - $rfc822_header = new Rfc822Header(); - $composeMessage->rfc822_header = $rfc822_header; - $composeMessage->reply_rfc822_header = ''; + $composeMessage=$compose_messages[$session]; } // re-add attachments that were already in this message --- squirrelmail-1.4.11-src-compose.php.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: