Thread View: news.software.nntp
13 messages
13 total messages
Started by Habu
Sun, 25 Apr 2004 08:54
mail2news script
Author: Habu
Date: Sun, 25 Apr 2004 08:54
Date: Sun, 25 Apr 2004 08:54
30 lines
1858 bytes
1858 bytes
Hello, I'm trying to tweek a perl script that was originally written by Rich Saltz for posting messages from mailing lists to a newsgroup. Rich's script works very nicely but I have encountered one issue with it: Some messages are being sent to mailing lists and crossposted to a mail2news gateway, as per the following example: # To: list@somesite.com # Cc: mail2news@demon.co.uk # Newsgroups: alt.test If I host alt.test on my news server and also want to post list@somesite.com messages to local.list.somesite, I end up with a duplicated Message-ID. To overcome this problem, I decided to prefix the Message-ID with 'list' so that <abc@def.com> becomes <list.abc@def.com> prior to posting it to my local group. Having almost zero knowledge of Perl, I used the following regex: s/Message-ID:\s<+(.*)/Message-ID: <list\.$1/ My problem now is with the References that also need to have the same prefix applied or I break threading. My above regex doesn't work as there can be more than one reference within the header. And so finally to my question! Could anyone suggest a Perl method for adding a prefix to all the message-id's within a References header?
Re: mail2news script
Author: Jeffrey M. Vinocur
Date: Sun, 25 Apr 2004 16:53
Date: Sun, 25 Apr 2004 16:53
34 lines
2168 bytes
2168 bytes
In article <c6fubi$pob$1@bananasplit.info>,
Habu <blackbird@invalid.com> wrote:
>
>[mail2news]
>
>If I host alt.test on my news server and also want to post
>list@somesite.com messages to local.list.somesite, I end up with a
>duplicated Message-ID.
Is this a particular local newsgroup only? If so, we might come
up with a way to have the crossposting actually come through so
that newsreaders won't show the user the same article twice. But
anyway, that wasn't your question.
>s/Message-ID:\s<+(.*)/Message-ID: <list\.$1/
>
>My problem now is with the References that also need to have the same
>prefix applied or I break threading. My above regex doesn't work as
>there can be more than one reference within the header. And so finally
>to my question! Could anyone suggest a Perl method for adding a prefix
>to all the message-id's within a References header?
I'm sure there's a way to do it with a single regex, but why not
just:
if( /^References:/ ) {
s/</<list\./g;
}
--
Jeffrey M. Vinocur * jmv16@cornell.edu
http://www.people.cornell.edu/pages/jmv16/
Re: mail2news script
Author: Habu
Date: Sun, 25 Apr 2004 17:29
Date: Sun, 25 Apr 2004 17:29
21 lines
1592 bytes
1592 bytes
In article <c6gqdr$q9q$1@puck.litech.org>, Jeffrey M. Vinocur wrote:
> Is this a particular local newsgroup only? If so, we might come
> up with a way to have the crossposting actually come through so
> that newsreaders won't show the user the same article twice. But
> anyway, that wasn't your question.
I actually host quite a few local.lists groups and use procmail to
dictate what articles go to which groups. For example:
# :0
# * ^List-Post:.*squirrelmail-announce@lists\.sourceforge\.net
# | ~listpost/bin/mail2news local.lists.squirrelmail
> I'm sure there's a way to do it with a single regex, but why not
> just:
>
> if( /^References:/ ) {
> s/</<list\./g;
> }
That worked perfectly thanks!
Re: mail2news script
Author: Dirk Nimmich
Date: Sun, 25 Apr 2004 20:01
Date: Sun, 25 Apr 2004 20:01
14 lines
1552 bytes
1552 bytes
Habu wrote:
> In article <c6gqdr$q9q$1@puck.litech.org>, Jeffrey M. Vinocur wrote:
>> I'm sure there's a way to do it with a single regex, but why not
>> just:
>>
>> if( /^References:/ ) {
>> s/</<list\./g;
>> }
>
> That worked perfectly thanks!
Does it really? What happens when you reply? Do you strip the <list.
part off all Message-IDs in References?
Re: mail2news script
Author: Jeffrey M. Vinocur
Date: Sun, 25 Apr 2004 21:42
Date: Sun, 25 Apr 2004 21:42
31 lines
2108 bytes
2108 bytes
In article <c6h5ff$1ir$02$1@news.t-online.com>,
Dirk Nimmich <nimmich@muenster.de> wrote:
>Habu wrote:
>> In article <c6gqdr$q9q$1@puck.litech.org>, Jeffrey M. Vinocur wrote:
>>> I'm sure there's a way to do it with a single regex, but why not
>>> just:
>>>
>>> if( /^References:/ ) {
>>> s/</<list\./g;
>>> }
>>
>> That worked perfectly thanks!
>
>Does it really? What happens when you reply? Do you strip the <list.
>part off all Message-IDs in References?
Touché. If users can reply from the news post directly back to
the mailing list, it's pretty tricky to make that part of it
work.
If all the news articles are going back by way of news2mail, then
it can be fixed. And if this is a low-traffic server, I suppose
it's possible to make the relevant newsgroups moderated with the
emailed versions going to mail2news so it can use the built-in
crosspost support.
--
Jeffrey M. Vinocur
jeff@litech.org
Re: mail2news script
Author: Habu
Date: Sun, 25 Apr 2004 22:07
Date: Sun, 25 Apr 2004 22:07
8 lines
1275 bytes
1275 bytes
In article <c6h5ff$1ir$02$1@news.t-online.com>, Dirk Nimmich wrote: > > Does it really? What happens when you reply? Do you strip the <list. > part off all Message-IDs in References? In this instance, the local.list groups on my service are read-only. I merely provide them for informational purposes and wouldn't want users posting back to the mailing list.
Re: mail2news script
Author: Dirk Nimmich
Date: Mon, 26 Apr 2004 20:44
Date: Mon, 26 Apr 2004 20:44
18 lines
1963 bytes
1963 bytes
Habu wrote: > In this instance, the local.list groups on my service are read-only. I > merely provide them for informational purposes and wouldn't want users > posting back to the mailing list. Given the fact that users don't need to post (followup -- that would be the easy part!) but only to reply and a lot of mailing lists set a Reply-To header back to the list address this doesn't really convince me. A (virtual) sign reading "this is only for informational purposes, please don't reply" won't work. The more I think about it the more I have to agree again with the old word saying: Don't ever touch Message-IDs. Maybe manipulating the Newsgroups header depending on To and Cc content is better (so that you would simulate a crosspost), but I haven't made up my mind yet.
Re: mail2news script
Author: Habu
Date: Mon, 26 Apr 2004 22:52
Date: Mon, 26 Apr 2004 22:52
18 lines
1927 bytes
1927 bytes
In article <c6jsbi$3er$04$1@news.t-online.com>, Dirk Nimmich wrote: > > Given the fact that users don't need to post (followup -- that would > be the easy part!) but only to reply and a lot of mailing lists set > a Reply-To header back to the list address this doesn't really > convince me. A (virtual) sign reading "this is only for > informational purposes, please don't reply" won't work. Excuse me if I'm missing something here, but I don't quite follow your point. In my INN readers.conf, there is an entry of: read: "local.lists.*" Users aren't seeing a virtual sign; they really have no capability to post to these groups. In any other circumstance I would totally agree with you about not messing with the Message-ID, but these groups don't propagate anywhere and are informational/read-only. > > The more I think about it the more I have to agree again with the > old word saying: Don't ever touch Message-IDs.
Re: mail2news script
Author: Jeffrey M. Vinocur
Date: Tue, 27 Apr 2004 00:36
Date: Tue, 27 Apr 2004 00:36
16 lines
1644 bytes
1644 bytes
In article <c6k3qq$lqi$1@bananasplit.info>, Habu <blackbird@invalid.com> wrote: > >In my INN readers.conf, there is an entry of: >read: "local.lists.*" >Users aren't seeing a virtual sign; they really have no capability to >post to these groups. However, your articles still have the To:/Cc: headers with the mailing list address, I expect. So users can reply to the articles via email, regardless of how you have configured readers.conf. -- Jeffrey M. Vinocur jeff@litech.org
Re: mail2news script
Author: pbs
Date: Tue, 27 Apr 2004 02:21
Date: Tue, 27 Apr 2004 02:21
47 lines
3727 bytes
3727 bytes
Habu wrote: > In article <c6jsbi$3er$04$1@news.t-online.com>, Dirk Nimmich wrote: > >>Given the fact that users don't need to post (followup -- that would >>be the easy part!) but only to reply and a lot of mailing lists set >>a Reply-To header back to the list address this doesn't really >>convince me. A (virtual) sign reading "this is only for >>informational purposes, please don't reply" won't work. > > > Excuse me if I'm missing something here, but I don't quite follow your > point. In my INN readers.conf, there is an entry of: > read: "local.lists.*" > Users aren't seeing a virtual sign; they really have no capability to > post to these groups. In any other circumstance I would totally agree > with you about not messing with the Message-ID, but these groups don't > propagate anywhere and are informational/read-only. > I am confused. In you initial posting you wrote : # To: list@somesite.com : # Cc: mail2news@demon.co.uk : # Newsgroups: alt.test : : If I host alt.test on my news server and also want to post : list@somesite.com messages to local.list.somesite, I end up with a : duplicated Message-ID. If you were to post the message using "inews" with a list of news groups you want to post too in the newsgroup field, instead of "rnews", then inews will take care of the message IDs for you and cross post them correctly. If you do not want then cross posted then post them to the "alt.test" and again to "local.list.somesite". Relying on the mail list contributors email programs to generate unique message IDs seems to me to be courting disaster. -- or am I confused and this is not what you do? In the example you give, mail2news@demon.co.uk will presumably post the same message onto news.demon.co.uk and eventually you will download that message via your standard nntp feed. Presumably you will end up with 2 postings in alt.test for each initial list message, one posted locally (via rnews or inews) and one posted via mail2news@demon.co.uk. As alt.test is not local, these 2 messges will be propergated around the internet via nntp. Have you thought of a solution to this problem?
Re: mail2news script
Author: Dirk Nimmich
Date: Tue, 27 Apr 2004 19:52
Date: Tue, 27 Apr 2004 19:52
29 lines
2463 bytes
2463 bytes
Habu wrote:
> In article <c6jsbi$3er$04$1@news.t-online.com>, Dirk Nimmich
> wrote:
>> Given the fact that users don't need to post (followup -- that
>> would be the easy part!) but only to reply and a lot of mailing
>> lists set a Reply-To header back to the list address this doesn't
>> really convince me. A (virtual) sign reading "this is only for
>> informational purposes, please don't reply" won't work.
>
> Excuse me if I'm missing something here, but I don't quite follow
> your point. In my INN readers.conf, there is an entry of:
> read: "local.lists.*"
That's ok, but it doesn't prevent people from replying by *mail* to
a posting in a local.lists.* group ('r'eply instead of 'f'ollowup).
> Users aren't seeing a virtual sign; they really have no capability
> to post to these groups.
The virtual sign is that they cannot post. But as said above, users
don't need this capability to respond to the list (with modified
Message-IDs in In-Reply-To and References).
> In any other circumstance I would totally agree with you about not
> messing with the Message-ID, but these groups don't propagate
> anywhere and are informational/read-only.
Famous last words, I'd say. It's your neck.
Re: mail2news script
Author: Habu
Date: Thu, 29 Apr 2004 22:48
Date: Thu, 29 Apr 2004 22:48
13 lines
1855 bytes
1855 bytes
In article <c6mdmi$d63$02$1@news.t-online.com>, Dirk Nimmich wrote:
>
> That's ok, but it doesn't prevent people from replying by *mail* to a
> posting in a local.lists.* group ('r'eply instead of 'f'ollowup).
Ah I'm sorry, I see your point now. I agree that I cannot stop people
from trying to reply by Email to the originating mailing list. However,
it appears that when I try to reply by Email to a posted message, the To
address defaults to that of the original sender *not* the mailing list
address. In fact, the mailing list address does not appear in any
header that is retained after posting to the local newsgroup. The
In-Reply-To header is also stripped. Despite this, I appreciate your
point that there is potential for somebody to base a reply on these
incorrect headers.
Re: mail2news script
Author: Zax
Date: Thu, 29 Apr 2004 23:18
Date: Thu, 29 Apr 2004 23:18
51 lines
3700 bytes
3700 bytes
In article <c6kg2h$jcv$1@squay.lomarline.freeserve.co.uk>, pbs wrote: > I am confused. In you initial posting you wrote > >: # To: list@somesite.com >: # Cc: mail2news@demon.co.uk >: # Newsgroups: alt.test >: >: If I host alt.test on my news server and also want to post >: list@somesite.com messages to local.list.somesite, I end up with a >: duplicated Message-ID. > > If you were to post the message using "inews" with a list of news groups > you want to post too in the newsgroup field, instead of "rnews", then > inews will take care of the message IDs for you and cross post them > correctly. If you do not want then cross posted then post them to the > "alt.test" and again to "local.list.somesite". The problem I encoutered occurs when people send a message via Email to the mailing list, and also to a newsgroup through a mail2news gateway. The Message-ID is the same in both instances, but the destination newsgroup is different: One destination is defined by the Newsgroups header as specified by the message originator, this is propagated to each news server in the usual manner. The second instance is posted to my local news server to a specific newsgroup that I define for messages coming from that mailing list; this one is posted via rnews. The message in effect arrives twice at the same news server with the same Message-ID, but with different destination groups and from different sources. > Relying on the mail list contributors email programs to generate unique > message IDs seems to me to be courting disaster. -- or am I confused and > this is not what you do? That is true, but the risk of a duplicate ID being sent to a mailing list I carry as a newsgroup is pretty small. > In the example you give, mail2news@demon.co.uk will presumably post the > same message onto news.demon.co.uk and eventually you will download that > message via your standard nntp feed. Correct. > Presumably you will end up with 2 postings in alt.test for each > initial list message, one posted locally (via rnews or inews) and one > posted via mail2news@demon.co.uk. As alt.test is not local, these 2 > messges will be propergated around the internet via nntp. Have you > thought of a solution to this problem? Not quite; the message will be posted once to alt.test via mail2news@demon.co.uk in accordance with the originators Newsgroups header. It will then be posted via rnews to local.list.something based on the originating mailing list, *not* the Newsgroups header. The two messages have the same Message-ID so the second instance will not get posted.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads