🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #69055

Re: mail2news script

#69055
From: Jeffrey M. Vinocur
Date: Sun, 25 Apr 2004 16:53
34 lines
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/
Technical Details
Message-ID: <c6gqdr$q9q$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news.kjsl.com!news.litech.org!not-for-mail
References: <c6fubi$pob$1@bananasplit.info>

Show Full Headers
Complete Article Headers
Message-ID: <c6gqdr$q9q$1@puck.litech.org>
Subject: Re: mail2news script
Date: Sun, 25 Apr 2004 16:53:15 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <c6fubi$pob$1@bananasplit.info>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news.kjsl.com!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 34
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1082911995 26938 66.218.0.75 (25 Apr 2004 16:53:15
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sun, 25 Apr 2004 16:53:15 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)