🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #1355

Re: Header editing (Was Rewriting history)

#1355
From: John Washington
Date: Mon, 20 Nov 1995 00:00
99 lines
4929 bytes
On Monday, in article <816889401snz@tsys.demon.co.uk>
     tomw@tsys.demon.co.uk "Tom Wheeley" wrote:

TW> In article <816739142snz@wash.demon.co.uk>
TW>            john@wash.demon.co.uk "John Washington" writes:
TW> 
TW> > [the following morning]  (benefits of not going online immediately?)
TW> 
TW> heheh I know what you mean.  I've oft deleted posts under the cold light of
TW> day :-)

:-)  Yeah, I should have done that, rather than include that
.bat file!

..
TW> Almost completely unrelated, but this reminds me of a project I've been
TW> meaning to get on with for quite a while recently: a program to deal with
TW> mail headers.
TW> 
TW> I first thought of this as trying to find a way to (f)ollow-up articles in
TW> mailing lists, as periodically I _do_ get a bounce from the news server :(

I've never had that <smug grin>, but have I come close!  I
was so scared with what mail2news might do, I was super
careful. Thanks for the reassurance it doesn't crash Demon!

I'd really like to have 'r' and 'f' work in the obvious ways
on fake newsgroups, for I take about 10 mailing lists.  But
the huge problem is that every damn mailing list seems to
hack its headers in different ways.  Just take the normal
'Reply-To:' -- some give the mail reflector, so it's kind
of like a follow-up, others give the original poster.
For the second kind, I have the mail reflector's address
as an entry in my Snews alias file, so at least I don't
have to type out the full address.

TW> What I would like to be able to do is have my program scan through LIST.TXT
TW> before mail2snz gets its grubby little paws onto it, and add a Newsgroups:
TW> line.  Then, after snews is run, all postings to Newsgroups: &mail.list can
TW> have the Newsgroups line removed, a new Work file created and To: header
TW> updated.

So presumably you'll have an extra file somewhere that has a
list of the reflector addresses to send each pseudo-newsgroup?
I hadn't thought of that, I'd been trying (& failing) to
develop a universal rule for deducing it from the header.

TW> I thought at this point that a nice way to do this would be a batch file
TW> utility, so I would be able to do other thigns as well (whatever they might
TW> be).
TW> 
TW> I've even thought of a syntax:
TW> 
TW> HED <command> [switches] <file> <Header-Name> [data... | Env var name]
TW> 
TW> Where commands could include:
TW> 
TW> a: add,  r: remove,  c: change,  g: get (to env. var.)
TW> 
TW> I would then need a nice command line env. string routine program to chop
TW> up strings, comapre strings etc.. (John?!  Are you doing one of these?)

24hrs ago, yes.  But now I've discovered how much more
limited env vbles are than I'd imagined, now I know why
nobody uses them for anything but giving settings to
programs, not returning info.

TW> Anyway, *why* am I posting this?!  Well, I would like to know if anyone else
TW> has done something simialr (not counting advanced things like awk etc.)
TW> or if anyone had any comments, fatal flaws to point out etc.

I think it sounds like a nice way to try out some ideas, and
when you get a good way of doing this post-processing, that
works ok on several mail reflectors, then it could be built
into Snews.  Except there might be the usual cries against
using more memory.  ;-)  Or it might even be done with
minimal extra memory in Snews, by noting that the follow-up
is to a fake group (by the non-alpha 1st char) and when
you type 'p' shelling out to a utility that alters the
header immediately, instead of doing them later in a batch.

But it still leaves the problem of whether a 'r'eply goes
to the originator or the reflector.  That's the more
difficult one, yet perhaps more important -- for those
that have different private/public personae it can be
quite embarrassing to have one's whispers appear on a
reflector!

TW> oh, 1 question, *How is mail in the mail file separated.  AFAICR there isn't
TW> soemthing nice like the rnews.*

AFAIR, mail2snz looks for 'From ' at the start of a line.
It should also look for a preceding blank line, but I
don't recall if I was that careful.  Perhaps in practice
it doesn't matter, since any 'From ' should be turned
into '>From '.

--
John Washington
Technical Details
Message-ID: <816911617snz@wash.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <816201151snz@siberia.demon.co.uk> <816211836.5182@thokk.demon.co.uk> <816376122snz@alquds.demon.co.uk> <816389914snz@wash.demon.co.uk> <816696796snz@alquds.demon.co.uk> <816739142snz@wash.demon.co.uk> <816889401snz@tsys.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,e930b967a391bea0
X-Google-Attributes: gid10bb05,public
From: John Washington <john@wash.demon.co.uk>
Subject: Re: Header editing (Was Rewriting history)
Date: 1995/11/20
Message-ID: <816911617snz@wash.demon.co.uk>
X-Deja-AN: 119770375
x-nntp-posting-host: wash.demon.co.uk
references: <816201151snz@siberia.demon.co.uk> <816211836.5182@thokk.demon.co.uk> <816376122snz@alquds.demon.co.uk> <816389914snz@wash.demon.co.uk> <816696796snz@alquds.demon.co.uk> <816739142snz@wash.demon.co.uk> <816889401snz@tsys.demon.co.uk>
newsgroups: demon.ip.developers