Thread View: news.software.nntp
10 messages
10 total messages
Started by NPG
Tue, 26 Jun 2012 16:58
Nocem question
Author: NPG
Date: Tue, 26 Jun 2012 16:58
Date: Tue, 26 Jun 2012 16:58
38 lines
2093 bytes
2093 bytes
Howdy, In March we setup nocem on our news server following the instructions from http://rosalind.home.xs4all.nl/nocemreg/reghelp.html#how-to and http://www.eyrie.org/~eagle/software/inn/docs/perl-nocem.html Since then, we see several messages similar to the following in our logs daily. nocem: Article <62e425116e717e2b@nocem.news.httrack.net>: bleachbot@httrack.com (ID 44E9A2A611041128) not in keyring Our first thought was that the bleachbot key was missing, however cd /etc/news/pgp gpg --list-keys --keyring ./ncmring.gpg shows the bleachbot key there as pub 1024D/11041128 2007-11-02 uid bleachbot <bleachbot@httrack.com> sub 768g/F41D161C 2007-11-02 and it appears that the key we have matches the key at http://rosalind.home.xs4all.nl/nocemreg/nocemreg.html Any ideas what I am seeing and/or missing? Thanks -- Sincerely, Nathan Gibbs Systems Administrator Christ Media http://www.cmpublishers.com
Re: Nocem question
Author: Alexander Bartolich
Date: Tue, 26 Jun 2012 18:26
Date: Tue, 26 Jun 2012 18:26
26 lines
1970 bytes
1970 bytes
NPG wrote:
> [...]
> Any ideas what I am seeing and/or missing?
Last time I looked the documentation was bad and the source code
incomprehensible. After a bit of experimenting I found a working
setup, though.
# ls -l /etc/news/pgp/
total 0
lrwxrwxrwx 1 root root 34 2010-08-09 09:52 ncmring.gpg -> /var/spool/news/.gnupg/pubring.gpg
lrwxrwxrwx 1 root root 34 2010-08-12 01:56 pubring.gpg -> /var/spool/news/.gnupg/pubring.gpg
# su - news
$ pwd
/var/spool/news
$ gpg --list-keys | grep -C 1 bleachbot
pub 1024D/11041128 2007-11-02
uid bleachbot <bleachbot@httrack.com>
sub 768g/F41D161C 2007-11-02
Ciao
Alexander.
Re: Nocem question
Author: Tim Skirvin
Date: Tue, 26 Jun 2012 19:45
Date: Tue, 26 Jun 2012 19:45
141 lines
5614 bytes
5614 bytes
Alexander Bartolich <alexander.bartolich@gmx.at> writes:
> Last time I looked the documentation was bad and the source code
> incomprehensible. After a bit of experimenting I found a working
> setup, though.
I wrote up some puppet configuration that seems to get NoCeM
working properly a while ago. I'm not sure if this will help anybody out,
but here's what it generally looks like (and it's missing a lot, but it
might get the idea across):
# Configuration to support NoCeM filtering from a server. Consists of three
# parts: a managing /etc/news/nocem.ctl, managing a GPG file for valid
# keys, and actually adding entries to listen to.
class usenet_inn2::nocem (
) inherits usenet_inn2::params {
include usenet_inn2::nocem::gpg
include usenet_inn2::nocem::newsfeeds
include usenet_inn2::nocem::ctl
usenet_inn2::nocem::fragment {
'vlad-pgpmoose':
ensure => present,
issuer => 'pgpmoose@killfile.org',
type => 'pgpmoose-forged-moderation';
'bleachbot':
ensure => present,
issuer => 'bleachbot@httrack.com',
type => 'mmf,spam';
}
}
class usenet_inn2::nocem::gpg (
) inherits usenet_inn2::params {
$gpg_opts = "--no-default-keyring --no-options --allow-non-selfsigned-uid --no-permission-warning"
$keyring = "${path_conf}/pgp/ncmring.gpg"
exec { "nocem-gpg import":
command => "/bin/rm -f ${keyring} && gpg ${gpg_opts} --primary-keyring ${keyring} --import ${path_conf}/pgp/nocem/*",
creates => $keyring,
notify => File[$keyring]
}
file {
$keyring:
require => Exec['nocem-gpg import'],
mode => 644;
"${path_conf}/pgp/nocem":
source => 'puppet:///modules/usenet_inn2/etc/news/pgp/nocem',
recurse => true,
notify => Exec['nocem-gpg import'],
}
}
# Create and manage /etc/news/nocem.ctl (or similar). This file is used to
# decide which nocem messages to honor.
#
# The underlying file is managed with the 'concat' module. Stanzas are created
# using the usenet_inn2::nocem::fragment definition.
#
# Usage (defaults come from usenet_inn2::params):
#
# class { 'usenet_inn2::nocem::ctl':
# $news_group => [ '<unix-group>' ],
# $news_user => [ '<unix-user>' ],
# $path_conf => [ '<path-to-files>' ]
# }
class usenet_inn2::nocem::ctl (
$news_group = $usenet_inn2::params::news_group,
$news_user = $usenet_inn2::params::news_user,
$path_conf = $usenet_inn2::params::path_conf
) inherits usenet_inn2::params {
include concat::setup
$config = "${path_conf}/nocem.ctl"
concat { $config:
owner => $news_user,
group => $news_group,
mode => 0644;
}
concat::fragment { 'nocem.ctl.local_header':
target => $config,
content => "## $config - managed with puppet\n\n",
order => 01
}
}
# Generate an entry in /etc/news/nocem.ctl (or equivalent). Uses
# concat::fragment to do the merging.
#
# Usage:
#
# usenet_inn2::nocem::fragment { '<name>':
# ensure => present | absent,
# issuer => '<address>',
# type => '<nocem-type>'
# }
#
# Please see the perl-nocem man page for details on the proper values for
# issuer/type.
define usenet_inn2::nocem::fragment (
$ensure = 'present',
$issuer,
$type
) {
include usenet_inn2::nocem::ctl
$config = $usenet_inn2::nocem::ctl::config
concat::fragment { $name:
ensure => $ensure,
target => $config,
content => "# ${name}\n${issuer}:${type}\n\n";
}
}
class usenet_inn2::nocem::newsfeeds (
$config = $usenet_inn2::params::path_conf,
$path_bin = $usenet_inn2::params::path_bin
) inherits usenet_inn2::params {
$groups = '!*,alt.nocem.misc,news.lists.filters'
$binary = "${path_bin}/perl-nocem"
concat::fragment { 'newsfeeds-nocem':
ensure => present,
target => "${config}/newsfeeds",
content => "\n# nocem feed\nnocem!:${groups}:Tc,Wf,Ap:${binary}\n"
}
}
- Tim Skirvin (tskirvin@killfile.org)
--
http://wiki.killfile.org/ Skirv's Homepage <FISH>< <*>
http://wiki.killfile.org/archives/ Skirv's Archives
Re: Nocem question
Author: NPG
Date: Tue, 26 Jun 2012 20:29
Date: Tue, 26 Jun 2012 20:29
56 lines
2744 bytes
2744 bytes
On 6/26/2012 2:26 PM, Alexander Bartolich wrote: > NPG wrote: >> [...] >> Any ideas what I am seeing and/or missing? > > Last time I looked the documentation was bad and the source code > incomprehensible. Precisely why I dragged my tail for 3.5 years before trying to set it up. :-) > After a bit of experimenting I found a working > setup, though. > > # ls -l /etc/news/pgp/ > total 0 > lrwxrwxrwx 1 root root 34 2010-08-09 09:52 ncmring.gpg -> /var/spool/news/.gnupg/pubring.gpg > lrwxrwxrwx 1 root root 34 2010-08-12 01:56 pubring.gpg -> /var/spool/news/.gnupg/pubring.gpg > > # su - news > > $ pwd > /var/spool/news > > $ gpg --list-keys | grep -C 1 bleachbot > pub 1024D/11041128 2007-11-02 > uid bleachbot <bleachbot@httrack.com> > sub 768g/F41D161C 2007-11-02 > AHA! The key is in the right spot but the news user can't see it. cd /etc/news/pgp chmod 644 ncmring.* Logs now show messages similar to the following nocem: processed notice 535b0839c0c46e35 by bleachbot@httrack.com (1 ids, 0.01000 s, 100.0/s) Problem solved, I think?! :-/ Thanks for the nudge in the right direction. :-) -- Sincerely, Nathan Gibbs Systems Administrator Christ Media http://www.cmpublishers.com
Re: Nocem question
Author: Julien ÉLIE
Date: Thu, 28 Jun 2012 19:18
Date: Thu, 28 Jun 2012 19:18
46 lines
3121 bytes
3121 bytes
Hi Alexander, >> http://www.eyrie.org/~eagle/software/inn/docs/perl-nocem.html >> >> Any ideas what I am seeing and/or missing? > > Last time I looked the documentation was bad Do you remember what is bad in the documentation? I do not understand well what could be wrong, unless the documentation works only on Debian systems… Or you had a look at an older version of the documentation (?) > After a bit of experimenting I found a working setup, though. > > # ls -l /etc/news/pgp/ > total 0 > lrwxrwxrwx 1 root root 34 2010-08-09 09:52 ncmring.gpg -> /var/spool/news/.gnupg/pubring.gpg > lrwxrwxrwx 1 root root 34 2010-08-12 01:56 pubring.gpg -> /var/spool/news/.gnupg/pubring.gpg Yes, it is exactly the first documented step: /etc/news/pgp/ncmring.gpg having the keys. Here, you symlink the file to /var/spool/news/.gnupg/pubring.gpg "" gpg --no-default-keyring --primary-keyring <pathetc>/pgp/ncmring.gpg --import <key-file> where <pathetc> is the value of the pathetc parameter set in inn.conf and <key-file> the file containing the key(s) to import. The keyring must be located in <pathetc>/pgp/ncmring.gpg; you only have to create the directory <pathetc>/pgp before using gpg (it will automatically generate the ncmring.gpg file). For old PGP-generated keys, you may have to use --allow-non-selfsigned-uid if they are not properly self-signed, but anyone creating a key really should self-sign the key. Current PGP implementations do this automatically. "" As far as I know, /etc/news/pgp/pubring.gpg is not used by perl-nocem (but may be helpful for controlchan). -- Julien ÉLIE « Rien ne serpe de courir ! » (Druides gaulois)
Re: Nocem question
Author: Julien ÉLIE
Date: Thu, 28 Jun 2012 19:21
Date: Thu, 28 Jun 2012 19:21
15 lines
1772 bytes
1772 bytes
Hi NPG, > The key is in the right spot but the news user can't see it. > > cd /etc/news/pgp > chmod 644 ncmring.* It is true that the perl-nocem documentation does not mention the rights that the ncmring.gpg file should have. We'll mention it for INN 2.5.4. -- Julien ÉLIE « Rien ne serpe de courir ! » (Druides gaulois)
Re: Nocem question
Author: Alexander Bartolich
Date: Thu, 28 Jun 2012 21:54
Date: Thu, 28 Jun 2012 21:54
75 lines
3807 bytes
3807 bytes
Julien ÉLIE wrote:
> Hi Alexander,
>> [...]
>> Last time I looked the documentation was bad
>
> Do you remember what is bad in the documentation?
Starting with the description on
http://rosalind.home.xs4all.nl/nocemreg/reghelp.html
is a good way to waste a day of your life. Perhaps the HOWTO works for
c-nocem, but it definitely is useless for perl-nocem. Once you discover
that fact you might be tempted to install c-nocem. Bad idea.
$ wget http://sites.inka.de/~bigred/sw/c-nocem-3.7.tar.gz
$ tar zxf c-nocem-3.7.tar.gz
$ cd c-nocem
$ ./configure | tail -1
configure: error: Need the news system source to compile.
checking for C News source... no
OK. With enough persistence you will eventually land on
http://www.eyrie.org/~eagle/software/inn/docs/perl-nocem.html
At this point you need to realize that you are looking at a manual page
of INN 2.x. Which means that the described software ("perl-nocem") is
already installed. No need to search for a download link.
But, where is it? One way to solve this puzzle is to generalize the
hint in the documention
<pathetc> is the value of the pathetc parameter set in inn.conf
and browse through "inn.conf".
$ egrep 'pathbin|pathetc' /etc/news/inn.conf
pathbin: /usr/lib/news/bin
pathetc: /etc/news
It also comes very handy if you know how to list the contents of a
package.
$ dpkg -L inn2 | grep nocem
/usr/lib/news/bin/perl-nocem
/usr/share/man/man8/perl-nocem.8.gz
/etc/news/nocem.ctl
/usr/share/man/man5/nocem.ctl.5.gz
At this point it's time to cry "Heureka", close your web browser,
and continue with
man perl-nocem
> [...]
> Yes, it is exactly the first documented step:
> /etc/news/pgp/ncmring.gpg having the keys.
> Here, you symlink the file to /var/spool/news/.gnupg/pubring.gpg
The problem with non-default file names like "ncmring.gpg" is that
it complicates handling of keys. Trivial things like
gpg --list-keys
just don't work anymore. Yes, you can specify option --primary-keyring
together with --list-keys, but that just increases cognitive work load.
Creating a link to the home directory of user "news" also serves as a
reminder that perl-nocem is running under the UID of news.
</rant>
Ciao
Alexander.
Re: Nocem question
Author: Thomas Hochstein
Date: Fri, 29 Jun 2012 22:49
Date: Fri, 29 Jun 2012 22:49
6 lines
1484 bytes
1484 bytes
Alexander Bartolich schrieb: > But, where is it? Best guess: where every other executable program or script used by INN is. Works for me every time. ;)
Re: Nocem question
Author: Julien ÉLIE
Date: Wed, 14 May 2014 19:33
Date: Wed, 14 May 2014 19:33
25 lines
2088 bytes
2088 bytes
Hi Tim, Responding to an old article... (26/06/2012) > I wrote up some puppet configuration that seems to get NoCeM > working properly a while ago. I'm not sure if this will help anybody out, > but here's what it generally looks like (and it's missing a lot, but it > might get the idea across): > [...] > 'bleachbot': > ensure => present, > issuer => 'bleachbot@httrack.com', > type => 'mmf,spam'; Isn't it "site,spam"? According to <http://home.httrack.net/~nocem/>, it seems to be the case. Just wondering the right types to use in nocem.ctl (currently using "site" and "spam"). -- Julien ÉLIE « Et maintenant, passons à table. Toi aussi, mon fils ! » (César)
Re: Nocem question
Author: Tim Skirvin
Date: Wed, 14 May 2014 20:07
Date: Wed, 14 May 2014 20:07
31 lines
3123 bytes
3123 bytes
=?ISO-8859-1?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid> writes:
> Responding to an old article... (26/06/2012)
>> I wrote up some puppet configuration that seems to get NoCeM
>> working properly a while ago. I'm not sure if this will help anybody out,
>> but here's what it generally looks like (and it's missing a lot, but it
>> might get the idea across):
> [...]
>> 'bleachbot':
>> ensure => present,
>> issuer => 'bleachbot@httrack.com',
>> type => 'mmf,spam';
> Isn't it "site,spam"?
> According to <http://home.httrack.net/~nocem/>, it seems to be the case.
Yeah, it looks like it. *fixes*
This is oddly timely, because I just dropped the puppet code in
question into github a little while ago (well, two weeks):
https://github.com/tskirvin/puppet-usenet_inn2
The fix is applied. Maybe it's of some use to somebody here?
- Tim Skirvin (tskirvin@killfile.org)
--
http://wiki.killfile.org/ Skirv's Homepage <FISH>< <*>
http://wiki.killfile.org/projects/software/ Skirv's Software
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