🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.admin.peering
136 messages
136 total messages Page 3 of 3 Started by Eli Fri, 10 Mar 2023 21:04
Page 3 of 3 • 136 total messages
Re: Newbie question
#1589
Author: Eli
Date: Thu, 23 Mar 2023 09:55
47 lines
2941 bytes
On 22 Mar 2023 at 23:35:44 CET, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Ah yes, exactly.  That's the reason why this was never implemented in
> INN.  It's not seen as a priority at all, and it's also not trivial to do.
> 
> Issue #23
> "nnrpd currently has no way of limiting connections per IP address other
> than using the custom auth hooks.  In its daemon mode, it could in
> theory keep track of this and support throttling.  It's probably not
> worth trying to support this when invoked via inetd, since at that point
> one could just use xinetd and its built-in support for things like this.
> 
> When started from innd, this is a bit harder.  innd has some basic rate
> limiting stuff, but nothing for tracking number of simultaneous
> connections over time.  It may be fine to say that if you want to use
> this feature, you need to have nnrpd be invoked separately, not run from
> innd."
> 
> 
> So the answer is to use something like "per_source = 5" in xinetd.conf
> and start nnrpd by xinetd.

This makes it possible to limit the number of sessions per IP, but not per
authenticated user account.

1) xinitd starts nnrpd and after this the authentication takes place.
2) nntpd sends the login data to perl_auth, which consults the database for
authorization, as well as checking whether the user has already reached his
maximum connections.

So point 2 is where the problem lies.

Each time the authorization is successful, a 'session' record can be added to
the database. The number of records determines how many sessions are running
for this user.

But as soon as a session disconnects, the record must be removed from the
database. However, nnrpd does not know that the session has been disconnected.
Only xinitd knows this, but it doesn't have the user data, nor can it access
the database.

Perhaps something can be done with the xinitd PID, but even then this will
have to be passed to the perl_auth script.

So here's the problem I can't solve.
Do you have a suggestion?
Re: Newbie question
#1590
Author: Eli
Date: Thu, 23 Mar 2023 10:03
10 lines
1298 bytes
On 23 Mar 2023 at 10:55:52 CET, "Eli" <eliistheman@gmail.com> wrote:

> 2) nntpd sends the login data to perl_auth, which consults the database for

Of course I meant nnrpd here.

Second question:
Starting nnrpd by xinetd on port 119 requires a second IP (since innd is
already bound to 119).
But how does this affect peers? Do they connect to the IP of innd or nnrpd?
Re: Newbie question
#1591
Author: Grant Taylor
Date: Thu, 23 Mar 2023 16:01
11 lines
1602 bytes
On 3/22/23 9:09 PM, Gew Ghul Suques wrote:
> Phuque gewghul.

If you're going to insult / slander someone, please do it properly 
instead of hiding in a homonym.



-- 
Grant. . . .
unix || die
Re: Newbie question
#1592
Author: Julien ÉLIE
Date: Thu, 23 Mar 2023 18:57
15 lines
2054 bytes
Hi Grant,

>> Here are a few that I think illustrate the "effective pattern" problem.
> 
> Thank you for the message IDs.  Unfortunately Thunderbird is treating 
> them as email addresses.  I'll have to find a way to look them up.

http://al.howardknight.net/

-- 
Julien ÉLIE

« Nous autres communistes, nous avons une position claire : nous n'avons
   jamais changé, nous ne changerons jamais et nous sommes pour le
   changement. » (Georges Marchais)
Re: Newbie question
#1593
Author: Julien ÉLIE
Date: Thu, 23 Mar 2023 19:07
40 lines
3009 bytes
Hi Eli,

> 2) nnrpd sends the login data to perl_auth, which consults the database for
> authorization, as well as checking whether the user has already reached his
> maximum connections.
> 
> So point 2 is where the problem lies.
> 
> Each time the authorization is successful, a 'session' record can be added to
> the database. The number of records determines how many sessions are running
> for this user.
> 
> But as soon as a session disconnects, the record must be removed from the
> database. However, nnrpd does not know that the session has been disconnected.
> Only xinitd knows this, but it doesn't have the user data, nor can it access
> the database.
> 
> Perhaps something can be done with the xinitd PID, but even then this will
> have to be passed to the perl_auth script.
> 
> Do you have a suggestion?
> So here's the problem I can't solve.
That problem is probably why nobody has still written yet the requested 
feature either natively in nnrpd or in a perl_auth script...


> Starting nnrpd by xinetd on port 119 requires a second IP (since
> innd is already bound to 119). But how does this affect peers? Do
> they connect to the IP of innd or nnrpd?

If you set up nnrpd as a daemon listening to port 119 (unencrypted) and 
another nnrpd as a daemon listening to port 563 (TLS), news admins 
usually set up innd to listen to port 433 (also called the NNSP port, 
for Network News Streaming Protocol).  Then you tell your peers to feed 
you on that port.

