Afficher un message
Vieux 04/05/2008, 17h17   #2
Theo v. Werkhoven
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Usenet server test script

The carbonbased lifeform Dave Farrance inspired comp.unix.shell with:
> Below is a script that posts a test message via a public newserver and
> provides a randomly generated title and Message-ID. It uses the "rpost"
> command, which is included in the "suck" package to post the message.
>
> I'd like to add a "suck" command to the script to read the message back
> from the server, using the specified Message-ID, and to display that
> message. I guess I'll figure out how to do it eventually, but the "suck"
> command seems to be far more complex than "rpost" and it requires config
> files. There's no easy way to do this that I'm missing, is there?


Sure there is.
$telnet news.xs4all.nl 119
Trying 194.109.133.242...
Connected to news.xs4all.nl.
Escape character is '^]'.
200 news.xs4all.nl NNRP Service Ready (posting ok).
article <l3kr14d2fhvghmla9rdh0ia12cupsq2fqs@4ax.com> /* my command */
220 0 <l3kr14d2fhvghmla9rdh0ia12cupsq2fqs@4ax.com> article
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!newsfeed.x s4all.nl!newsfeed2.news.
xs4all.nl!xs4all!feeds.phibee-telecom.net!news.mixmin.net!eweka.nl!hq-usenetpeer
s.eweka.nl!69.16.177.246.MISMATCH!cyclone03.ams!ne ws.ams.newshosting.com!npeersf
01.ams!newsfe30.ams2.POSTED!53ab2750!not-for-mail
From: The Beloved <maybe@one.day>
Newsgroups: nl.comp.hardware

With 'article' you get the post with the requested Message-ID.
Now write a little expect script and you're done.

Theo
--
theo at van-werkhoven.nl ICQ:277217131 SuSE Linux
linuxcounter.org: 99872 Jabber:muadib at jabber.xs4all.nl AMD XP3000+ 1024MB
"ik _heb_ niets tegen Microsoft, ik heb iets tegen
de uitwassen *van* Microsoft"
  Réponse avec citation
 
Page generated in 0,06539 seconds with 9 queries