🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
8 messages
8 total messages Started by Julien Michielsen Tue, 17 Feb 1998 00:00
How to automagically edit postings?
#38843
Author: Julien Michielsen
Date: Tue, 17 Feb 1998 00:00
13 lines
994 bytes
Always after making a posting I must go through the proces of
removing the lines "NNTP-Posting-Host ..." and "Xref ...".
Writing scripts is not my strongest point, and I wonder how
to put this recurrent procedure into a script.
Thanks for your help
Julien
---
Julien Michielsen                                     +31-10-4765.771
jjm@xs4all.nl      
jmichielsen@kennis.hobby.nl

Re: How to automagically edit postings?
#38820
Author: Frank Slootweg
Date: Tue, 17 Feb 1998 00:00
13 lines
1011 bytes
  Hmmm! Strange. With tin you shouldn't have to do this. Normally the
server generates the NNTP-Posting-Host and Xref lines. I think it might
be a quirk from your ISP (xs4all) because as far as I know tin normally
says "X-Newsreader: ..." while yours says

> User-Agent: tin/pre-1.4-971224 (UNIX) (Linux/2.0.31 (i486))

or the "User-Agent:" thing is a pre-1.4 thing (I am still using 1.2).

  But I'm sure that Urs or/and Greg know much more about all this.

Re: How to automagically edit postings?
#38844
Author: Greg Berigan
Date: Tue, 17 Feb 1998 00:00
35 lines
2088 bytes
franks@neth.hp.com (Frank Slootweg) wrote:

>   Hmmm! Strange. With tin you shouldn't have to do this. Normally the
> server generates the NNTP-Posting-Host and Xref lines.

Yes, and inews generates the Originator header or other similar headers
depending on when it was built.

> I think it might
> be a quirk from your ISP (xs4all) because as far as I know tin normally
> says "X-Newsreader: ..." while yours says

>> User-Agent: tin/pre-1.4-971224 (UNIX) (Linux/2.0.31 (i486))

> or the "User-Agent:" thing is a pre-1.4 thing (I am still using 1.2).
> 
>   But I'm sure that Urs or/and Greg know much more about all this.

Tin pre-1.4 now generates User-Agent instead of X-Newsreader, X-Mailer, or
one of the other many and varied headers, and uses a standard syntax
borrowed from RFC 1945.  It is part of the emerging standard (which
reminds me, I need to mail out the latest draft).

I have User-Agent defined as a personal extra header in my preferences for
MT-NW, which is why this message has both it and an X-Newsreader header.

-- 
         _-<#)-=# http://incolor.inetnebr.com/wotw/
     ___/___
  _-~_--<###)     Due to widespread abuse, I no longer read any messages
<~c>' __--<      from users who employ munged addresses in their headers.
 \_--=____#)    Richard Hart and Justin Gunn of C|NET, this means you too.

Re: How to automagically .. found it
#38853
Author: Julien Michielsen
Date: Wed, 18 Feb 1998 00:00
29 lines
1957 bytes
Greg Berigan <gberigan@cse.unl.edu> wrote:
> jjm@beuk.xs4all.nl (Julien Michielsen) wrote:
>>Greg Berigan <gberigan@cse.unl.edu> wrote:
>>>franks@neth.hp.com (Frank Slootweg) wrote:

