🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #52779

Re: Auto Crossposting in INN 1.5.1?

#52779
From: Russ Allbery
Date: Sat, 09 Jun 2001 08:25
101 lines
5980 bytes
Gunther Anderson <gunther@ycrdi.com> writes:

> We're running an old server here, and we automatically copy postings in
> our local newsgroups into readable archive groups.  That is, any posting
> to local.newsgroup gets posted to local.archive.newsgroup as well, under
> a separate message ID to keep from getting canceled (note that that
> might be unnecessary, but it worked five years ago when I set it up).

If it's a separate copy, it does need to have a separate message ID.

> We achieve this by listing all the groups as moderated, and the address
> for moderation injects the article separately into the group and the
> archive.group, stripping off the Message-id so that the system
> automatically assigns it new ones.  There's an annoying side-effect or
> two, that one can't crosspost multiple groups, and that messages sent to
> a user and a newsgroup get sent to the user twice (once from the
> original poster, once when the mail system gets too helpful).

Crossposting is doable using that system, but you need to analyze the To
and Cc headers and from that build a list of groups.  It's somewhat
complicated to get right.  (I'd point you at the toolkit that I'm using to
do this, but I'm convinced now that I didn't do it right either, and am in
the exceedingly slow process of rewriting it.)

> Is there some way to automate this, so I can remove moderation and
> disinvolve the mail system entirely?

You could use the filtering interface in recent versions of INN to write a
Perl or Python filter to modify the Newsgroups header of all incoming
posts to add the appropriate crosspost.  I think that would work and might
be a bit cleaner.  Unfortunately, I don't think INN 1.7.2 will cut it (or
otherwise I'd recommend just upgrading to that version, since it would be
a much easier upgrade from INN 1.5.1), since I think the modifiable
headers stuff wasn't added until the 2.x series.

> The "archive" channel would be nice, except that I want the archive
> groups to be readable - in the history database and in the overview
> database.

Yeah, the archive channel program can't do that.

> I suppose I could set up a cron process to rebuild the overview and
> history database every night, but there's gotta be a better way.

Ew, yes, I wouldn't do that.

> Keeping the article IDs separate is unnecessary, as long as I don't have
> to worry about an article getting removed when it expires from the
> non-archive groups.

Oh, if that was the worry, your mail to news script can just crosspost.  A
cancelled message would be deleted from both, but expire is smart enough
to retain the copy in other groups when it expires it from one group.

> I guess I'd also like the messages not to be linked, but copied.

This argues against crossposting.  I'm not sure if the Perl filter can
easily separate the message into two posts... hm.  Actually, yeah, one way
to do it using the Perl filter that would actually work fine in INN 1.7.2
I believe and will even be simpler.

In the Perl filter, write out a copy of the article except replacing the
Newsgroups header with the appropriate archive groups and the Message-ID
header with a new message ID (generated in the Perl script; something like
time . '$' . $$ . '$' . $counter++ would work if you had a global $counter
variable in the filter script that started at 0.  Put that copy of the
article into pathspool/incoming.  Then just run rnews -U periodically to
post the articles in pathspool/incoming to the server.

> If this is easy to solve in 2.2, just how hard is it to drop 2.2
> executables on top of a happy 1.5.1?

Very hard.  The format of the spool, overview, and history has all
changed.  We don't recommend people even try this; instead, it's
recommended that if you want to upgrade that you use innxmit to transfer
all the articles to a new system over protocol.

However, dropping INN 1.7.2 executables on top of a happy 1.5.1 should
work pretty well; I've done that myself, although I redid the
configuration at the same time and you may have to double-check there for
anything that might have changed.  And INN 1.7.2 is very stable and
probably a better tool for what you're doing right now than INN 2.x is,
since traditional spool support in INN 2.x is still less than ideal.

<ftp://ftp.isc.org/isc/inn/OLD/1.7/inn-1.7.2.insync-1.1d.tar.gz> is the
best and essentially the final version of INN 1.x and is what I'd
recommend using.

> I'm leery of that approach anyway, though, since I had to hack 1.5.1 to
> do username/password authentication, and unless 2.2 does it the same way
> I do, well, I hate work, and that would be work.

You'll probably have to hack that into INN 1.7.2 again as well, but the
code to hack is probably identical to the code in 1.5.1 or very close.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <yl66e6giw0.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
References: <3B1D2964.5388081B@ycrdi.com>

Show Full Headers
Complete Article Headers
Message-ID: <yl66e6giw0.fsf@windlord.stanford.edu>
Subject: Re: Auto Crossposting in INN 1.5.1?
Date: Sat, 09 Jun 2001 08:25:03 +0000
From: Russ Allbery <rra@stanford.edu>
References: <3B1D2964.5388081B@ycrdi.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 100
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 992075103 16023 171.64.13.23 (9 Jun 2001 08:25:03 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)