BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] I'm looking for a "lightweight" nntp client
- Subject: [Discuss] I'm looking for a "lightweight" nntp client
- From: hag at linnaean.org (Daniel Hagerty)
- Date: Sun, 28 Oct 2012 11:25:19 -0400
- In-reply-to: <508C2783.2070908@horne.net> (Bill Horne's message of "Sat, 27 Oct 2012 14:27:15 -0400")
- References: <508C2783.2070908@horne.net>
Lightweight would be a shell script that uses netcat for the post. #!/bin/sh msgid=`date +%Y%m%d-%H%M%S at linnaean.org` perl -pe 's/\n/\r\n/' <<_EOF_ | nc localhost 119 takethis <$msgid> Path: you!me Newsgroups: linnaean.test Message-ID: <$msgid> Date: `date "+%a, %d %b %Y %H:%M:%S %z"` From: Daniel Hagerty <hag at linnaean.org> Subject: $1 `cat` . quit _EOF_ You use it like this: $ /tmp/post "this is a subject" < /tmp/body 200 perdition.linnaean.org InterNetNews server INN 2.4.6 ready 239 <20121028-112226 at linnaean.org> 205 . $ If all goes well, you should see a 2xx line for the server banner, a 2xx reply for the takethis, and another 2xx response for the quit. This script uses takethis for the post; I can't imagine any news server doesn't implement it by now. Older ihave is possible, but a few more lines and more room for wrong. All of the headers are required; adjust them as needed. The perl bit is to handle NNTP demanding MS-DOS style crlf line endings. It does absolutely no error checking, doesn't attempt to quote any body line containing a sole ".", and hasn't had its rabies shots. Most of these things could be done, but would take it over the ten minute example.
- References:
- [Discuss] I'm looking for a "lightweight" nntp client
- From: bill at horne.net (Bill Horne)
- [Discuss] I'm looking for a "lightweight" nntp client
- Prev by Date: [Discuss] I'm looking for a "lightweight" nntp client
- Next by Date: [Discuss] I'm looking for a "lightweight" nntp client
- Previous by thread: [Discuss] I'm looking for a "lightweight" nntp client
- Next by thread: [Discuss] I'm looking for a "lightweight" nntp client
- Index(es):