🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #188457

Re: leafnode only_groups_pcre

#188457
From: Alan Greenberger
Date: Tue, 25 Jul 2006 12:17
84 lines
5039 bytes
On 2006-07-24, Whiskers <catwheezel@operamail.com> wrote:
> On 2006-07-23, Alan Greenberger <ajgreenberger@fast.net> wrote:
>> I have been trying to customize leafnode (1.11.2.rel-1, Debian Sarge)
>> for multiple servers with only partial success.  I use three servers:
>> our ISP's, mozilla's and gmane's.  I wish to tell it to use mozilla's
>> and gmane's for specific groups and the ISP's for all others.  The
>> abbreviated config is:
>>
>> #
>> server = news.fast.net
>> only_groups_pcre = ^(?!mozilla|gmane)
>>
>> server = news.mozilla.org
>> only_groups_pcre = mozilla\.
>> nodesc = 1
>>
>> server = news.gmane.org
>> only_groups_pcre = gmane\.
>> #
>>
>> I issue fetchnews -f and then look at the files in
>> /var/spool/news/leaf.node.  Amazingly enough the "hard" PCRE works; the
>> file news.fast.net contains no groups beginning with mozilla or gmane.
>> However the two "easy" PCREs are ignored.  Those two files contain all
>> subscribed groups supported by those servers.  I have tried commenting
>> out the "nodesc = 1" with no effect.  I also tried some other PCREs
>> such as ^gmane, gmane.*, with no effect.
>>
>> Does anyone know how to achieve the desired effect?
>
> I think you'll find that the various files 
> /var/spool/news/leaf.node/name.of.server contain all subscribed groups 
> from /var/spool/news/interesting.groups/ at the time that server was last 
> accessed - that is certainly what it looks like on my system.
>
> To see what leafnode is actually doing when it contacts the upstream 
> servers, use the -vv or -vvv options to fetchnews.  I see 'no such group' 
> messages when leafnode asks for a group that a server doesn't carry; I 
> have no 'only_groups_pcre' lines in my leafnode config.
>
> As far as I know, the gmane.* "groups" are only carried by the gmane 
> server, which carries nothing else, so there isn't really any need to try 
> to specify which server to fetch them from.  Leafnode won't try to post 
> articles to a server that doesn't carry that group.
>
> There don't seem to be any mozilla.* groups on any of the three servers I 
> fetch from, so I think that the mozilla server is probably the only one 
> that carries those groups, and it probably carries no others, so again 
> there isn't any need to tell leafnode not to fetch or post articles for 
> those groups from anywhere else.
>
> I don't know what effect the ! character will have in the expression 
> "^(?!mozilla|gmane)"; according to man pcrepattern on my system, the ! 
> character has no 'special meaning'.
>

I don't have a good understanding of how leafnode works and have been
groping for a solution.  I have had problems with posting to some news
groups.  I think that in some cases, my ISP's news server doesn't
'really' post to a particular group but accepts it from leafnode.  It
is possible that the only_groups_pcre lines I put in above actually are
working, because a previous post to a mozilla group didn't get out, but
a repeated post since the PCRE change did!

Further, the "groups" files in the leaf.node directory get updated each
time fetchnews runs.  I now notice that all of the "interesting" groups
are back in all three files.  Each group is followed by a number.  For
example:
news.fast.net:news.software.readers 22089
news.gmane.org:news.software.readers 1
news.mozilla.org:news.software.readers 1
For the servers matching the PCREs above, a group gets a real article
number, and for the non-matching ones it gets a "1".
(I think that before I put in the PCREs, there were non "1" numbers for
the same group in more than one file.)

I got the '!' character out of the pcre man page.  It says "Lookahead
assertions  start with (?= for positive assertions and (?! for negative
assertions."  So the expression is supposed to mean "beginning of line
neither followed by mozilla nor gmane".  I had tried it first with
"pcregrep testfile" and it worked.

Explanation from anyone about how leafnode really works would be
appreciated.
Technical Details
Message-ID: <slrnecc2us.mga.ajgreenberger@dumky.scores>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!transit3.readnews.com!news-out.readnews.com!news.uslec.net!not-for-mail
References: <slrnec7ec2.fe1.ajgreenberger@dumky.scores> <hevep3-5c.ln1@ID-107770.user.individual.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrnecc2us.mga.ajgreenberger@dumky.scores>
Subject: Re: leafnode only_groups_pcre
Date: Tue, 25 Jul 2006 08:17:32 -0400
From: Alan Greenberger <ajgreenberger@fast.net>
References: <slrnec7ec2.fe1.ajgreenberger@dumky.scores> <hevep3-5c.ln1@ID-107770.user.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!transit3.readnews.com!news-out.readnews.com!news.uslec.net!not-for-mail
Newsgroups: news.software.readers
User-Agent: slrn/0.9.8.1 (Debian)
Lines: 84
Organization: USLEC
NNTP-Posting-Host: e641c7ea.news.uslec.net
X-Trace: DXC=UMc8=\fXIhPCobC=I]JmK]G3V[U]m4Jk\i`65BN52g3\LD56T2SCHGZ2;
 ZfaVZ>ElQO<[^\c@CAVZ
X-Complaints-To: abuse@uslec.net