🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Alan Greenberger Sun, 23 Jul 2006 18:01
leafnode only_groups_pcre
#188418
Author: Alan Greenberger
Date: Sun, 23 Jul 2006 18:01
27 lines
1920 bytes
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?
Re: leafnode only_groups_pcre
#188438
Author: Whiskers
Date: Mon, 24 Jul 2006 13:44
58 lines
3663 bytes
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'.

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: leafnode only_groups_pcre
#188457
Author: 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.
Re: leafnode only_groups_pcre
#188509
Author: Whiskers
Date: Wed, 26 Jul 2006 12:35
137 lines
6847 bytes
On 2006-07-25, Alan Greenberger <ajgreenberger@fast.net> wrote:
> On 2006-07-24, Whiskers <catwheezel@operamail.com> wrote:
>> On 2006-07-23, Alan Greenberger <ajgreenberger@fast.net> wrote:

snip

> 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!

Some news-servers are not very reliable; those operated by ISPs are 
particularly 'quirky' - losing articles is not at all uncommon.

Another thing that some servers can get wrong, is to set up a group that 
should not exist on that server - eg the mozilla.* groups seem to be 
intended to be carried only by the mozilla server, which probably does not 
'peer' with any other servers - there are several such special-interest 
servers.  But if for some reason there is a mozilla.* group on 
news.fast.net then it's possible that your articles for the mozilla.* 
groups were being accepted by that server - but naturally not appearing in 
the real groups on the mozilla server.

There are two things to do in those circumstances. Firstly, change the 
order of the servers in your config so that the mozilla server is checked
first - and thus your articles for that server will be sent to it instead
of to the wrong server.  Secondly, contact the admin of news.fast.net and
try to persuade them to remove the 'improper' mozilla.* groups which
should not exist on their server.

> Further, the "groups" files in the leaf.node directory get updated each
> time fetchnews runs.  

Yes.  One file for each up-stream server, one line in each file for each 
newsgroup subscribed to - regardless of whether or not that group is 
carried by that server.

> 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 see the same thing with the numbers in my system, which has no
only_groups_pcre lines for any of the servers.  The numbers seem to be the
'article numbers' (local to each server) of the last article fetched (or
killed) from that group from that server, plus 1 - with a 1 meaning that
no articles for that group have been found on that server.

For example, on my system (the first server is my ISP's, and I normally 
have it set as 'read only' so that my articles propagate from 
Individual.net instead):-

.-----[ [mark@tavy leaf.node]$ cat news.enta.net ]
| [...]
| news.software.readers 22698
| alt.autos.citroen 2834
| soc.religion.quaker 7294
| uk.net.providers 2345
| alt.internet.providers.uk 18644
| alt.support.depression 283378
| 24hoursupport.helpdesk 1
| uk.politics.id-cards 3007
| uk.gov.social-security 172779
| opera.general 1
| [...] 
'-----

.-----[ [mark@tavy leaf.node]$ cat news.individual.net ]
| [...]
| news.software.readers 220183
| alt.autos.citroen 6466
| soc.religion.quaker 114460
| uk.net.providers 2492
| alt.internet.providers.uk 98939
| alt.support.depression 2011859
| 24hoursupport.helpdesk 1170738
| uk.politics.id-cards 2983
| uk.gov.social-security 29589
| opera.general 104517
| [...]
'-----

.-----[ [mark@tavy leaf.node]$ cat news.datemas.de ]
| [...]
| news.software.readers 13906
| alt.autos.citroen 1516
| soc.religion.quaker 4681
| uk.net.providers 229
| alt.internet.providers.uk 1907
| alt.support.depression 138750
| 24hoursupport.helpdesk 87110
| uk.politics.id-cards 1295
| uk.gov.social-security 2695
| opera.general 1990
| [...]
'-----

Leafnode will look for all available articles in all groups from each 
server; it will fetch any articles that have not already been fetched, 
using the Message-ID to 'kill' any duplicates.  This means that your
'local' spool for each group can include articles that have been found on
only one of the upstream servers carrying that group -  which is useful if
any of those servers happens to have dropped articles, or deliberately
filtered them out, or if at any time one of the servers is unavailable.

> 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.

Perhaps we have different 'builds'.

> Explanation from anyone about how leafnode really works would be
> appreciated.

Look at /var/log/syslog for the fetchnews entries; there's a lot of detail 
there about what is actually happening (assuming that your Leafnode keeps 
a log).  You may need to use tools such as cat grep and less to extract
the lines you are interested in.

<http://www.tldp.org/HOWTO/News-Leafsite.html> might be of some use; 
likewise <http://www.leafnode.org/>.

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
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