Thread View: news.software.nntp
16 messages
16 total messages
Started by Tim Skirvin
Tue, 09 May 2006 19:39
NoCeM tools?
Author: Tim Skirvin
Date: Tue, 09 May 2006 19:39
Date: Tue, 09 May 2006 19:39
19 lines
1991 bytes
1991 bytes
Okay, I've been convinced: the right way for me to solve some of
Usenet's problems, at least for myself, is to start dealing with NoCeMs
instead of cancels. I'm willing, but now it'd be good to get some tools
set up.
There's two sides to this:
1. How do I start issuing NoCeMs nowadays? Are there nice tools
to generate NoCeMs, preferably written in a nice scripting language? Does
anybody have anything they'd like to share?
2. How do I currently set up INN to use NoCeMs? Are there nice
tutorials, especially so I can help others follow my lead?
- Tim Skirvin (tskirvin@killfile.org)
News Administrator, news.ks.uiuc.edu
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://news.ks.uiuc.edu/ UIUC News Server
Re: NoCeM tools?
Author: Russ Allbery
Date: Tue, 09 May 2006 19:58
Date: Tue, 09 May 2006 19:58
31 lines
2105 bytes
2105 bytes
Tim Skirvin <tskirvin@killfile.org> writes:
> 2. How do I currently set up INN to use NoCeMs? Are there nice
> tutorials, especially so I can help others follow my lead?
It should be pretty straightforward. See the man page for perl-nocem.
Quoting:
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
Import new keys with:
gpg --keyring=/usr/local/news/etc/pgp/ncmring.gpg --import \
--allow-non-selfsigned-uid
The nocem.ctl config file contains lines like:
annihilator-1@erlenstar.demon.co.uk:*
clewis@ferret:mmf,spam
perl-nocem may need some additional love as NoCeMs become more popular and
more of the checking and verification options become relevant.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NoCeM tools?
Author: Andrew Gierth
Date: Wed, 10 May 2006 03:45
Date: Wed, 10 May 2006 03:45
25 lines
2093 bytes
2093 bytes
>>>>> "Tim" == Tim Skirvin <tskirvin@killfile.org> writes: Tim> There's two sides to this: Tim> 1. How do I start issuing NoCeMs nowadays? Are there nice Tim> tools to generate NoCeMs, preferably written in a nice scripting Tim> language? Does anybody have anything they'd like to share? I do still have, somewhere, the code I was using for the job. While it's in some ways a bit specialised, it may be usable as a starting point. (It's all in Perl, which is entirely adequate for the job.) Broadly speaking what I did was divided into three parts: firstly the detected articles were logged to a file; secondly a regular process picked up the file at intervals and generated one or more messages (in the later versions of my code, messages were batched by hierarchy, though this needs to be done with care); thirdly, the generated posts were injected into the news stream. I could post some relevent parts of the code, though it'd need a bit of cleanup first to remove obsolete perlisms etc. -- Andrew. [Address in "From" no longer works usefully - blame the spammers]
Re: NoCeM tools?
Author: Marco d'Itri
Date: Wed, 10 May 2006 08:09
Date: Wed, 10 May 2006 08:09
15 lines
1433 bytes
1433 bytes
tskirvin@killfile.org wrote: > 1. How do I start issuing NoCeMs nowadays? Are there nice tools >to generate NoCeMs, preferably written in a nice scripting language? Does >anybody have anything they'd like to share? I have a perl module which does this, but it's four years old and I never actually used it for real. I will mail it to you. > 2. How do I currently set up INN to use NoCeMs? Are there nice >tutorials, especially so I can help others follow my lead? Using perl-nocem should be simple. -- ciao, | Marco | * The Internet is full. Go away. -- Joel Furr *
Re: NoCeM tools?
Author: nocem
Date: Wed, 10 May 2006 14:12
Date: Wed, 10 May 2006 14:12
112 lines
3986 bytes
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-----
Re: NoCeM tools?
Author: Tim Skirvin
Date: Wed, 10 May 2006 19:33
Date: Wed, 10 May 2006 19:33
14 lines
1946 bytes
1946 bytes
nocem@arcor.de writes:
> 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:
I didn't know about News::Article::NoCeM. Interesting. I think
this is the first time I have been cited in a man page without my
knowledge. *smile* I'll take a look at it, thanks.
- Tim Skirvin (tskirvin@killfile.org)
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://tskirvin.livejournal.com/ Skirv's LiveJournal
Re: NoCeM tools?
Author: Bill Davidsen
Date: Thu, 11 May 2006 15:55
Date: Thu, 11 May 2006 15:55
20 lines
2235 bytes
2235 bytes
Marco d'Itri wrote: > tskirvin@killfile.org wrote: > >> 1. How do I start issuing NoCeMs nowadays? Are there nice tools >> to generate NoCeMs, preferably written in a nice scripting language? Does >> anybody have anything they'd like to share? > I have a perl module which does this, but it's four years old and I > never actually used it for real. I will mail it to you. > >> 2. How do I currently set up INN to use NoCeMs? Are there nice >> tutorials, especially so I can help others follow my lead? > Using perl-nocem should be simple. > You probably want to put it where people can download, rather than have everyone ask for a copy. ;-) -- bill davidsen SBC/Prodigy Yorktown Heights NY data center http://newsgroups.news.prodigy.com
Re: NoCeM tools?
Author: Tim Skirvin
Date: Wed, 14 Jun 2006 21:22
Date: Wed, 14 Jun 2006 21:22
39 lines
2619 bytes
2619 bytes
Russ Allbery <rra@stanford.edu> writes:
> It should be pretty straightforward. See the man page for perl-nocem.
> Quoting:
> 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
Straight-forward enough...
> Import new keys with:
> gpg --keyring=/usr/local/news/etc/pgp/ncmring.gpg --import \
> --allow-non-selfsigned-uid
This doesn't seem to create the ring properly; do you know what
flags are necessary for this nowadays? Or which keyring I should symlink
from my ~news/.gpg directory?
> The nocem.ctl config file contains lines like:
> annihilator-1@erlenstar.demon.co.uk:*
> clewis@ferret:mmf,spam
This is based on the Issuer and Type headers?
Is there a way to test this stuff out?
I ask, because I just finished modifying my pgpmoose daemon to
issue NoCeM messages in addition to cancels... and now I need to see if i
can get them to work. (KeyID 0x1BF5F454, BTW, and it's available through
the key servers.)
- Tim Skirvin (tskirvin@killfile.org)
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://www.killfile.org/~tskirvin/resume.html Skirv's Resume
Re: NoCeM tools?
Author: Tim Skirvin
Date: Thu, 22 Jun 2006 19:42
Date: Thu, 22 Jun 2006 19:42
34 lines
2690 bytes
2690 bytes
tskirvin@killfile.org (Tim Skirvin) writes:
>> Import new keys with:
>> gpg --keyring=/usr/local/news/etc/pgp/ncmring.gpg --import \
>> --allow-non-selfsigned-uid
> This doesn't seem to create the ring properly; do you know what
> flags are necessary for this nowadays? Or which keyring I should symlink
> from my ~news/.gpg directory?
So... does anybody have idea how I should do with this? I've
tried symlinking ~/.gnupg/secring.pgp to news/etc/pgp/ncmring.gpg, but I
don't see any other reasonable way of doing this.
> Is there a way to test this stuff out?
*pokes around*
Okay, what I've done so far:
- Disabled syslog writing, since as noted by others, it's broken
under Linux. It's logging to a file.
- Symlinked that keyring file to ~news/.gnupg/public.gpg, and
run 'gpg --recv-keys 0x1BF5F454' to get it from the key
servers.
...so I'm now getting errors that I recognize, like 'BAD
signature'. So I've got a place to start. I'll keep working.
- Tim Skirvin (tskirvin@killfile.org)
News Administrator, news.ks.uiuc.edu
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://news.ks.uiuc.edu/ UIUC News Server
Re: NoCeM tools?
Author: Tim Skirvin
Date: Fri, 23 Jun 2006 14:19
Date: Fri, 23 Jun 2006 14:19
52 lines
3217 bytes
3217 bytes
tskirvin@killfile.org (Tim Skirvin) writes:
> ...so I'm now getting errors that I recognize, like 'BAD
> signature'. So I've got a place to start. I'll keep working.
Okay, I think I have everything working, and I've documented it
well. The biggest trick was that I had to modify News::Article::NoCeM to
put in the 'Hash: SHA1' line; I've contacted the author about this.
I've documented the steps I had to take to set this up here:
http://www.killfile.org/~tskirvin/nocem/inn.html
In short:
- Modify /usr/local/bin/perl-nocem to take out the Sys::Syslog
line, and add the following line to avoid a warning:
my $test = $inn::syslog_facility;
- Create a nocem.ctl file in news/etc, which contains:
pgpmoose@killfile.org:pgpmoose-forged-moderation
- Add the following to the newsfeeds file:
nocem:!*,alt.nocem.misc,news.lists.filters\
:Tc,Wf,Ap:/usr/local/bin/perl-nocem
- Create the proper GPG keyring:
mkdir -p ~news/etc/pgp; cd ~news/etc/pgp
ln -s ~news/.gnupg/pubring.gpg ncmring.gpg
- Import the proper keys
cd ~
wget http://www.killfile.org/~tskirvin/nocem/vlad.pgp
gpg --import --allow-non-selfsigned-uid < vlad.pgp
- Test it out
- Restart INN
Now we'll see how long it takes before I start disabling cancels
on my various news servers. I don't expect it'll take too long.
- Tim Skirvin (tskirvin@killfile.org)
News Administrator, news.ks.uiuc.edu
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://news.ks.uiuc.edu/ UIUC News Server
Re: NoCeM tools?
Author: Russ Allbery
Date: Fri, 23 Jun 2006 15:34
Date: Fri, 23 Jun 2006 15:34
23 lines
2069 bytes
2069 bytes
Tim Skirvin <tskirvin@killfile.org> writes:
> - Modify /usr/local/bin/perl-nocem to take out the Sys::Syslog
> line, and add the following line to avoid a warning:
> my $test = $inn::syslog_facility;
I'm curious why Sys::Syslog isn't working for you, given that it works for
the rest of INN (controlchan and cnfsstat, for instance).
> - Create the proper GPG keyring:
> mkdir -p ~news/etc/pgp; cd ~news/etc/pgp
> ln -s ~news/.gnupg/pubring.gpg ncmring.gpg
I'm also really confused as to why the --keyring option to GnuPG
apparently isn't working for you.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NoCeM tools?
Author: Tim Skirvin
Date: Fri, 23 Jun 2006 15:41
Date: Fri, 23 Jun 2006 15:41
28 lines
2586 bytes
2586 bytes
Russ Allbery <rra@stanford.edu> writes:
>> - Modify /usr/local/bin/perl-nocem to take out the Sys::Syslog
>> line, and add the following line to avoid a warning:
>> my $test = $inn::syslog_facility;
> I'm curious why Sys::Syslog isn't working for you, given that it works for
> the rest of INN (controlchan and cnfsstat, for instance).
It's the 'error' level thing that nocem@arcor.de wrote about.
>> - Create the proper GPG keyring:
>> mkdir -p ~news/etc/pgp; cd ~news/etc/pgp
>> ln -s ~news/.gnupg/pubring.gpg ncmring.gpg
> I'm also really confused as to why the --keyring option to GnuPG
> apparently isn't working for you.
I was fairly confused too... it's a somewhat older version of GPG
I'm using, but I have to assume the documentation was old as well.
- Tim Skirvin (tskirvin@killfile.org)
News Administrator, news.ks.uiuc.edu
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://news.ks.uiuc.edu/ UIUC News Server
Re: NoCeM tools?
Author: Russ Allbery
Date: Fri, 23 Jun 2006 15:50
Date: Fri, 23 Jun 2006 15:50
47 lines
3214 bytes
3214 bytes
Tim Skirvin <tskirvin@killfile.org> writes:
> Russ Allbery <rra@stanford.edu> writes:
>>> - Modify /usr/local/bin/perl-nocem to take out the Sys::Syslog
>>> line, and add the following line to avoid a warning:
>>> my $test = $inn::syslog_facility;
>> I'm curious why Sys::Syslog isn't working for you, given that it works
>> for the rest of INN (controlchan and cnfsstat, for instance).
> It's the 'error' level thing that nocem@arcor.de wrote about.
Uh, why not just change it to 'err' rather than disabling syslog logging
completely?
>>> - Create the proper GPG keyring:
>>> mkdir -p ~news/etc/pgp; cd ~news/etc/pgp
>>> ln -s ~news/.gnupg/pubring.gpg ncmring.gpg
>> I'm also really confused as to why the --keyring option to GnuPG
>> apparently isn't working for you.
> I was fairly confused too... it's a somewhat older version of GPG
> I'm using, but I have to assume the documentation was old as well.
Well, it's documented as working in the gpg man page:
--keyring file
Add file to the current list of keyrings. If file begins
with a tilde and a slash, these are replaced by the $HOME
directory. If the filename does not contain a slash, it is
assumed to be in the GnuPG home directory ("~/.gnupg" if
--homedir or $GNUPGHOME is not used).
Note that this adds a keyring to the current list. If the
intent is to use the specified keyring alone, use --keyring
along with --no-default-keyring.
This is GnuPG 1.4.3, though.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NoCeM tools?
Author: Tim Skirvin
Date: Fri, 23 Jun 2006 16:07
Date: Fri, 23 Jun 2006 16:07
21 lines
2417 bytes
2417 bytes
Russ Allbery <rra@stanford.edu> writes:
>>>> my $test = $inn::syslog_facility;
>>> I'm curious why Sys::Syslog isn't working for you, given that it works
>>> for the rest of INN (controlchan and cnfsstat, for instance).
>> It's the 'error' level thing that nocem@arcor.de wrote about.
> Uh, why not just change it to 'err' rather than disabling syslog logging
> completely?
Whatever works; commenting it out was just the easiest way to make
it work for me, rather than editing all of the lines. I suspect that
future versions of INN will have this fixed anyway, so I won't have to
worry about it again anyway.
- Tim Skirvin (tskirvin@killfile.org)
--
http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
http://www.killfile.org/~tskirvin/archives/ Skirv's Archives
Re: NoCeM tools?
Author: Russ Allbery
Date: Fri, 23 Jun 2006 16:07
Date: Fri, 23 Jun 2006 16:07
14 lines
1926 bytes
1926 bytes
Tim Skirvin <tskirvin@killfile.org> writes:
> Whatever works; commenting it out was just the easiest way to make
> it work for me, rather than editing all of the lines. I suspect that
> future versions of INN will have this fixed anyway, so I won't have to
> worry about it again anyway.
This is true. :)
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NoCeM tools?
Author: Russ Allbery
Date: Sat, 26 Aug 2006 19:51
Date: Sat, 26 Aug 2006 19:51
39 lines
2554 bytes
2554 bytes
Tim Skirvin <tskirvin@killfile.org> writes:
> In short:
> - Modify /usr/local/bin/perl-nocem to take out the Sys::Syslog
> line, and add the following line to avoid a warning:
> my $test = $inn::syslog_facility;
This is now fixed properly in Subversion by using the right syslog level
name.
> - Create the proper GPG keyring:
> mkdir -p ~news/etc/pgp; cd ~news/etc/pgp
> ln -s ~news/.gnupg/pubring.gpg ncmring.gpg
> - Import the proper keys
> cd ~
> wget http://www.killfile.org/~tskirvin/nocem/vlad.pgp
> gpg --import --allow-non-selfsigned-uid < vlad.pgp
You don't need the symlink if you do:
gpg --import --primary-keyring vlad.pgp
You have to use --primary-keyring instead of --keyring. Note that you
shouldn't actually use --allow-non-selfsigned-uid if you can avoid it;
keys really should be self-signed. GnuPG always signs keys, so the only
time you see this is with keys generated by old PGP versions.
I'm updating the documentation now.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads