🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #164192

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

#164192
From: VPN user
Date: Thu, 31 Mar 2016 15:00
49 lines
2319 bytes
This is an improved checking script.

#!/usr/bin/expect
#********************************************************************
#*
#*    Test if NNTP posting is allowed by a given news server
#*    for the current VPN connection within 10 seconds.
#*
#* Usage:    vpnusenet.exp server port
#*
#* Example:  vpnusenet.exp nntp.aioe.org 119
#*
#* Output: news server will state whether posting is allowed or
#*          otherwise, you will get any telnet failure messages.
#*
#* Return code:
#*         $? = 0 upon success
#*         $? = 1 upon failure
#*
#********************************************************************

set timeout 10

     #********************************************************
     # Obtain the newsserver & NNTP port from the command line
     #*********************************************************

set _server [lindex $argv 0]
set _port [lindex $argv 1]
# send_user "...Connecting to ${_server}:${_port}\n"
   puts "\n\n...Connecting to ${_server}:${_port}\n"

     #**************************************************
     # Report whether the newsserver allows NNTP posting
     #**************************************************

puts "\n\nChecking for connection-refused or for posting-ok condition...\n"

spawn telnet $_server $_port
expect {
  "posting ok" { send "quit\r" ; exit 0 }
  }

  puts "\n\nTest Failure: \n\r"
  exit 1

expect eof

#********* end testvpnusenet.exp ***************************
Technical Details
Message-ID: <ndje2p$orm$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
References: <nda1rf$65o$1@news.mixmin.net> <ndboei$tur$2@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <ndje2p$orm$1@news.mixmin.net>
Subject: Re: SOLVED: What is a quick Linux bash test of a free public newsserver on VPN?
Date: Thu, 31 Mar 2016 15:00:42 +0000
From: VPN user <vpnuser@example.com>
References: <nda1rf$65o$1@news.mixmin.net> <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
Newsgroups: alt.free.newsservers
Organization: Mixmin
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Mar 2016 15:00:42 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="13c1e94b6469c07ed8da14e140e600df0503a233";
Lines: 48