🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #164165

Re: What is a quick Linux bash test of a free public newsserver on VPN?

#164165
From: VPN user
Date: Mon, 28 Mar 2016 17:08
99 lines
4205 bytes
Nobody? 
Not even Michael Baeuerle?

I can *manually* test posting using any of a number of news servers:
1. telnet nntp.aioe.org nntp
2. telnet freenews.netfront.net 119 
3. telnet news.mozilla.org 119
4. (more complicated)
   $ openssl s_client -connect news.mixmin.net:563

But I wonder if there is a shortcut test I can script?

Do I need to go through the entire longcut process in bash, or 
is there a shortcut to figure out when posting fails (yet a 
ping works as does a traceroute)?

Here is my multi-step longcut proving when nntp posting works.

1a. Telnet to the newsserver using the nntp port (use either "nntp" or "119"):
$ telnet nntp.aioe.org 119
--------------------------
1b. A successful connection should result in the following message:
Trying 46.165.242.75...
Connected to nntp.aioe.org.
Escape character is '^]'.
200 nntp.aioe.org InterNetNews NNRP server INN 2.5.4 ready (posting ok)
==========================
2a. Run the nntp "post" command:
post
--------------------------
2b. A successful response would be something like the following message:
340 Ok, recommended message-ID <ndblf0$19o6$1@gioia.aioe.org>
==========================
3a. Add required headers, a blank line, the body, & an ending dot:
From: foo@example.com
Newsgroups: alt.test
Subject: This is a test

This is a test
.
--------------------------
3b. A successful post should result in a unique message id:
240 Article received <ndblf0$19o6$1@gioia.aioe.org>
==========================
4a. Quit out of the telnet session:
quit 
--------------------------
4b. A successful message would be the following:
205 Bye!
Connection closed by foreign host.
==========================
5a. Now test a *different* server to see whether that post actually took:
$ telnet freenews.netfront.net nntp
--------------------------
5b. A successful connection should indicate something like the following:
Trying 202.81.252.44...
Connected to freenews.netfront.net.
Escape character is '^]'.
200 freenews.netfront.net InterNetNews NNRP server INN 2.5.4 ready (posting ok)
==========================
6a. Set the news group to the posted newsgroup:
group alt.test
--------------------------
6b. A successful response should look something like this:
211 4552 356765 361317 alt.test
--------------------------
==========================
7a. Ask for the article by the previously saved message id:
article <ndblf0$19o6$1@gioia.aioe.org>
--------------------------
7b. The result should be the article as posted:
220 0 <ndblf0$19o6$1@gioia.aioe.org> article
Path: aioe.org!.POSTED!not-for-mail
From: foo@example.com
Newsgroups: alt.test
Subject: This is a test
Date: Mon, 28 Mar 2016 16:18:21 +0000 (UTC)
Organization: Aioe.org NNTP Server
Lines: 1
Message-ID: <ndblf0$19o6$1@gioia.aioe.org>
NNTP-Posting-Host: C2t50uUupLYInn2uM5C5BQ.user.gioia.aioe.org
X-Complaints-To: abuse@aioe.org
X-Notice: Filtered by postfilter v. 0.8.2
Xref: aioe.org alt.test:361317

This is a test
.
==========================
8a. Quit out of the telnet session:
quit
--------------------------
8b. The response should be successful:
205 Bye!
Connection closed by foreign host.
==========================

Given that the longcut works, is there a clever shortcut that 
I can insert into a bash script that will test and report 
whether nntp posting is currently working?
Technical Details
Message-ID: <ndboei$tur$2@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
References: <nda1rf$65o$1@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <ndboei$tur$2@news.mixmin.net>
Subject: Re: What is a quick Linux bash test of a free public newsserver on VPN?
Date: Mon, 28 Mar 2016 17:08:35 +0000
From: VPN user <vpnuser@example.com>
References: <nda1rf$65o$1@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.free.newsservers
Organization: Mixmin
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 28 Mar 2016 17:08:35 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="a472fdfad2108f9afd287d23984e56ccfcd80798";
Lines: 99