FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Duplicate posts, using maillist.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Duplicate posts, using maillist.php [message #41056] Wed, 14 May 2008 00:00 Go to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member

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?



Simon Child
Re: Duplicate posts, using maillist.php [message #41091 is a reply to message #41056] Sun, 18 May 2008 15:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If you look at the mailing list message posted by the forum, what mail headers do you see?

FUDforum Core Developer
Re: Duplicate posts, using maillist.php [message #41092 is a reply to message #41091] Sun, 18 May 2008 23:58 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
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(dot)child(at)listdomain(dot)net
X-Envelope-To: simon(dot)child(at)listdomain(dot)net
Received: (qmail 36119 invoked by uid 3002); 11 May 2008 10:42:09 -0000
Precedence: bulk
Delivered-To: mailing list listname(at)forumdomain(dot)org
Received: (qmail 35682 invoked by uid 3002); 11 May 2008 10:39:28 -0000
Mailing-List: contact listname-help(at)forumdomain(dot)org; run by ezmlm
X-No-Archive: yes
List-Post: <mailto:listname(at)forumdomain(dot)org>
List-Help: <mailto:listname-help(at)forumdomain(dot)org>
List-Unsubscribe: <mailto:listname-unsubscribe(at)forumdomain(dot)org>
List-Subscribe: <mailto:listname-subscribe(at)forumdomain(dot)org>
Reply-To: listname(at)forumdomain(dot)org
Delivered-To: mailing list listname(at)forumdomain(dot)org
Date: 11 May 2008 10:39:27 -0000
To: listname(at)forumdomain(dot)org
From: Simon Child <simon(dot)child(at)listdomain(dot)net>
Errors-To: Simon Child <simon(dot)child(at)listdomain(dot)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(dot)4826ccdf(at)www(dot)forumdomain(dot)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 Smile






Simon Child
Re: Duplicate posts, using maillist.php [message #41095 is a reply to message #41092] Mon, 19 May 2008 15:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
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?


FUDforum Core Developer
Re: Duplicate posts, using maillist.php [message #41524 is a reply to message #41095] Thu, 12 June 2008 13:09 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
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



Simon Child
Re: Duplicate posts, using maillist.php [message #157808 is a reply to message #41524] Sun, 10 August 2008 20:11 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
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


Simon Child
Re: Duplicate posts, using maillist.php [message #157825 is a reply to message #157808] Tue, 19 August 2008 18:23 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
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?



Simon Child
Re: Duplicate posts, using maillist.php [message #159149 is a reply to message #157825] Sat, 09 May 2009 06:03 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I trust this problem was fixed a long time ago. I not, can you please post a patch so we can check it into the CVS repository?
Re: Duplicate posts, using maillist.php [message #159193 is a reply to message #159149] Tue, 12 May 2009 06:09 Go to previous message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma: 0
Member
Translator
It works as supposed in my install, no duplicates (2.8.0+)


Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Geo-location stop working after upgrade
Next Topic: FUDforum Failed decompressing the archive
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Apr 27 18:20:02 GMT 2024

Total time taken to generate the page: 0.02776 seconds