-- 
Julien ÉLIE

« Quand je raconterai mon odyssée, personne ne me croira ! » (Astérix)
Re: Newbie question
#1594
Author: Grant Taylor
Date: Thu, 23 Mar 2023 19:31
29 lines
2168 bytes
On 3/23/23 12:57 PM, Julien ÉLIE wrote:
> Hi Grant,

Hi Julien,

> http://al.howardknight.net/

Thank you for that.  That is a very neat tool.  I've saved that for 
future use.

I don't know how to go about fighting that spam.

I have a few hints of ideas that I'd chase.  But I suspect they would 
peter out and not help much.

For a while I thought about filtering out problematic posting-accounts 
in the Injection-Info: header.  But there were too many and I couldn't 
keep up.

I feel like this is going the direction of statistical counts of various 
words and improper relationships with multiple other normally 
accompanying words.  This becomes a statistics game that I am not 
qualified to play.



-- 
Grant. . . .
unix || die
Re: Newbie question
#1595
Author: Grant Taylor
Date: Thu, 23 Mar 2023 19:34
18 lines
1866 bytes
On 3/23/23 3:55 AM, Eli wrote:
> 1) xinitd starts nnrpd and after this the authentication takes place.

Does (x)inetd need to start nnrpd /directly/?  Or could it start a 
script which in turn starts nnrpd as well as calling something to  clean 
up sessions after nnrpd exists?

Especially if there could be some form of information that would 
correlate the IP & port tuple with the session.  I'd think it would be 
relatively easy to detect that the TCP connection for a given IP & port 
tuple no longer exists (either completely gone or closing / TIME_WAIT 
type thing) and subsequently remove the session from the list.



-- 
Grant. . . .
unix || die
Re: Newbie question
#1604
Author: Eli
Date: Sat, 25 Mar 2023 10:41
7 lines
963 bytes
Hi,

The messages I download via pullnews are sent to the peers. How can that be
prevented?

I can temporarily block the newsgroup in "newsfeeds", but that has its
drawbacks. Can this also be done differently?
Re: Newbie question
#1596
Author: Jesse Rehmer
Date: Sat, 25 Mar 2023 11:40
28 lines
2124 bytes
On Mar 25, 2023 at 5:41:42 AM CDT, "Eli" <eliistheman@gmail.com> wrote:

> Hi,
> 
> The messages I download via pullnews are sent to the peers. How can that be
> prevented?
> 
> I can temporarily block the newsgroup in "newsfeeds", but that has its
> drawbacks. Can this also be done differently?

Without disabling newsfeeds entirely while using pullnews an option is to have
pullnews add a fake Path entry that you configure your each of your newsfeeds
to exclude.

From the pullnews manpage:
       -F fakehop
           Prepend fakehop as a host to the Path header field body of articles
           fed.

For example, if I use "pullnews -F injection-host" it will prepend
"injection-host" to the Path. Then in my newsfeeds file for each feed I can
exclude the "injection-host" path from each feed so it will not be fed to the
peers.

    feed/usenet.blueworldhosting.com,injection-host\
            :*\
            :Ap,Tm\
            :innfeed!
Re: Newbie question
#1597
Author: Eli
Date: Sat, 25 Mar 2023 13:12
15 lines
1372 bytes
On 25 Mar 2023 at 12:40:39 CET, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:

> Without disabling newsfeeds entirely while using pullnews an option is to have
> pullnews add a fake Path entry that you configure your each of your newsfeeds
> to exclude.

Hi Jesse,

Thank you for your clear answer and example.

Another question:
How can I delete all messages up to a certain date in a newsgroup immediately.
The messages were received via pullnews, so the date received is the same for
all messages.
Re: Bug in latest pullnews (was: Newbie question)
#1598
Author: Eli
Date: Tue, 28 Mar 2023 11:20
27 lines
1871 bytes
On 17 Mar 2023 at 21:21:45 CET, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Could you please download the latest version of pullnews, and try it please?
> 
> https://raw.githubusercontent.com/InterNetNews/inn/main/frontends/pullnews.in
> 
> Just grab that file, rename it without .in, and change the first 2 lines
> to fit what your current pullnews script has (it is the path to Perl and
> the INN::Config module).
> Then you can run that script.  It will work with your version of INN.

Hi Julien,

I think there is a bug in this latest version.

When pullnews starts, it writes a PID file.
If pullnews is accidentally restarted, it will report that pullnews is already
running and that's perfect.
But after this message pullnews deletes the PID file :(

That's very annoying as I restart pullnews from cron every 15 minutes because
it occasionally stops for some unknown reason.

Other than that it works smoothly ;)

Eli.
Re: Bug in latest pullnews
#1599
Author: Julien ÉLIE
Date: Thu, 30 Mar 2023 11:21
37 lines
2699 bytes
Hi Eli,

