NNTP COMPRESS clients? RFC 8054

Julien ÉLIE julien at trigofacile.com
Mon Jul 15 20:17:49 UTC 2019

Hi Eric,

> 	git clone https://80x24.org/perl-libnet.git
> 	(nntp-compress branch)


"sysread may call SSL_read, and SSL_read may buffer extra
data in userspace which can be returned via sysread without
making another read(2) syscall.  This makes it it possible for
select() to block indefinitely since select() only knows about
buffers in the kernel, not userspace."

Nice catch!  Hopefully it will be fixed in Net::NNTP.
For your information, INN also suffered from that annoying bug in 
earlier 2.4.x versions.  That was why we finally by-passed the use of 
select() because it generated dead connections.  And also implemented a 
timeout alarm signal around SSL_read().


+  croak("NNTP connection already compressed ($comp)") if $comp;
+  croak("$alg not supported (only 'DEFLATE')") if $alg ne 'DEFLATE';

Note that these messages have different response codes:  502 for the 
first one, 503 for the last one.

+  can_deflate() or die $nodeflate_warn;
+  $err == Z_OK or die "Inflate->new failed: $err\n";
+  $err == Z_OK or die "Deflate->new failed: $err\n";

It should be a 403 response code, and then the connections goes on 
uncompressed (same remark found in your patch against public-inbox-nntpd).

> My plan is to keep public-inbox-nntpd read-only; since (AFAIK)
> NNTP lacks good spam filtering

Isn't Cleanfeed good enough for your needs?

I am also aware of a use of SpamAssassin with INN.  Maybe it would 
better fit your expectations?

Installation guide in French:

> and most news->mail gateways get shut down because of that.

Too bad :-(

> I also don't want to hassle him or anybody at perl.org with
> migrating, given how little load it sees:
>    http://nntp.perl.org/group/perl.perl5.porters/255487

I see...  Too bad too :-(

Julien ÉLIE

« Ta remise sur pied lui a fait perdre la tête ! » (Astérix)

More information about the inn-workers mailing list