🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #73610

Re: NoCeM tools?

#73610
From: nocem
Date: Wed, 10 May 2006 14:12
112 lines
3986 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[ fixed two fatal errors. Please ignore the remailer message 
  that might follow. ]

Russ Allbery:

>     Add to the newsfeeds file an entry like this one:
>
>         nocem:!*,alt.nocem.misc,news.lists.filter\
>             :Tc,Wf,Ap:/usr/local/news/bin/perl-nocem

Beware, that's news.lists.filter_s_!

> perl-nocem may need some additional love as NoCeMs become more popular and
> more of the checking and verification options become relevant.

Here we go:

perl-nocem relies on the 'error' priority which is not available in Linux,
try this one to verify:

#!/usr/bin/perl -w
use Sys::Syslog;
openlog ("test", '', 'user');
syslog ('error', 'foo');
# syslog: invalid level/facility: error at test-syslog.pl line 4
closelog ();


Russ, since you're already the Debian maintainer for libnews-article-perl
and libpgp-sign-perl: Could you please also pick News::Article::NoCeM
as libnews-article-nocem-perl _and_ fix a bug in there?

|  $self->add_body("-----BEGIN PGP SIGNED MESSAGE-----");
should be followed by
|  $self->add_body("Hash: SHA1");

else verification will fail when using gpg to verify nocems. A more
convenient signing method in PGP::Sign like "sign this article" was a
great improvement. NoCeM.pm is rather an ugly hack at that place.


Debian users should be aware that creation of nocems from a newsfeeds
channel might fail since HOME is appearently set to /usr/lib/news instead
of /var/spool/news. You might want to set an according symlink.


Tim, you were asking for a script. I find you credited in
News::Article::NoCeM so what's so bad with it? My script gets a list of
storage token(s) and drops the nocem article in $spool:

#!/usr/bin/perl -w

use News::Article;
use News::Article::NoCeM;

use strict;

my $SM = '/usr/lib/news/bin/sm';
my $spool = 'FIXME';

my $type = 'Spam';

my $key_id = 'PUBLIC KEY ID';

@ARGV || exit 1;

my $token;

my $prefix = 
    "key ID $key_id FIXME.\n" .
    "Key fingerprint = FIXME\n" .
    "\n" .
    "Suggested nocem.ctl:\n" .
    "FIXME";

my $nocem = new News::Article::NoCeM ();

foreach $token (@ARGV) {
    my @raw = `$SM $token`;
    my $art = new News::Article (\@raw) || die;
    $nocem -> hide ($type, $art);
}

my $notice = $nocem -> make_notice (
    $type, 
    'FIXME', 
    'NEWSGROUPS',
    'FROM',
    $prefix
); 

# some munging - USE WITH CARE
# $notice -> drop_headers ('X-Issued-By', 'Message-ID', 'Path');

# $notice -> add_headers ("X-No-Archive", "Yes");

$notice -> sign ('PRIVATE KEY ID', 'PASSPHRASE');

$notice -> write_unique_file ($spool);

# start queue run now

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEYfR86m4Df9CaCWYRAu0uAJ9Ua4pd9o5mEUTOG4VFPRYbUoCWUgCeMfW1
5E7lrEDFz/dRcoU7vehUp9g=
=ucCK
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <4461f4b0$0$11069$9b4e6d93@newsread4.arcor-online.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!news.arcor.de!not-for-mail
References: <tskirvin.20060509193905$4e43@cairo.ks.uiuc.edu> <87wtcvnf6g.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <4461f4b0$0$11069$9b4e6d93@newsread4.arcor-online.net>
Subject: Re: NoCeM tools?
Date: Wed, 10 May 2006 14:12:00 +0000
From: nocem@arcor.de
References: <tskirvin.20060509193905$4e43@cairo.ks.uiuc.edu> <87wtcvnf6g.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!news.arcor.de!not-for-mail
Newsgroups: news.software.nntp
X-Public-Key: D09A0966
X-No-Archive: Yes
X-Disclaimer: Not related to Arcor
Lines: 112
Organization: Arcor
NNTP-Posting-Date: 10 May 2006 16:12:00 MEST
NNTP-Posting-Host: 63abb099.newsread4.arcor-online.net
X-Trace: DXC=j;
 nKHZaC]e8h^:`T28h7Q<:ejgIfPPld4jW\KbG]kaM8]kI_X=5Kea6SDAMG>HH[A>C=CkZl>O5;
 ?42Zg]Q]hXN4
X-Complaints-To: usenet-abuse@arcor.de