|
|
Re: Duplicate posts, using maillist.php |
Tue, 19 August 2008 14:23 |
|
srchild wrote on Sun, 10 August 2008 21:11 | I see that mlist_post.inc writes that header, and indeed the header is there in outgoing messages.
But I don't see where that header is checked for in incoming mailing list messages? Specifically, grepping the string 'X-FUDforum'...
|
Ah found it, you lower-cased it.
Fixed the bug, or at least got a workaround:
In maillist.php you have this code:
// Handler for our own messages, which do not need to be imported.
if (isset($emsg->headers['x-fudforum']) && preg_match('!([A-Za-z0-9]{32}) <([0-9]+)>!', $emsg->headers['x-fudforum'], $m)) {
if ($m[1] == md5($GLOBALS['WWW_ROOT'])) {
q("UPDATE ".sql_p."msg SET mlist_msg_id='".addslashes($emsg->msg_id)."' WHERE id=".intval($m[2])." AND mlist_msg_id IS NULL");
if (db_affected()) {
exit;
}
}
}
But since v 1.14 2005/09/08 mlist_post.inc has set mlist_msg_id when sending the message out, so the UPDATE above always affects zero rows and hence
if (db_affected()) {
exit;
}
does not exit and the message is filed as a duplicate in the forum.
Fix/workaround is to do this:
// if (db_affected()) {
exit;
// }
Any reason not to do that?
|
|
Re: Duplicate posts, using maillist.php |
Sun, 10 August 2008 16:11 |
|
I see that mlist_post.inc writes that header, and indeed the header is there in outgoing messages.
But I don't see where that header is checked for in incoming mailing list messages? Specifically, grepping the string 'X-FUDforum' shows that it appears nowhere in the scripts or include directories (except the one instance in mlist_post.inc).
Where are incoming messages to maillist.php supposed to be tested to see if they have this header?
Thanks
|
|
Re: Duplicate posts, using maillist.php |
Thu, 12 June 2008 09:09 |
|
Ilia wrote on Mon, 19 May 2008 16:22 | The: X-FUDforum: 6092915ac21e63638178e48fa6d9dcda <53757> header is the one that is supposed to prevent duplicates.
Does the 6092915ac21e63638178e48fa6d9dcda string match the md5 of your WWW_ROOT value?
|
Yes it does. If I do this:
echo md5($WWW_ROOT);
then I get exactly 6092915ac21e63638178e48fa6d9dcda
Any thoughts how to proceed?
Thanks
|
|
Re: Duplicate posts, using maillist.php |
Mon, 19 May 2008 11:22 |
|
The: X-FUDforum: 6092915ac21e63638178e48fa6d9dcda <53757> header is the one that is supposed to prevent duplicates.
Does the 6092915ac21e63638178e48fa6d9dcda string match the md5 of your WWW_ROOT value?
|
|
Re: Duplicate posts, using maillist.php |
Sun, 18 May 2008 19:58 |
|
Ilia wrote on Sun, 18 May 2008 16:33 | If you look at the mailing list message posted by the forum, what mail headers do you see?
|
Here are some sample headers from a message which was posted on the forum and appeared on the mailing list once but on the forum twice:
Return-Path: <"listname-return-16638-srchild-listdomain:net-simon.child=listdomain.net"@forumdomain.org>
Delivered-To: srchild-listdomain:net-simon.child@listdomain.net
X-Envelope-To: simon.child@listdomain.net
Received: (qmail 36119 invoked by uid 3002); 11 May 2008 10:42:09 -0000
Precedence: bulk
Delivered-To: mailing list listname@forumdomain.org
Received: (qmail 35682 invoked by uid 3002); 11 May 2008 10:39:28 -0000
Mailing-List: contact listname-help@forumdomain.org; run by ezmlm
X-No-Archive: yes
List-Post: <mailto:listname@forumdomain.org>
List-Help: <mailto:listname-help@forumdomain.org>
List-Unsubscribe: <mailto:listname-unsubscribe@forumdomain.org>
List-Subscribe: <mailto:listname-subscribe@forumdomain.org>
Reply-To: listname@forumdomain.org
Delivered-To: mailing list listname@forumdomain.org
Date: 11 May 2008 10:39:27 -0000
To: listname@forumdomain.org
From: Simon Child <simon.child@listdomain.net>
Errors-To: Simon Child <simon.child@listdomain.net>
X-Mailer: FUDforum v2.7.7
Content-Type: text/plain; charset="ISO-8859-15"
Content-Transfer-Encoding: 7bit
Organization: listname User Group
X-FUDforum: 6092915ac21e63638178e48fa6d9dcda <53757>
Message-ID: <d1fd.4826ccdf@www.forumdomain.org>
X-forumdomain-Demime: stripped
Subject: [listname] Update to forumdomain Forum
I see an 'X-Mailer: FUDforum v2.7.7' line, is that the one you use to try to avoid duplications? If so, it is being preserved and not stripped out by my mailing list (I do run through demime, but have always done that).
Thanks for the input, but I am about to go away for three weeks so can't do anything further with this until I return. Duplicates will have to continue in my absence
|
|
|
Duplicate posts, using maillist.php |
Tue, 13 May 2008 20:00 |
|
I've noticed that a few messages on my forums are appearing twice.
I use maillist.php for mailing list integration, and investigating shows that those duplicated are messages posted on the forum itself (most of my messages are posted via mailing lists).
Thinking it through, it is hard to see why messages would not always be duplicated:
- The forum sends messages out to the mailing list
- the mailing list sends messages to its members, one of which is an address which pipes to maillist.php
- the forum displays messages received via maillist.php
This mechanism seems bound to lead to duplicates, so I guess there must be some duplicate checking in there somewhere? But it seems to have failed since I upgraded to 2.7.7. Any suggestions where I should be looking to track this down?
|
|