> I think there is a bug in this latest version.
> 
> When pullnews starts, it writes a PID file.
> If pullnews is accidentally restarted, it will report that pullnews is already
> running and that's perfect.
> But after this message pullnews deletes the PID file :(

Thanks again for your bug report; it's really appreciated to make 
pullnews better.

When you download a new version of pullnews from the Git repository, do 
not forget to manually edit the first 2 lines of the file which should 
reflect the paths to Perl and INN::Config.  (You can take the same as 
the ones in other Perl scripts like mailpost.)
It gives something like:

#! /usr/bin/perl -w
use lib '/usr/share/perl5'; use INN::Config;



The issue you're facing is only triggered when you run pullnews outside 
an INN installation (which is a possible use of pullnews, as it could be 
run from a separate server).
There are 2 branches at several places in the code.  PID file handling 
was wrong in one of these branches, as you noticed.

I believe the issue is now fixed, and you can download the updated 
pullnews script from the Git repository.

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent, et non ceux qui se
   vantent de l'avoir trouvée. » (Condorcet)
Re: Newbie question
#1600
Author: Julien ÉLIE
Date: Thu, 30 Mar 2023 17:11
34 lines
2633 bytes
Hi Eli,

> Another question:
> How can I delete all messages up to a certain date in a newsgroup immediately.
> The messages were received via pullnews, so the date received is the same for
> all messages.

When you say "up to a certain date", do you mean before or after?
If it is before, then just use expire.ctl and run news.daily so as to 
expire articles.
Verify that you do not use the "-p" option in the expireoverflags and 
flags options of the news.daily command.  (By default, arrival time is 
used, and "-p" switches to the actual date in Date header fields).


If it is after, then it is a bit more complicated...
Your history file in <pathdb> contains lines with several timestamps. 
You can find the storage tokens of articles arrived after March, 1st 
with the following commands:

% convdate -n '01 Mar 2023 00:00 +0000'
1677628800

% perl -ne 'chomp; our ($hash, $timestamps, $_) = split " "; my 
($arrived, $expires, $posted) = split("~", $timestamps); print "$_\n" if 
$_ and $arrived >= 1677628800' history

Pipe the result to "sm -r" to remove these articles.

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent, et non ceux qui se
   vantent de l'avoir trouvée. » (Condorcet)
Re: Bug in latest pullnews
#1601
Author: Eli
Date: Thu, 30 Mar 2023 20:01
17 lines
1507 bytes
On 30 Mar 2023 at 13:21:16 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:
> 
> The issue you're facing is only triggered when you run pullnews outside
> an INN installation (which is a possible use of pullnews, as it could be
> run from a separate server).
> There are 2 branches at several places in the code.  PID file handling
> was wrong in one of these branches, as you noticed.
> 
> I believe the issue is now fixed, and you can download the updated
> pullnews script from the Git repository.

Hi Julien,

The problem has been solved :)

Thank you for the speedy fix. It works great now.
Re: Newbie question
#1602
Author: Eli
Date: Thu, 30 Mar 2023 20:02
26 lines
1982 bytes
On 30 Mar 2023 at 19:11:26 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> When you say "up to a certain date", do you mean before or after?
> If it is before, then just use expire.ctl and run news.daily so as to
> expire articles.
> Verify that you do not use the "-p" option in the expireoverflags and
> flags options of the news.daily command.  (By default, arrival time is
> used, and "-p" switches to the actual date in Date header fields).
> 
> 
> If it is after, then it is a bit more complicated...
> Your history file in <pathdb> contains lines with several timestamps.
> You can find the storage tokens of articles arrived after March, 1st
> with the following commands:
> 
> % convdate -n '01 Mar 2023 00:00 +0000'
> 1677628800
> 
> % perl -ne 'chomp; our ($hash, $timestamps, $_) = split " "; my
> ($arrived, $expires, $posted) = split("~", $timestamps); print "$_\n" if
> $_ and $arrived >= 1677628800' history
> 
> Pipe the result to "sm -r" to remove these articles.

Wow super! I'll archive this one.
Re: Newbie question
#1620
Author: Eli
Date: Thu, 06 Apr 2023 11:38
9 lines
1210 bytes
If I am correct, as an admin it is possible to cancel a message posted locally
by a user by means of the 'canlockadmin' secret in inn-secrets.conf.

However, it is not clear to me how to cancel these messages as admin.
Is 'gencancel' the right and only tool for this?

Can someone point me in the right direction please.

Thank you.
Re: Newbie question
#1613
Author: Franck
Date: Thu, 06 Apr 2023 15:55
26 lines
2340 bytes
Hello,

