News (RFC5536 / RFC1036) to JNTP (JSON) GateWay for INN
Clone or download
Pull request Compare This branch is 20 commits ahead of gegeweb:devel.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


news2json - News (RFC5536 / RFC1036) to JNTP (JSON) GateWay for INN

Copyright (c) 2014, Gérald Niel


INN gives us

@token@ <message-id> feeds

for each article that needs to be sended. We invoke sm on the localhost to get the actual article, convert it to json string and send it to JNTP server over HTTP.

In the INN's newsfeeds file, you need to have a channel feed:


and a site for each of the various jntp site you're feeding, such as!*,local.*:Ap,Tm:news2json!

According to JNTP RFC (see, if your hostname doesn't match with your public ip/hostname configured for your server by the JNTP server you're feeding you need to fix your 'fromname' in the optional <pathetc>/

This file map jntp fqdn feed with hostname in one line per feed needed to be fixed.

For example if your hostname (fromhost in /innfeed.conf) is name.domain.local but you need to be jntp.public.tld for the feed such as above :

# Feed (fqdn in newsfeeds)		Fromname				jntp.public.tld

Signing Jid with ssl/RSA 1024 key:

this program attempt to find ssl/RSA keys pair in /ssl.

Create the folder if not exists:

$ sudo -u news mkdir <pathetc>/ssl
$ sudo chmod 700 <pathetc>/ssl

Generate keys pair

$ sudo -u news openssl genrsa -out <pathetc>/ssl/jntp.key 1024
$ sudo -u news openssl rsa -in <pathetc>/ssl/jntp.key -pubout > <pathetc>/ssl/jntp.cert


News (NNTP) to JSON (JNTP) channel backend.


Gérald Niel,

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.