>> Just generated a test-posting, and will show some headers that I would
>> remove. (Otherwise my ISP won't accept this posting)
>>
>> Path: beuk.xs4all.nl!not-for-mail
>> From: Julien Michielsen <jjm@beuk.xs4all.nl>

> You shouldn't see these when you try to post a new article.  Generally
> you should not generate them yourself.  

Thanks for your help. Composing the answer to your replies I found the
answer to my question. I had not mentioned that I'm using suck's rpost
to get my articles to the server. Writing my reply I remembered having
read about editing headers when posting articles in the suck man page.
Indeed my question was described there in detail: the page describes
how to remove the NNTP-Posting-Host header, and likewise I'll remove
the Xref header that my ISP won't swallow either.
Thanks again, and sorry ...
---
Julien Michielsen                                     +31-10-4765.771
jjm@xs4all.nl      
jmichielsen@kennis.hobby.nl

Re: How to automagically edit postings?
#38867
Author: Greg Berigan
Date: Wed, 18 Feb 1998 00:00
59 lines
3217 bytes
jjm@beuk.xs4all.nl (Julien Michielsen) wrote:
>Greg Berigan <gberigan@cse.unl.edu> wrote:
>>franks@neth.hp.com (Frank Slootweg) wrote:

> Just generated a test-posting, and will show some headers that I would
> remove. (Otherwise my ISP won't accept this posting)
>
> Path: beuk.xs4all.nl!not-for-mail
> From: Julien Michielsen <jjm@beuk.xs4all.nl>

You shouldn't see these when you try to post a new article.  Generally
you should not generate them yourself.  Trim them before attempting to
repost an article with them present if they are in the header block (if
they are in the body it doesn't matter).

> Lines: 6

Some servers object when the Lines header is provided, or at least when
provided but the body is modified to be more or fewer than this number
of lines.

> Message-ID: <6cehc5$51v$1@beuk.xs4all.nl>

Unless you are posting this article to a server where the original
hasn't yet propogated, you don't want to be reusing the same message
ID.

> To get this posting accepted, I first need to remove the two lines with
> NNTP-Posting-Host and Xref . Would newer releases than my pre-1.4-971224
> take care of these headers, and make that a posting immediately goes 
> through my ISP? And if not, would you be able to tell how to remove these
> redundant headers?

A newly posted article should not be sent to the server with an
NNTP-Posting-Host or Xref header.  They are to be generated by the
server.  Tin does not generate these headers and would only send them if
you were manually reposting an existing news article with the complete
set of headers it had on a server.  Since servers reject such articles,
tin is not compelled to trim them out itself before injecting them.

>>> But I'm sure that Urs or/and Greg know much more about all this.

> PS Who are Urs and/or Greg?  The last one not Greg Woods, maintainer
> of the smail list?

Urs is in charge of the development of tin-pre 1.4.  I assumed Greg was
me as I know a lot about tin and was responsible for getting tin to
support the User-Agent header.  (It currently is controlled by a
preference setting, so if you prefer X-Newsreader you can switch it
back, but User-Agent is so much better.)

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_  "Did you see that Parkins boy's body in the tunnels?" "Just
(#>_--'~--~`--_<#)  the photos.  Worst thing I've ever seen; kid had no face."

Re: How to automagically edit postings?
#38876
Author: Julien Michielsen
Date: Wed, 18 Feb 1998 00:00
41 lines
2148 bytes
Greg Berigan <gberigan@cse.unl.edu> wrote:
> franks@neth.hp.com (Frank Slootweg) wrote:

>>   But I'm sure that Urs or/and Greg know much more about all this.

> Tin pre-1.4 now generates User-Agent instead of X-Newsreader, X-Mailer, or
> one of the other many and varied headers, and uses a standard syntax
> borrowed from RFC 1945.  It is part of the emerging standard (which
> reminds me, I need to mail out the latest draft).

Just generated a test-posting, and will show some headers that I would
remove. (Otherwise my ISP won't accept this posting)

Path: beuk.xs4all.nl!not-for-mail
From: Julien Michielsen <jjm@beuk.xs4all.nl>
Newsgroups: nl.test
Subject: header test
Date: 18 Feb 1998 12:40:53 +0100
Organization: private
Lines: 6
Message-ID: <6cehc5$51v$1@beuk.xs4all.nl>
User-Agent: tin/pre-1.4-971224 (UNIX) (Linux/2.0.31 (i486))

To get this posting accepted, I first need to remove the two lines with
NNTP-Posting-Host and Xref . Would newer releases than my pre-1.4-971224
take care of these headers, and make that a posting immediately goes 
through my ISP? And if not, would you be able to tell how to remove these
redundant headers?

Thanks,
Julien

PS Who are Urs and/or Greg?  The last one not Greg Woods, maintainer
of the smail list?
---
Julien Michielsen                                     +31-10-4765.771
jjm@xs4all.nl      
jmichielsen@kennis.hobby.nl

Re: How to automagically edit postings?
#38879
Author: Urko Lusa
Date: Wed, 18 Feb 1998 00:00
39 lines
1485 bytes
Julien Michielsen <jjm@beuk.xs4all.nl> wrote:

>Always after making a posting I must go through the proces of
>removing the lines "NNTP-Posting-Host ..." and "Xref ...".
>Writing scripts is not my strongest point, and I wonder how
>to put this recurrent procedure into a script.

I use the following script as a filter:

#!/usr/bin/perl
#
# Quitar el NNTP-Posting-Host y el Xref
#


$comparar = 1;

while (<STDIN>) {
   $linea = $_;
   if ($linea eq "\n") { $comparar = 0; } # se acabaron las cabeceras
   if ($comparar) {
      if (!(substr($linea,0,19) eq "NNTP-Posting-Host: " or
      substr($linea,0,6) eq "Xref: " or
      substr($linea,0,8) eq "Sender: ")) {
        $mensaje .= $linea ;
	}
    }
    else {
    	$mensaje .= $linea ;
    }
}

print $mensaje;

-- 
Urko Lusa <ulusa@lacueva.ddns.org> (2:343/143.30@fidonet.org)

Re: How to automagically edit postings?
#38921
Author: Frank Slootweg
Date: Thu, 19 Feb 1998 00:00
46 lines
2091 bytes
  In addition to Greg's remarks:

  If I start the posting of a new article (i.e. not a followup to an
existing article), tin just asks me

> Post subject [Test]>

and when I press return, it starts up the editor and presents me with

> Subject: Test
> Newsgroups: news.software.readers
> Organization: NOYB
> Summary:
> Keywords:
> 
> 

i.e. most of the lines which you (Julien) mentioned are (correctly)
absent.

JM> Path: beuk.xs4all.nl!not-for-mail
JM> From: Julien Michielsen <jjm@beuk.xs4all.nl>
JM> Newsgroups: nl.test
JM> Subject: header test
JM> Date: 18 Feb 1998 12:40:53 +0100
JM> Organization: private
JM> Lines: 6
JM> Message-ID: <6cehc5$51v$1@beuk.xs4all.nl>
JM> User-Agent: tin/pre-1.4-971224 (UNIX) (Linux/2.0.31 (i486))

  Greg covered already most of these headers. Besides the ones he
mentioned, I also think that tin should not present you with:

JM> Date: 18 Feb 1998 12:40:53 +0100
JM> User-Agent: tin/pre-1.4-971224 (UNIX) (Linux/2.0.31 (i486))

  tin should generate both these lines when you do the actual posting,
i.e. after leaving the editor, instead of before starting the editor.

  If you need further help, then I think you should tell a little more
about your setup, i.e. how are you connected to xs4all, what are the
names of the systems involved, where do you run tin (on your system
(name?) or on an xs4all system (name?), etc..

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