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

Home » FUDforum » How To » Mailing list receiving its own messages back
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Mailing list receiving its own messages back [message #160211] Mon, 03 August 2009 19:46 Go to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
I have been using FUDforum in conjunction with my (Arrow) mailing lists for three years and in general things have always gone well.

FUDforum has sent anything posted directly on it to the list, whilst not sending back anything it received from the list.

However, in the last week, for no reason that I can think of as I haven't changed anything, it is sending every message back to the list, even those sent from it.

I know the piece of code in maillist.php which makes sure something doesn't get posted from the list to the forum twice (i.e. the check for the X-Mailer header) but I can't find the corresponding code to stop posts from the list being sent back to it. How is this checked?

If somebody could point me in the right direction to see where to look, I'd be grateful.

BTW, I'm using the latest version (2.8.1)


--
Bill Hayles
El Inglés Loco
Re: Mailing list receiving its own messages back [message #160212 is a reply to message #160211] Tue, 04 August 2009 05:53 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
mlist_post.inc adds an X-FUDforum header, while maillist.php checks for this header and prevent it from being imported again:

// Handler for our own messages, which do not need to be imported.
if (isset($emsg->headers['x-fudforum']) ...
Re: Mailing list receiving its own messages back [message #160217 is a reply to message #160212] Tue, 04 August 2009 07:38 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
Thanks, but I know that and that side of things is working OK. It isn't the forum that's getting the duplicates it's the mailing list. In other words, it's exporting, not importing that's the problem.

Most of my traffic originates as traffic to the mailing list. This sends a copy to the forum, which posts it. If a message originates on the forum, it sends a copy to the list, the list sends it back and it is recognised as a duplicate. So far, so good.

But until a week or so ago, a message sent from the list to the forum was posted to the forum but NOT sent back to the list. In other words, the software knew not to return posts originating from the lists.

Suddenly, it has started doing so (after three years of working perfectly) and I don't have a clue why.

The messages are collected from the forum incoming mailbox by getlists.php as a cron job.

If it helps, I can post a copy of both an original message and the copy sent back by the forum.



--
Bill Hayles
El Inglés Loco

[Updated on: Tue, 04 August 2009 11:48]

Report message to a moderator

Re: Mailing list receiving its own messages back [message #160218 is a reply to message #160217] Tue, 04 August 2009 19:55 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
billnot wrote on Tue, 04 August 2009 09:38
If it helps, I can post a copy of both an original message and the copy sent back by the forum.


It will help if you can post (or mail me) their headers.
Re: Mailing list receiving its own messages back [message #160219 is a reply to message #160218] Wed, 05 August 2009 07:50 Go to previous messageGo to next message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
naudefj wrote on Tue, 04 August 2009 21:55
billnot wrote on Tue, 04 August 2009 09:38
If it helps, I can post a copy of both an original message and the copy sent back by the forum.


It will help if you can post (or mail me) their headers.


Firstly, I have to say that I've found a kludge round the problem which I'll explain in a separate reply.

However, here are the headers you asked for:

Firstly, of the main as received by the mailing list after it has been processed by my mail server (Hamster), hence all the X headers.

Received:
by 10.115.75.13
with SMTP id c13mr8153146wal.72.1249327395160;
Mon, 03 Aug 2009 12:23:15 -0700 (PDT)
X-Forwarded-To: groups(at)billnot(dot)com
X-Forwarded-For: billnot(at)linuxmaniac(dot)net groups(at)billnot(dot)com
Delivered-To: billnot(at)linuxmaniac(dot)net
Received:
by 10.114.133.8
with SMTP id g8cs180851wad;
Mon, 3 Aug 2009 12:23:15 -0700 (PDT)
Received:
by 10.210.16.10
with SMTP id 10mr5544084ebp.51.1249327393280;
Mon, 03 Aug 2009 12:23:13 -0700 (PDT)
Return-Path: <computerchat(at)billnot(dot)com>
Received: from sever (107.Red-80-35-22.staticIP.rima-tde.net [80.35.22.107])
by mx.google.com
with SMTP id 5si13259380ewy.4.2009.08.03.12.23.11;
Mon, 03 Aug 2009 12:23:12 -0700 (PDT)
Received-SPF: neutral (google.com: 80.35.22.107 is neither permitted nor denied by best guess record for domain of computerchat(at)billnot(dot)com) client-ip=80.35.22.107;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.35.22.107 is neither permitted nor denied by best guess record for domain of computerchat(at)billnot(dot)com) smtp.mail=computerchat(at)billnot(dot)com
Message-Id: <4a773920(dot)0567f10a(dot)0a8c(dot)ffffa6e9SMTPIN_ADDED(at)mx(dot)google(dot)com>
Return-Path: computerchat(at)billnot(dot)com
Delivered-To: computerchat(at)billnot(dot)user
From: Peter Bayliss <gataman(at)cftb(dot)net>
To: computerchat(at)billnot(dot)com (Computerchat Mailing List)
Subject: [Computerchat] - Full Screen Window
Date: Mon, 3 Aug 2009 21:07:00 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To:
Thread-Index: AcoURbqiUiKQSvzdR/Ws1M+1OtmgHAAJ3dmg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Hamster-Account-Reason: Matching lines in mailfilt.hst 9: add(arrow) To: "computerchat(at)billnot(dot)com"
X-Hamster-To: account:arrow
X-Hamster-Info: Score=0 UIDL=h57l4v.1l8.1 Received=20090803213423
X-Timestamp-in: Timed at 21:16:47 (UTC+0200) on 03:08:2009
X-Lines: Number of lines 17
X-lines2: Number of lines at end 17
Lines: 17
Reply-To: computerchat(at)billnot(dot)com
Sender: computerchat(at)billnot(dot)com
Errors-To: computerchat(at)billnot(dot)com
X-Hamster-Account-Reason: Matching lines in mailfilt.hst 49: add(chat) To: "computerchat(at)billnot(dot)com"
X-Hamster-To: account:chat



And now the headers of the message received back from the forum (before processing by Hamster as I managed to trap it manually)

Return-Path: <gataman(at)cftb(dot)net>
Delivered-To: computerchat(at)billnot(dot)user
Received: (qmail 4320 invoked
by uid 503);
4 Aug 2009 09:19:41 -0000
Received: from serversys852.com (203.194.209.77)
by hostserver150.com
with SMTP;
4 Aug 2009 09:19:41 -0000
Received: (qmail 17739 invoked
by uid 728);
4 Aug 2009 09:19:40 -0000
Date: 4 Aug 2009 09:19:40 -0000
To: computerchat@@billnot.com
Subject: Full Screen Window
From: Peter Bayliss <gataman(at)cftb(dot)net>
Errors-To: Peter Bayliss <gataman(at)cftb(dot)net>
X-Mailer: FUDforum v2.8.1
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Organization: Costa Blanca Expats
X-FUDforum: 261d6afdfa71011c4eb33619a9160b62 <20386>
Message-ID: <4fa2(dot)4a77fd2b(at)www(dot)costablancaexpats(dot)net>
X-forum: Computerchat


--
Bill Hayles
El Inglés Loco
Re: Mailing list receiving its own messages back [message #160220 is a reply to message #160219] Wed, 05 August 2009 08:27 Go to previous message
billnot is currently offline  billnot   Spain
Messages: 28
Registered: August 2006
Location: Spain
Karma: 0
Junior Member
I have found a way round this problem.

I have got the mailing list to add a small footer to every message. I have added a routine to mlist_post.inc to check for this footer in the last 160 characters of an outgoing message. If it finds it, it sends the message to a trash account I've set up (once I'm certain it works perfectly it will simply not send anywhere). If it doesn't find the footer, it processes the mail as before.

I'm not a programmer, and I'm sure that my coding is bad, but for what it's worth, here it is:

mlist_post.inc (as amended)

function mail_list_post($list_email, $from, $subject, $body, $msg_id, $reply_to=null, $attch=null, $attach_mime=null, $additional_headers=null)

/** Original code **/
$multi_part = 0;
$final_body = '';
/** my extra code **/
/** Set your mailing list variables here **/
$divert_email = 'trashcan@mydomain'; // The e-mail address you want duplicate messages diverted to
$teststring = 'Footer'; // The string your mailing list adds to every message body
$testst=substr($body,-160); //check only last 160 characters of message body
if (strpos($testst,$teststring)) {
$to_email = $divert_email;
} // string found; divert
else {
$to_email = $list_email;
} // string not found; send to list
/** end of my code
many lines unaltered
and the last line **/

/** original code send_email($from, $list_email, $subject, $final_body, $header); **/
send_email($from, $to_email, $subject, $final_body, $header);


--
Bill Hayles
El Inglés Loco
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Topics only visible to some users
Next Topic: How do I include video link in subscribed E-mail's
Goto Forum:
  

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

Current Time: Fri Sep 27 13:28:37 GMT 2024

Total time taken to generate the page: 0.03009 seconds