Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Unix weanies are as bad at this as anyone. -- Larry Wall in <199702111730.JAA28598@wall.org>


computers / news.software.readers / Re: [slrn] post article from command line?

SubjectAuthor
* [slrn] post article from command line?Grant Edwards
+- Re: [slrn] post article from command line?Ted Heise
+- Re: [slrn] post article from command line?Urs Janßen
+- Re: [slrn] post article from command line?Sam
+- Re: [slrn] post article from command line?Ivan Shmakov
`- Re: [slrn] post article from command line?Adam W.

1
[slrn] post article from command line?

<u3up95$47o$1@reader2.panix.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1317&group=news.software.readers#1317

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.localhost!not-for-mail
From: inva...@invalid.invalid (Grant Edwards)
Newsgroups: news.software.readers
Subject: [slrn] post article from command line?
Date: Tue, 16 May 2023 02:20:21 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <u3up95$47o$1@reader2.panix.com>
Injection-Date: Tue, 16 May 2023 02:20:21 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="localhost:::1";
logging-data="4344"; mail-complaints-to="abuse@panix.com"
User-Agent: slrn/1.0.3 (Linux)
 by: Grant Edwards - Tue, 16 May 2023 02:20 UTC

Is there a way to use slrn to post an article to an nntp server from
the command line?

If not, is there some other command-line utilty to do that?

Python is removing NNTP support from the standard library, so my
simple "inews" workalike is gong to stop working unless I start
maintaining a Python NNTP implementation.

:/

Re: [slrn] post article from command line?

<slrnu66sjd.1jk.theise@panix2.panix.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1318&group=news.software.readers#1318

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.2001:470:30::a654:102!not-for-mail
From: the...@panix.com (Ted Heise)
Newsgroups: news.software.readers
Subject: Re: [slrn] post article from command line?
Date: Tue, 16 May 2023 12:09:17 -0000 (UTC)
Organization: My own, such as it is
Message-ID: <slrnu66sjd.1jk.theise@panix2.panix.com>
References: <u3up95$47o$1@reader2.panix.com>
Injection-Date: Tue, 16 May 2023 12:09:17 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="2001:470:30::a654:102";
logging-data="11597"; mail-complaints-to="abuse@panix.com"
User-Agent: slrn/1.0.3 (NetBSD)
 by: Ted Heise - Tue, 16 May 2023 12:09 UTC

On Tue, 16 May 2023 02:20:21 -0000 (UTC),
Grant Edwards <invalid@invalid.invalid> wrote:
> Is there a way to use slrn to post an article to an nntp server from
> the command line?
>
> If not, is there some other command-line utilty to do that?
>
> Python is removing NNTP support from the standard library, so my
> simple "inews" workalike is gong to stop working unless I start
> maintaining a Python NNTP implementation.
>
> :/

This is the script I use on panix to periodically post an FAQ,
perhaps it could be helpful.

------- begin quote -----------------------

#!/usr/local/bin/perl5.22

use warnings;
use strict;
use Net::NNTP;

my $server_name="news.panix.com";

my @post=`cat FAQ/araa-FAQ-v1.16`;

my $Server = Net::NNTP->new($server_name, Reader => 1, Debug =>
0);
if (!$Server)
{ print " Can't connect to news! Not posted\n";
} else
{ $Server->post();
my $ServerCod = $Server->code();
if ($ServerCod == 340)
{
$Server->datasend(@post);
$Server->dataend;
if (!$Server->ok())
{
my $ServerMsg = $Server->message();
$Server->quit();
print " Posting failed! Response from news server:\n" .
$Server->code() . " $ServerMsg\n";
}
else
{
print " Posted OK\n";
}
}
else
{
print " Post command not accept\n";
}
$Server->quit();
}

------- end quote -------------------------

I invoke it by a crontab entry. Can't recall where I got the
script in the first place, but I'm *sure* it wasn't written by me.
I probably just STFWd for it.

--
Ted Heise <theise@panix.com> West Lafayette, IN, USA

Re: [slrn] post article from command line?

<u3vt4t$3mr$1@nntp.de>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1319&group=news.software.readers#1319

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.cgarbs.de!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mail
From: urs...@buil.tin.org (Urs Janßen)
Newsgroups: news.software.readers
Subject: Re: [slrn] post article from command line?
Date: Tue, 16 May 2023 12:32:59 -0000 (UTC)
Organization: tin.org
Archive: no
Message-ID: <u3vt4t$3mr$1@nntp.de>
References: <u3up95$47o$1@reader2.panix.com>
Injection-Date: Tue, 16 May 2023 12:32:59 -0000 (UTC)
Injection-Info: nntp.de; posting-host="akk21-int.akk.kit.edu:2a00:1398:5:f602:cafe:cafe:cafe:21";
logging-data="3803"; mail-complaints-to="abuse@nntp.de"
User-Agent: tin/2.6.3-20230505 ("Pittyvaich") (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock: sha1:to7Ciyh76drmsWBuPkdSSEE3zkY=
X-No-Archive: yes
X-No-HTML: yes
 by: Urs Janßen - Tue, 16 May 2023 12:32 UTC

> If not, is there some other command-line utilty to do that?

tinews uses perl Net::NNTP,
<http://www.tin.org/bin/man.cgi?section=1&topic=tinews>

<http://bzr.tin.org/tools/tinews.pl>
<ftp://ftp.tin.org/pub/news/clients/tin/tools/tinews.pl>

Re: [slrn] post article from command line?

<VYS8M.2927018$iU59.2545977@fx14.iad>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1321&group=news.software.readers#1321

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
From: sam...@samt.invalid (Sam)
Newsgroups: news.software.readers
Subject: Re: [slrn] post article from command line?
References: <u3up95$47o$1@reader2.panix.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 17
Message-ID: <VYS8M.2927018$iU59.2545977@fx14.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Tue, 16 May 2023 14:55:00 -0700
X-Received-Bytes: 1278
 by: Sam - Tue, 16 May 2023 21:55 UTC

On Tue, 16 May 2023 02:20:21 -0000 (UTC), Grant Edwards
<invalid@invalid.invalid> wrote:

>Is there a way to use slrn to post an article to an nntp server from
>the command line?
>
>If not, is there some other command-line utilty to do that?
>
>Python is removing NNTP support from the standard library, so my
>simple "inews" workalike is gong to stop working unless I start
>maintaining a Python NNTP implementation.
>
>:/

You can create the message and use the slrnpull program to post it to
a newsgroup.

Re: [slrn] post article from command line?

<u48qcr$ps3u$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1326&group=news.software.readers#1326

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: iva...@siamics.netNOSPAM.invalid (Ivan Shmakov)
Newsgroups: news.software.readers
Subject: Re: [slrn] post article from command line?
Date: Fri, 19 May 2023 21:40:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <u48qcr$ps3u$1@dont-email.me>
References: <u3up95$47o$1@reader2.panix.com>
Injection-Date: Fri, 19 May 2023 21:40:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6448ed01eecce87e2af15cf3313ef1c2";
logging-data="847998"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UfZ3Xl2UKOeLMoC3Y5Ycd"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:MBPHbUtp5OON5byTEDIQrZEGUis=
License: CC0-1.0 (original contributions only)
 by: Ivan Shmakov - Fri, 19 May 2023 21:40 UTC

>>>>> On 2023-05-16, Grant Edwards wrote:

> Is there a way to use slrn to post an article to an nntp server
> from the command line?

Aside of using the already suggested slrnpull(1)? None that
I'd know of.

> If not, is there some other command-line utilty to do that?

> Python is removing NNTP support from the standard library, so my
> simple "inews" workalike is gong to stop working unless I start
> maintaining a Python NNTP implementation.

Is there a particular reason you can't use inews(1) proper?

NNTP isn't /that/ sophisticated (or quickly evolving, FTM)
a protocol, so maintaining the library would probably only
take a modest effort. But aside of that, as other posters
have already pointed, there's Net::NNTP for Perl, and AFAIK,
it isn't going to be removed anytime soon.

--
FSF associate member #7257 http://am-1.org/~ivan/

Re: [slrn] post article from command line?

<u49i5j$i47$2$arnold@news.chmurka.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=1327&group=news.software.readers#1327

 copy link   Newsgroups: news.software.readers
Path: i2pn2.org!i2pn.org!news.chmurka.net!.POSTED.s.v.chmurka.net!not-for-mail
From: gof-cut-...@cut-this-chmurka.net.invalid (Adam W.)
Newsgroups: news.software.readers
Subject: Re: [slrn] post article from command line?
Date: Sat, 20 May 2023 04:26:27 -0000 (UTC)
Organization: news.chmurka.net
Message-ID: <u49i5j$i47$2$arnold@news.chmurka.net>
References: <u3up95$47o$1@reader2.panix.com>
NNTP-Posting-Host: s.v.chmurka.net
Injection-Date: Sat, 20 May 2023 04:26:27 -0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="arnold"; posting-host="s.v.chmurka.net:172.24.44.20";
logging-data="18567"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.32-v7+ (armv7l))
Cancel-Lock: sha1:GNiiGxCEGIvgE2bCocalQXhWUys=
sha1:87lg3JwczNwDNoNyTTxbgnr/A2c= sha256:hGIgIi50b9l4eBaVQijjsCPCuVZq9wQIVR/JKsX1fBw=
sha1:XbeMHCemRyOXPfcr6kzbxp5EQfI= sha256:Cqr8xn15/6TXXquElxO2N3JY95eCTb0ZR3qKIuICugc=
 by: Adam W. - Sat, 20 May 2023 04:26 UTC

Grant Edwards <invalid@invalid.invalid> wrote:

> Python is removing NNTP support from the standard library, so my
> simple "inews" workalike is gong to stop working unless I start
> maintaining a Python NNTP implementation.

Is there any reason to not use rpost?

Here's one of my quick and dirty scripts:

#!/usr/bin/env python3

import os
import subprocess

dir = "/usr/local/news/spool/news-stat"
list = os.listdir(dir)

for entry in list:
if not entry.endswith(".to-be-posted"):
continue
pathname = dir + "/" + entry
basename = pathname.replace(".to-be-posted", "")
tmpname = basename + ".posting"
os.rename(pathname, tmpname)
p = subprocess.run("/usr/bin/rpost localhost -u -U (redacted) -P (redacted) -M < " + tmpname, shell=True)
if p.returncode != 0:
print("Command failed")
os.rename(tmpname, pathname)
else:
print("Command succeeded")
os.remove(tmpname)

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor