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

Home » FUDforum » How To » Posts sent to more than one mailing list
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Posts sent to more than one mailing list [message #28437] Mon, 24 October 2005 19:37 Go to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
We have 3 forums, each tied to a different mailing list. Users sometimes post one message to all 3 mailing lists at once. The forum sees only the first posting address, so places all 3 messages in one forum rather than one to each forum.

This was commonly done on the old forum because it used the subject prefix, not the contents of the "To:" field, to sort messages into the right forums. Is there a way to make FUD forum use the subject prefix? Each mailing list has its own.

Thanks.
Re: Posts sent to more than one mailing list [message #28448 is a reply to message #28437] Tue, 25 October 2005 13:13 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 determination of where the message goes is NOT done by the forum, it is done by whatever tool you use to pipe the message into maillist.php script. Which means that is where you need to change message destination determination.

FUDforum Core Developer
Re: Posts sent to more than one mailing list [message #28481 is a reply to message #28448] Tue, 25 October 2005 22:29 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Tue, 25 October 2005 08:13

The determination of where the message goes is NOT done by the forum, it is done by whatever tool you use to pipe the message into maillist.php script. Which means that is where you need to change message destination determination.


Many thanks for pointing me in the right direction. We modified procmail to use the subject prefix as the criteria. It works well. The only problem would be if someone used "reply to all" on a message sent to all 3 lists because it would carry one subject prefix over to the other 2 lists. It's easy to account for this using majordomo, and it will probably not happen very often.

вы
Re: Posts sent to more than one mailing list [message #28482 is a reply to message #28481] Wed, 26 October 2005 01:08 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Here's an even better way:

Majordomo (probably other mailing list software as well) can be set to add headers to messages which go out over the mailing lists. I added a header like this:

X-Forum:

to each with a unique value for each list. Procmail can then be set up to pipe messages to the appropriate forums using that header. It eliminates the "reply to all" issue.
Re: Posts sent to more than one mailing list [message #28493 is a reply to message #28482] Wed, 26 October 2005 18:55 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
BobB wrote on Tue, 25 October 2005 20:08

I added a header like this:

X-Forum:

to each with a unique value for each list. Procmail can then be set up to pipe messages to the appropriate forums using that header.


Although this method appears to work, it does not in practice. The procmail log includes:

Quote:

From root Wed Oct 26 00:42:49 2005
Subject: H3ML: Another test
Folder: /srv/www/hml/FUDforum/scripts/maillist.php 3 1945
From root Wed Oct 26 00:44:17 2005
Subject: H2ML: Another test
Folder: /srv/www/hml/FUDforum/scripts/maillist.php 2 2013
From root Wed Oct 26 00:49:22 2005
Subject: HML: Another test
Folder: /srv/www/hml/FUDforum/scripts/maillist.php 1 2026


indicating the message was correctly piped to each of the 3 forums, but this test message posted ONLY to forum no. 3, NOT to forums 1 and 2.

Any idea what the problem might be?
Re: Posts sent to more than one mailing list [message #28494 is a reply to message #28493] Wed, 26 October 2005 21:25 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 forum only imports a message if there is no existing message carrying the same message identifier. I suspect that is what is preventing duplicate imports. You can disable this check inside maillist.php

FUDforum Core Developer
Re: Posts sent to more than one mailing list [message #28497 is a reply to message #28494] Wed, 26 October 2005 22:05 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Wed, 26 October 2005 16:25

The forum only imports a message if there is no existing message carrying the same message identifier. I suspect that is what is preventing duplicate imports. You can disable this check inside maillist.php


The last time I edited maillist.php I ran into serious problems. I don't want to edit it without being absolutely certain I'm doing it right.

Is this check disabled in the following section, starting with line 285:

if (isset($this->headers['message-id'])) {
$this->msg_id = substr(trim($this->headers['message-id']), 1, -1);
} else if (isset($this->headers['x-qmail-scanner-message-id'])) {
$this->msg_id = substr(trim($this->headers['x-qmail-scanner-message-id']), 1, -1);
} else {
mlist_error_log("No message id", $this->raw_msg);

If so, what needs to be changed?
Re: Posts sent to more than one mailing list [message #28498 is a reply to message #28497] Wed, 26 October 2005 22:08 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
You are looking at the wrong segment of the file, you need to comment out this bit:

/* check if message was already imported */
if ($emsg->msg_id && q_singleval("SELECT id FROM ".sql_p."msg WHERE mlist_msg_id="._esc($emsg->msg_id))) {
return;
}


FUDforum Core Developer
Re: Posts sent to more than one mailing list [message #28500 is a reply to message #28498] Wed, 26 October 2005 23:19 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Wed, 26 October 2005 17:08

You are looking at the wrong segment of the file, you need to comment out this bit:

/* check if message was already imported */
if ($emsg->msg_id && q_singleval("SELECT id FROM ".sql_p."msg WHERE mlist_msg_id="._esc($emsg->msg_id))) {
return;
}



Would it be commented out like this:

/* check if message was already imported
if ($emsg->msg_id && q_singleval("SELECT id FROM ".sql_p."msg WHERE mlist_msg_id="._esc($emsg->msg_id))) {
return;
} */

or like this:

/* check if message was already imported */
<!-- if ($emsg->msg_id && q_singleval("SELECT id FROM ".sql_p."msg WHERE mlist_msg_id="._esc($emsg->msg_id))) {
return;
} -->

Re: Posts sent to more than one mailing list [message #28501 is a reply to message #28500] Wed, 26 October 2005 23: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
former.

FUDforum Core Developer
Re: Posts sent to more than one mailing list [message #28502 is a reply to message #28501] Wed, 26 October 2005 23:37 Go to previous message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Wed, 26 October 2005 18:33

former.



Many thanks!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Automated backups
Next Topic: How to translate FUDforum?
Goto Forum:
  

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

Current Time: Fri Nov 22 15:33:19 GMT 2024

Total time taken to generate the page: 0.02580 seconds