ports/118334: [patch] mail/squirrelmail: loses References: and In-Reply-To: headers when replying
Nikola Lecic
nikola.lecic at anthesphoria.net
Thu Nov 29 19:40:01 UTC 2007
>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 at 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:
More information about the freebsd-ports-bugs
mailing list