Once you have edited the inn-secrets.conf file 
(https://www.eyrie.org/~eagle/software/inn/docs/inn-secrets.conf.html) 
and the "cancels" group, each article posted on your server will have :

- One (or more) Cancel-Lock added by the server (if the client used by 
the user does not support CL/CK). This allows the user to cancel his own 
articles.

- One (or more) Cancel-Locks added by your server (if you have defined 
canlockadmin). This CL is used by the administrator to cancel all 
articles posted on his server.

To do this, you actually need to use Gencancel to generate the correct 
Cancel-key (Gencancel use the admin secret) that will match one hash of 
the Cancel-Lock of the article to cancel.

https://www.eyrie.org/~eagle/software/inn/docs/gencancel.html

For me, Gencancel is the only tool to do the job but as I am not an INN 
expert, maybe Julien or Russ can give you more information (even if I 
think the documentation is well enough written.

Have nice day.
Franck
Re: Newbie question
#1616
Author: Eli
Date: Thu, 06 Apr 2023 16:39
49 lines
2241 bytes
On 6 Apr 2023 at 17:55:24 CEST, "Franck" <franck@email.invalid> wrote:

> Hello,
> 
> Once you have edited the inn-secrets.conf file
> (<https://www.eyrie.org/~eagle/software/inn/docs/inn-secrets.conf.html>)
> and the "cancels" group, each article posted on your server will have :
> 
> ...
> 
> For me, Gencancel is the only tool to do the job but as I am not an INN
> expert, maybe Julien or Russ can give you more information (even if I
> think the documentation is well enough written.
> 
> Have nice day.
> Franck

Thanks for the answer.

However, for some reason it's not working as expected.

I've set the secret for 'canlockadmin' in inn-secrets.conf.

In readers.conf (just in case):

auth "localhost" {
hosts: "localhost, 127.0.0.1, ::1, stdin"
default: "<localhost>"
}

access "localhost" {
users: "<localhost>"
newsgroups: "*"
access: RPA
addcanlockuser: none
}

The following command works as expected and returns a full cancellation
header:
su news -s /bin/sh -c "/usr/local/news/bin/gencancel -n '<newsgroup>'
'<msg-id>'" | su news -s /bin/sh -c "/usr/local/news/bin/inews -h -P -D"

However, when using the above command without the -D gives:
inews: warning: What server?
inews: article will be spooled

And a file named 'dead.article' is writing into the home dir of user 'news'.

Any ideas what goes wrong?
Re: Newbie question
#1617
Author: Julien ÉLIE
Date: Thu, 06 Apr 2023 19:00
32 lines
2474 bytes
Hi Eli,

>> For me, Gencancel is the only tool to do the job

That's right Franck :)
Eli, is there something unclear in the gencancel documentation that 
should be improved?  If that's the case, what should be written and where?


> su news -s /bin/sh -c "/usr/local/news/bin/gencancel -n '<newsgroup>'
> '<msg-id>'" | su news -s /bin/sh -c "/usr/local/news/bin/inews -h -P -D"
> 
> However, when using the above command without the -D gives:
> inews: warning: What server?
> inews: article will be spooled >
> Any ideas what goes wrong?

inews tries to connect to the server set in the "server" parameter in 
inn.conf.  I guess this parameter is unset.

I'll add the name of the parameter in the inews manual page.  It 
currently just mentions "inews sends the article to the local news 
server as specified in inn.conf".

And inews is not listed in the names of the programs for which the 
"server" parameter is used in inn.conf...  Also added.

-- 
Julien ÉLIE

« Traversez la rivière en foule, le crocodile ne vous mangera pas. »
   (proverbe malgache)
Re: Newbie question
#1618
Author: Julien ÉLIE
Date: Thu, 06 Apr 2023 19:09
46 lines
2659 bytes
> Eli, is there something unclear in the gencancel documentation that 
> should be improved?  If that's the case, what should be written and where?

FWIW, I suggest in gencancel, these additions surrounded with "*" to try 
to make it clearer:


If INN was built with Cancel-Lock support, gencancel will generate the 
right *admin* Cancel-Key header field to use in order to authenticate 
cancels.

[...]

In case you only need the *admin* Cancel-Key hashes, you can use the -k 
flag.

[...]

Instead of outputting a whole cancel control message, gencancel will 
just output the body of the *admin* Cancel-Key header field.

[...]

To only retrieve the *admin* Cancel-Key hashes associated to the given 
Message-ID:

[...]

If it all looks good, then inject it into the news system (without 
giving -D to inews):

      gencancel '<mid@news>' | inews -h -P

*Note that inews sends the message to the server specified in the server
parameter in inn.conf.*



I hope it would have made your life easier!

-- 
Julien ÉLIE

« Quand on demande aux gens d'observer le silence, au lieu de l'observer
   comme on observe une éclipse de lune, ils l'écoutent ! » (Raymond
   Devos)
Re: Newbie question
#1619
Author: Eli
Date: Thu, 06 Apr 2023 21:59
25 lines
1826 bytes
On 6 Apr 2023 at 21:00:09 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> inews tries to connect to the server set in the "server" parameter in
> inn.conf.  I guess this parameter is unset.
> 
> I'll add the name of the parameter in the inews manual page.  It
> currently just mentions "inews sends the article to the local news
> server as specified in inn.conf".
> 
> And inews is not listed in the names of the programs for which the
> "server" parameter is used in inn.conf...  Also added.

Hi Julien,

Thank you for answering.
It was the 'server' setting indeed.

I'm getting close, but now inews is trying to connect using the
IPv6 address of the server, instead of IPv4.
I'll have to figure out how to make a workaround for this, especially since
I'm using xinetd for nnrpd.

I have created an IPv6 -> IPv4 proxy in xinetd. That works, but then INN
reports that I don't have permission to cancel messages :(
Re: Newbie question
#1621
Author: Julien ÉLIE
Date: Fri, 07 Apr 2023 07:30
30 lines
2203 bytes
Hi Eli,

> It was the 'server' setting indeed.
> 
> I'm getting close, but now inews is trying to connect using the
> IPv6 address of the server, instead of IPv4.

Did you try to just put the IPv4 address of your server in the "server" 
setting? (instead of its hostname)
It will maybe work (I have not tested).


> I'll have to figure out how to make a workaround for this, especially since
> I'm using xinetd for nnrpd.

In your readers.conf file, you mentioned:

auth "localhost" {
   hosts: "localhost, 127.0.0.1, ::1, stdin"
   default: "<localhost>"
}

Maybe you should also add the DNS (and IP) of your server?

-- 
Julien ÉLIE

« Quand on demande aux gens d'observer le silence, au lieu de l'observer
   comme on observe une éclipse de lune, ils l'écoutent ! » (Raymond
   Devos)
Re: Newbie question
#1622
Author: Eli
Date: Fri, 07 Apr 2023 13:36
43 lines
2343 bytes
On 7 Apr 2023 at 09:30:02 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Eli,
> 
>> It was the 'server' setting indeed.
>> 
>> I'm getting close, but now inews is trying to connect using the
>> IPv6 address of the server, instead of IPv4.
> 
> Did you try to just put the IPv4 address of your server in the "server"
> setting? (instead of its hostname)
> It will maybe work (I have not tested).

Hello Julien,

Yes, that was the trick.
It works now :)

Thank you.

I have another question about the settings in expiration.ctl.

What settings should I use if I want to delete all posts older than 90 days
for 1 specific newsgroup (e.g. linux.debian.bugs.dist).

As far as I can read in the documentation, this mainly concerns the middle
field (the default value) and the first and last fields (keep and purge) are
only important for messages that have an expiration header. But if I set the
<purge> field lower than the <default> field, inncheck still throws a warning.
So it seems that the <keep and purge> fields still affect the <default> value.

linux.debian.bugs.dist:AX:0:90:11
inncheck returns: purge `11' younger than default `90'

linux.debian.bugs.dist:AX:0:90:90
seems good.

What I would like is to have all messages older than 90 days deleted
immediately and messages with the expiration header deleted immediately after
the expiration date.

Which setting do you recommend for this in expire.ctl?
Re: Newbie question
#1623
Author: Eli
Date: Fri, 07 Apr 2023 13:57
39 lines
2287 bytes
On 22 Mar 2023 at 23:49:55 CET, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Eli,
> 
>> Another question, is it possible to limit the maximum number of connections
>> per authenticated user? I know this is possible for peers, but can this also
>> be set up for authenticated users? Maybe a setting in readers.conf or nnrpd
>> that I'm overlooking?
> 
> Unfortunately, the response is no.  There's no native way of limiting
> users' connections.
> You may want to write a custom authentication hook (perl_auth or
> python_auth in readers.conf) that would do the job by accounting how
> many connections are open by a given user, and deny access if it exceeds
> the limit.  I am not aware of existing scripts to do that :-(
> 
> It could be worthwhile having though, as you're not the first one to ask
> (but nobody wrote or shared what he came up with).

Hi Julies,

The nnrpd manual states:

"As each command is received, nnrpd tries to change its "argv" array so that
ps(1) will print out the command being executed."

This will then look like this:
nnrpd: <xxx.xxx.xxx.xxx> GROUP
nnrpd: <xxx.xxx.xxx.xxx> XOVER

Is it perhaps also possible to add the authenticated user to this?

Something like:
nnrpd: <xxx.xxx.xxx.xxx> Eli GROUP
nnrpd: <xxx.xxx.xxx.xxx> Eli XOVER

This would make it possible to limit the number of connections per user via a
perl script.
Re: Newbie question
#1624
Author: Julien ÉLIE
Date: Fri, 07 Apr 2023 15:23
63 lines
4047 bytes
Hi Eli,

> I have another question about the settings in expire.ctl.
> 
> What settings should I use if I want to delete all posts older than 90 days
> for 1 specific newsgroup (e.g. linux.debian.bugs.dist).
> 
> As far as I can read in the documentation, this mainly concerns the middle
> field (the default value) and the first and last fields (keep and purge) are
> only important for messages that have an expiration header. But if I set the
> <purge> field lower than the <default> field, inncheck still throws a warning.
> So it seems that the <keep and purge> fields still affect the <default> value.
> 
> linux.debian.bugs.dist:AX:0:90:11
> inncheck returns: purge `11' younger than default `90'

"""
   <pattern>:<flag>:<min>:<default>:<max>

   The middle field, <default>, will be used as the expiration period for
   most articles.  The other two fields, <min> and <max>, only come into
   play if the article requests a particular expiration date with an
   Expires header field.  Articles with an Expires header field will be
   expired at the date given in that header field, subject to the
   constraints that they will be retained at least <min> days and no
   longer than <max> days.

   One should think of the fields as a lower bound, the default, and an
   upper bound.  Since most articles do not have an Expires header field,
   the second field is the most important and most commonly applied.

   It is often useful to honor the Expires header field in articles,
   especially those in moderated groups.  To do this, set <min> to zero,
   <default> to whatever normal expiration you wish, and <max> to "never"
   or some large number, like 365 days for a maximum article life of a
   year.
"""


> linux.debian.bugs.dist:AX:0:90:90
> seems good.

It is indeed what I would parameter for this newsgroup.


> What I would like is to have all messages older than 90 days deleted
> immediately and messages with the expiration header deleted immediately after
> the expiration date.

That's what the 0:90:90 setting does.

With 0:90:11, suppose that you have an article with an Expires header 
field corresponding to 30 days, it would be deleted after 11 days which 
is not what you were expecting.  That's the reason of the warning from 
inncheck; it looks unusual to force the deletion of articles with an 
Expires header field sooner than other articles.  (The date in the 
Expires header field will still be respected.)

-- 
Julien ÉLIE

« A killfile on Usenet can get you peace and quiet.  A killfile in the
   real world can get you twenty years to life. » (Nils Nieuwjaar)
Re: Newbie question
#1625
Author: Eli
Date: Fri, 07 Apr 2023 16:38
12 lines
1434 bytes
On 7 Apr 2023 at 17:23:46 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> With 0:90:11, suppose that you have an article with an Expires header
> field corresponding to 30 days, it would be deleted after 11 days which
> is not what you were expecting.  That's the reason of the warning from
> inncheck; it looks unusual to force the deletion of articles with an
> Expires header field sooner than other articles.  (The date in the
> Expires header field will still be respected.)

Another stunning explanation.
Thanks again, Julien!
Re: Newbie question
#1626
Author: Julien ÉLIE
Date: Tue, 11 Apr 2023 10:12
47 lines
2797 bytes
Hi Eli,

> The nnrpd manual states:
> 
> "As each command is received, nnrpd tries to change its "argv" array so that
> ps(1) will print out the command being executed."
> 
> This will then look like this:
> nnrpd: <xxx.xxx.xxx.xxx> GROUP
> nnrpd: <xxx.xxx.xxx.xxx> XOVER
> 
> Is it perhaps also possible to add the authenticated user to this?
> 
> Something like:
> nnrpd: <xxx.xxx.xxx.xxx> Eli GROUP
> nnrpd: <xxx.xxx.xxx.xxx> Eli XOVER
> 
> This would make it possible to limit the number of connections per user via a
> perl script.

It is indeed possible to use that "feature".

If you can rebuild INN from sources, just change the following command 
in nnrpd/nnrpd.c:

-        setproctitle("%s %s", Client.host, av[0]);
+
+        setproctitle("%s %s %s", Client.host,
+                     PERMuser[0] != '\0' ? PERMuser : "-", av[0]);


I then have lines like that in a ps output:

   nnrpd: accepting connections
   nnrpd: 176-143-2-105.abo.bbox.fr julien GROUP
   nnrpd: 5.14.145.68 <all> LIST


I am unsure if this would be worth having in an official release; there 
may be privacy concerns.  Maybe it should be configurable with a 
readers.conf option (like addprocesstitleuser which would enable that 
behaviour when set to true in an access group).

-- 
Julien ÉLIE

« Et maintenant, la balle est dans le camp des slalomeurs. »
Re: Newbie question
#1627
Author: Eli
Date: Tue, 11 Apr 2023 17:23
60 lines
2896 bytes
On 11 Apr 2023 at 12:12:12 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Eli,
> 
>> The nnrpd manual states:
>> 
>> "As each command is received, nnrpd tries to change its "argv" array so that
>> ps(1) will print out the command being executed."
>> 
>> This will then look like this:
>> nnrpd: <xxx.xxx.xxx.xxx> GROUP
>> nnrpd: <xxx.xxx.xxx.xxx> XOVER
>> 
>> Is it perhaps also possible to add the authenticated user to this?
>> 
>> Something like:
>> nnrpd: <xxx.xxx.xxx.xxx> Eli GROUP
>> nnrpd: <xxx.xxx.xxx.xxx> Eli XOVER
>> 
>> This would make it possible to limit the number of connections per user via a
>> perl script.
> 
> It is indeed possible to use that "feature".
> 
> If you can rebuild INN from sources, just change the following command
> in nnrpd/nnrpd.c:
> 
> -        setproctitle("%s %s", Client.host, av[0]);
> +
> +        setproctitle("%s %s %s", Client.host,
> +                     PERMuser[0] != '\0' ? PERMuser : "-", av[0]);

That is great news.
Thanks !

> I am unsure if this would be worth having in an official release; there
> may be privacy concerns.  Maybe it should be configurable with a
> readers.conf option (like addprocesstitleuser which would enable that
> behaviour when set to true in an access group).

I don't know if many people will use this feature, but it is nice if INN
supports it. Making it configurable is a good idea.

About pullnews:

In pullnews I use the '-w -1000000' option to download the 1 million most
recent articles per newsgroup.

This works fine, but when pullnews is restarted (for example after a server
timeout), pullnews will redownload all already downloaded articles.

It does come with the message that the articles already exist, but when there
are almost a million per newsgroup, it is not very pleasant.

It would be nice if pullnews continued downloading where it left off. For
example, only if the high water mark >0.

Could you improve this on pullnews?
Thanks.
Re: Newbie question
#1629
Author: Julien ÉLIE
Date: Wed, 12 Apr 2023 08:33
48 lines
3242 bytes
Hi Eli,

>> I am unsure if this would be worth having in an official release; there
>> may be privacy concerns.  Maybe it should be configurable with a
>> readers.conf option (like addprocesstitleuser which would enable that
>> behaviour when set to true in an access group).
> 
> I don't know if many people will use this feature, but it is nice if INN
> supports it. Making it configurable is a good idea.

OK, I'll have a look for a future version.


> About pullnews:
> 
> In pullnews I use the '-w -1000000' option to download the 1 million most
> recent articles per newsgroup.
> 
> This works fine, but when pullnews is restarted (for example after a server
> timeout), pullnews will redownload all already downloaded articles.
> 
> It does come with the message that the articles already exist, but when there
> are almost a million per newsgroup, it is not very pleasant.
> 
> It would be nice if pullnews continued downloading where it left off. For
> example, only if the high water mark >0.
> 
> Could you improve this on pullnews?

Ah, I see the point.
You may want to use "-O" right now to prevent the download of already 
existing articles.

When pullnews automatically restart after a timeout, -w is indeed 
applied again.  After a quick look at all the options, only -w should be 
improved in that case, for not being applied on the newsgroup it was 
treating when the timeout occurred, but directly restart from where it 
was.  I'll provide a patch (not today however but probably tomorrow, I 
hope that's fine for you).

I assume you do not use '-w -1000000' for another run of pullnews 
(manual or out of cron); it would otherwise be normal for it to download 
again a million of articles.

-- 
Julien ÉLIE

« Ils ont refusé une offre de Normand ?!? » (Astérix)
Re: Newbie question
#1630
Author: Eli
Date: Wed, 12 Apr 2023 10:09
35 lines
2259 bytes
On 12 Apr 2023 at 10:33:39 CEST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

>> About pullnews:
>> 
>> In pullnews I use the '-w -1000000' option to download the 1 million most
>> recent articles per newsgroup.
>> 
>> This works fine, but when pullnews is restarted (for example after a server
>> timeout), pullnews will redownload all already downloaded articles.
>> 
>> It does come with the message that the articles already exist, but when there
>> are almost a million per newsgroup, it is not very pleasant.
>> 
>> It would be nice if pullnews continued downloading where it left off. For
>> example, only if the high water mark >0.
>> 
>> Could you improve this on pullnews?
> 
> I assume you do not use '-w -1000000' for another run of pullnews
> (manual or out of cron); it would otherwise be normal for it to download
> again a million of articles.

Yes, I do because there are more newsgroups in the pullnews.mark file that may
not have been downloaded yet.

But I modified pullnews with the line below and this seems to work fine:

if (defined $watermark) {
    printf LOG "\tOur previous highest: %d\n", $prevHigh if not $quiet;
    $high = $watermark;
    $high = $last + $watermark if substr($watermark, 0, 1) eq '-';
+    $high = $prevHigh if $prevHigh > 0;
    $high = 0 if $high < 0;$shash->{$group} = [time, $high];
}
Re: Newbie question
#1628
Author: Julien ÉLIE
Date: Thu, 13 Apr 2023 11:55
82 lines
4740 bytes
Hi Eli,

> But I modified pullnews with the line below and this seems to work fine:
>
> if (defined $watermark) {
>      printf LOG "\tOur previous highest: %d\n", $prevHigh if not $quiet;
>      $high = $watermark;
>      $high = $last + $watermark if substr($watermark, 0, 1) eq '-';
> +    $high = $prevHigh if $prevHigh > 0;
>      $high = 0 if $high < 0;
>      $shash->{$group} = [time, $high];
> }

I am unsure this change does what you expected.
On *each* run, including the first one before any timeout occurs, $high will be forced to $prevHigh, and therefore -w won't be taken into account.
$prevHigh is the highest article number previously downloaded (as recorded in pullnews.marks).  In case it is "0" or unset in pullnews.marks, -w will work, but in case pullnews.marks has for instance recorded 500, and you use "-w -100", nothing will happen ($high won't be set to 400 to force the re-downloading of the latest 100 articles).

I would suggest the following patch instead:

--- a/frontends/pullnews
+++ b/frontends/pullnews
@@ -560,6 +560,7 @@ if (not $quiet and not $quietness) {
  }
  
  my $connectionAttempts = 0;
+my %groupsStarted = ();
  
  UPSTREAM:
  foreach my $server (@servers) {
@@ -689,6 +690,7 @@ foreach my $server (@servers) {
  } continue {
      # Reinitialize the counter for the next server.
      $connectionAttempts = 0;
+    %groupsStarted = ();
  }
  
  saveConfig();
@@ -852,12 +854,17 @@ sub crossFeedGroup {
          printf LOG "\t%d article%s available (first %d, last %d)\n",
            $narticles, $narticles != 1 ? "s" : "", $first, $last;
      }
-    if (defined $watermark) {
+
+    # Do not set several times the water mark to another value.  Just go on
+    # downloading articles from the last retrieved one when the connection
+    # timed out.
+    if (defined($watermark) and !exists($groupsStarted{$group})) {
          printf LOG "\tOur previous highest: %d\n", $prevHigh if not $quiet;
          $high = $watermark;
          $high = $last + $watermark if substr($watermark, 0, 1) eq '-';
          $high = 0 if $high < 0;
          $shash->{$group} = [time, $high];
+        $groupsStarted{$group} = 1;
      }
      printf LOG "\tOur current highest: %d", $high if not $quiet;
  





Incidentally, I see that "pullnews -w" just sets the watermark without downloading articles in the same run.
pullnews -w -100 modifies 500 in pullnews.marks to 400, and exits.  I have to run pullnews again to actually download the articles.
It should not be this way I think.  Suggestion of another fix:

@@ -876,7 +883,7 @@ sub crossFeedGroup {
          $high = $first + floor(($last - $first + 1) * (1 - $opt_b));
          $toget = $last - $high;
          print LOG " (reset highwater mark to $high)" unless $quiet;
-    } elsif ($prevHigh == -1 || $last <= $prevHigh) {
+    } elsif ($prevHigh == -1 || $last <= $high) {
          # We connected OK but there's nothing there, or we just want
          # to reset our highwater mark.
          $shash->{$group} = [time, $high];


-- 
Julien ÉLIE

« – Par Thor !
   – Par Odin !
   – Par exemple ! » (Astérix)
Re: Newbie question
#1631
Author: Julien ÉLIE
Date: Fri, 14 Apr 2023 20:44
18 lines
1883 bytes
Hi Jesse,

>>> [news@spool1 ~]$ cat pullnews4.marks
>>> [news@spool1 ~]$
>>
>> Could you try to add an explicit message error ?
>>
>>       close(FILE) or die "can't close $groupFile: $!\n";;
> 
> Sure, may be a few days before I reply back with results!

Is the problem of an empty pullnews.marks file still happening?

-- 
Julien ÉLIE

« Le caramel est un invité du palais qui menace la couronne. » (Tristan
   Bernard)
Re: Newbie question
#1797
Author: Meow
Date: Wed, 19 Jul 2023 17:34
3 lines
999 bytes
> I really have no idea how much data these newsgroups take up.
from 1982 to 1991 is 191 tapes or 10 gigs so multiply that and youll 
figure it out (then there were no binary newsgroups)
Re: Newbie question
#1796
Author: Meow
Date: Wed, 19 Jul 2023 17:38
9 lines
1250 bytes
> Depends, how much spam and low value articles you can filter out.
> 20-30GB per year is comfortable.
> You can do with way less, if you have curated list of groups and good
> spam filter.
i am starting a server later with 4tb (that is the only spare hdd i have) 
on a rasperry pi with a leaf node runing leafnode of thee other server 
with a smaller ssd. (im backdating viaw olduse.net and giganews to 
backdate 1982-1991 and 1994-preesent) so i have way more than enoth 
Re: Newbie question
#1803
Author: Meow
Date: Wed, 19 Jul 2023 17:40
5 lines
1039 bytes
> Storage capacity wise, I've got 20 years of the Big8 consuming ~750GB.
> On a server with ZFS using CNFS buffers with INN, this can compress down
> to about 300GB using default ZFS compression.

if thats binary and text than good thing ive got 4tb
Page 3 of 3 • 136 total messages
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