Discussion:
Killfiles in pine for news?
(too old to reply)
D
2024-02-21 22:22:56 UTC
Permalink
Hello piners,

Does anyone here have an idea of how I could implement some kind of
killfile when reading news in pine?

I can script key strokes, but curious if there's anything built in, or if
anyone built their own solution somehow.

Best regards,
Daniel
Eduardo Chappa
2024-02-22 03:26:29 UTC
Permalink
Post by D
Does anyone here have an idea of how I could implement some kind of
killfile when reading news in pine?
You could implement filters in Alpine. Press M S R F to start setting up
one.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
D
2024-02-22 08:37:09 UTC
Permalink
Great! Thank you very much for the pointer in the right direction Eduardo!
=) I'll have a look there.

Best regards,
Daniel
Post by D
Does anyone here have an idea of how I could implement some kind of
killfile when reading news in pine?
You could implement filters in Alpine. Press M S R F to start setting up one.
D
2024-02-22 11:45:28 UTC
Permalink
Just to follow up for the benefit of others who might have the same
question. I had a look as per Eduardos advice, and I found the following:

External Categorizer Commands =

Which allows you to call a command to a program that filters for you. So
instead of having one rule per user I want to avoid, I can just write a
script, and add all the usernames I want to avoid to that killfile, and if
I understand things correctly, the rule with an External Categorizer
Command will run my script and return if there is a match, and then I just
select "delete message" or something similar.

Best regards,
Daniel
Great! Thank you very much for the pointer in the right direction Eduardo! =)
I'll have a look there.
Best regards,
Daniel
Post by D
Does anyone here have an idea of how I could implement some kind of
killfile when reading news in pine?
You could implement filters in Alpine. Press M S R F to start setting up one.
D
2024-02-22 21:50:08 UTC
Permalink
Good evening, another update on the killfile problem.

Regardless of if I try a filter or use an external categorizer, it is
painfully slow on active groups.

Does anyone here know of a way to speed it up?

My only discovery that kind of solves it is to not use a filter that
deletes, but instead, a search filter. So I open the group, run a search
filter with the email addresses I want to remove, they get selected, and I
can then delete and expunge them.

I suspect I can script that, so I only have to press 1 letter and run the
entire sequence.

Compared with a filter that directly deletes, this way of doing it is way
faster, at the cost of having to initiate it.

So a question related to that, is there a way I can script or run the
sequence based on opening the group?

I'm thinking something like this:

1. Open news group.
2. _Then_ (once group is loaded) run search, select, delete, expunge
(automatically triggered by the finishing of the step 1).

I can live with connecting the sequence to a keypress such as ctrl-k or
something, but it would be neat to be able to even remote that initial key
press.

Best regards,
Daniel
Just to follow up for the benefit of others who might have the same question.
External Categorizer Commands =
Which allows you to call a command to a program that filters for you. So
instead of having one rule per user I want to avoid, I can just write a
script, and add all the usernames I want to avoid to that killfile, and if I
understand things correctly, the rule with an External Categorizer Command
will run my script and return if there is a match, and then I just select
"delete message" or something similar.
Best regards,
Daniel
Post by D
Great! Thank you very much for the pointer in the right direction Eduardo!
=) I'll have a look there.
Best regards,
Daniel
Post by D
Does anyone here have an idea of how I could implement some kind of
killfile when reading news in pine?
You could implement filters in Alpine. Press M S R F to start setting up one.
Eduardo Chappa
2024-02-24 17:04:15 UTC
Permalink
Post by D
Good evening, another update on the killfile problem.
Regardless of if I try a filter or use an external categorizer, it is
painfully slow on active groups.
My advice is that you do not use the categorizer command. That is intended
to be used for the full message. Instead just set up the headers part,
which will help.

Once you have set up the headers section (and nothing more) quit Alpine
and restart it with the command

alpine -d imap=4,timestamp

repeat the issue, quit Alpine and read the file ~/.pine-debug1. Look for
big gaps in the timestamp. What is alpine doing? What is the server doing?
If you do not understand what you are reading, please post what you can
here and we will help you understand it. It would be useful to see the
capabilities of your server.

Having said all of this, do not expect miracles. Alpine was designed to do
operations over IMAP, not NNTP, and doing filtering over a connected line
is slow even over IMAP.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
D
2024-02-24 19:56:07 UTC
Permalink
Thank you very much Eduardo, I will have a look and see if anything
obvious comes to mind.

For the moment though, it seems like the "winner" is to download all
messages, and _then_ use a search filter to delete unwanted messages.

Am I right in suspecting that a search filter is executed on the
downloaded messages only and that it therefore seems to run at lightning
speed compared with a filter rule that runs _over_ the nntp connection?

Best regards,
Daniel
Post by D
Good evening, another update on the killfile problem.
Regardless of if I try a filter or use an external categorizer, it is
painfully slow on active groups.
My advice is that you do not use the categorizer command. That is intended to
be used for the full message. Instead just set up the headers part, which
will help.
Once you have set up the headers section (and nothing more) quit Alpine and
restart it with the command
alpine -d imap=4,timestamp
repeat the issue, quit Alpine and read the file ~/.pine-debug1. Look for big
gaps in the timestamp. What is alpine doing? What is the server doing? If you
do not understand what you are reading, please post what you can here and we
will help you understand it. It would be useful to see the capabilities of
your server.
Having said all of this, do not expect miracles. Alpine was designed to do
operations over IMAP, not NNTP, and doing filtering over a connected line is
slow even over IMAP.
Eduardo Chappa
2024-02-25 20:18:48 UTC
Permalink
Post by D
For the moment though, it seems like the "winner" is to download all
messages, and _then_ use a search filter to delete unwanted messages.
Yes, I agree. The speed of Alpine will be determined by several factors.
In your case it will also depend on the capabilities of the server. Local
access will make Alpine much faster. That might be the best solution for
you.
Post by D
Am I right in suspecting that a search filter is executed on the
downloaded messages only and that it therefore seems to run at lightning
speed compared with a filter rule that runs _over_ the nntp connection?
If Alpine has to download the message to process it, then it will do that,
and that will seem very slow. However, once the message has been
downloaded, it will be cached and any further access will be from cached
memory, and it will be very fast.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
D
2024-02-26 10:32:32 UTC
Permalink
Great, thank you for the clarification Eduardo! =)

Another question... do you think it would be possible to script some kind
of "nntp sync" that delivers news messages into Maildir folders and have
alpine interact with those as news messages?

My idea here is that it would be great to be able to download the news
messages locally, interact with them locally, and then once done, send
them to the newsgroup.

Best regards,
Daniel
Post by D
For the moment though, it seems like the "winner" is to download all
messages, and _then_ use a search filter to delete unwanted messages.
Yes, I agree. The speed of Alpine will be determined by several factors. In
your case it will also depend on the capabilities of the server. Local access
will make Alpine much faster. That might be the best solution for you.
Post by D
Am I right in suspecting that a search filter is executed on the downloaded
messages only and that it therefore seems to run at lightning speed
compared with a filter rule that runs _over_ the nntp connection?
If Alpine has to download the message to process it, then it will do that,
and that will seem very slow. However, once the message has been downloaded,
it will be cached and any further access will be from cached memory, and it
will be very fast.
Carlos E.R.
2024-02-26 12:26:02 UTC
Permalink
Post by D
Great, thank you for the clarification Eduardo! =)
Another question... do you think it would be possible to script some
kind of "nntp sync" that delivers news messages into Maildir folders and
have alpine interact with those as news messages?
My idea here is that it would be great to be able to download the news
messages locally, interact with them locally, and then once done, send
them to the newsgroup.
Not with Alpine. If you are on Linux, use "leafnode" instead.

Telcontar:~ # rpm -q leafnode
leafnode-2.0.0+git.1625851959.1275fbe-bp155.1.9.x86_64
Telcontar:~ # rpm -qi leafnode
Name : leafnode
Version : 2.0.0+git.1625851959.1275fbe
Release : bp155.1.9
Architecture: x86_64
Install Date: Mon Feb 12 01:09:40 2024
Group : Unspecified
Size : 1119852
License : MIT
Signature : RSA/SHA512, Mon May 22 12:57:47 2023, Key ID 8a49eb0325db7ae0
Source RPM : leafnode-2.0.0+git.1625851959.1275fbe-bp155.1.9.src.rpm
Build Date : Mon May 22 12:57:32 2023
Build Host : lamb54
Relocations : (not relocatable)
Packager : https://bugs.opensuse.org
Vendor : openSUSE
URL : http://www.dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/
Summary : Leaf site NNTP server
Description :
Leafnode is a small NNTP server for leaf sites without permanent
connection to the internet. It supports a subset of NNTP and is able to
automatically fetch the newsgroups the user reads regularly from the
newsserver of the ISP and additionally offer local (site-specific)
groups to a LAN.
Distribution: SUSE Linux Enterprise 15 SP5
Telcontar:~ #


Note: it has filters and can do a kill file action.
--
Cheers, Carlos.
D
2024-02-26 14:20:41 UTC
Permalink
Post by Carlos E.R.
Post by D
Great, thank you for the clarification Eduardo! =)
Another question... do you think it would be possible to script some kind
of "nntp sync" that delivers news messages into Maildir folders and have
alpine interact with those as news messages?
My idea here is that it would be great to be able to download the news
messages locally, interact with them locally, and then once done, send them
to the newsgroup.
Not with Alpine. If you are on Linux, use "leafnode" instead.
Telcontar:~ # rpm -q leafnode
...
Post by Carlos E.R.
Note: it has filters and can do a kill file action.
Oh, that actually sounds _exactly_ like what I'm looking for, and I
could just point alpine to the local nntp, and use it as a local cache
(if it works like I think it does). Brillant! Thank you very much! =)

Best regards,
Daniel
D
2024-02-27 20:49:17 UTC
Permalink
Post by D
Post by Carlos E.R.
Post by D
Great, thank you for the clarification Eduardo! =)
Another question... do you think it would be possible to script some kind
of "nntp sync" that delivers news messages into Maildir folders and have
alpine interact with those as news messages?
My idea here is that it would be great to be able to download the news
messages locally, interact with them locally, and then once done, send
them to the newsgroup.
Not with Alpine. If you are on Linux, use "leafnode" instead.
Telcontar:~ # rpm -q leafnode
...
Post by Carlos E.R.
Note: it has filters and can do a kill file action.
Oh, that actually sounds _exactly_ like what I'm looking for, and I
could just point alpine to the local nntp, and use it as a local cache
(if it works like I think it does). Brillant! Thank you very much! =)
Best regards, Daniel
And to continue my adventures for the benefit of other seekers, today I
compiled leafnode, discovered that it needs tcpd which I installed. Then
got caught by xinetd which was required according to the documentation and
got stuck...(not supported on my linux any longer)

But! Lo and behold!

I saw a leafnode.socket and a ***@.service file in the code base and
despite those not being mentioned in the INSTALL file, they looked good
enough! So after enabling those leafnode is up and running!

So far the speed of going through newsgroup on leafnode compared with my
regular news provider is an enormous improvement.

The only thing I have not yet figured out is how to get my news-server
view and my localhost server view to line up.

For some reason, messages are not mirrored. I can press "&" and then I'll
get back all messages and my news-server messages are as they should be,
and in my local news server I have _all_ messages including the latest
ones, but when running fetchnews, for some reason, new messages to not
show up in server 127.0.0.1.

But I'll keep on tinkering to see if I can get it to work.

Best regards,
Daniel
Carlos E.R.
2024-02-27 21:11:16 UTC
Permalink
Post by D
Post by D
Post by Carlos E.R.
Post by D
Great, thank you for the clarification Eduardo! =)
Another question... do you think it would be possible to script some
kind of "nntp sync" that delivers news messages into Maildir folders
and have alpine interact with those as news messages?
My idea here is that it would be great to be able to download the
news messages locally, interact with them locally, and then once
done, send them to the newsgroup.
Not with Alpine. If you are on Linux, use "leafnode" instead.
Telcontar:~ # rpm -q leafnode
...
Post by Carlos E.R.
Note: it has filters and can do a kill file action.
Oh, that actually sounds _exactly_ like what I'm looking for, and I
could just point alpine to the local nntp, and use it as a local cache
(if it works like I think it does). Brillant! Thank you very much! =)
And to continue my adventures for the benefit of other seekers, today I
compiled leafnode, discovered that it needs tcpd which I installed. Then
got caught by xinetd which was required according to the documentation
and got stuck...(not supported on my linux any longer)
But! Lo and behold!
The openSUSE rpm supports systemd.

Telcontar:~ # rpm -ql leafnode
/etc/leafnode
/etc/leafnode/config
/etc/leafnode/local.groups
/etc/leafnode/uucp
/etc/sudoers.d
/etc/sudoers.d/leafnode
/usr/bin/leafnode-version
/usr/bin/lsmac.pl
/usr/bin/newsq
/usr/lib/systemd/system/leafnode-daily.service
/usr/lib/systemd/system/leafnode-daily.timer
/usr/lib/systemd/system/leafnode-hourly.service
/usr/lib/systemd/system/leafnode-hourly.timer
/usr/lib/systemd/system/leafnode.socket
/usr/lib/systemd/system/***@.service
/usr/lib/systemd/system/***@.service.in
/usr/sbin/applyfilter
/usr/sbin/checkgroups
/usr/sbin/fetchnews
/usr/sbin/leafnode
/usr/sbin/rnews
/usr/sbin/sendbatch.bash
/usr/sbin/texpire
/usr/share/doc/packages/leafnode
/usr/share/doc/packages/leafnode/AUTHORS
/usr/share/doc/packages/leafnode/CHANGES-FROM-LEAFNODE-1
/usr/share/doc/packages/leafnode/CREDITS
/usr/share/doc/packages/leafnode/ChangeLog
/usr/share/doc/packages/leafnode/DEBUGGING
/usr/share/doc/packages/leafnode/ENVIRONMENT
/usr/share/doc/packages/leafnode/FAQ.tex
/usr/share/doc/packages/leafnode/NEWS
/usr/share/doc/packages/leafnode/README-FQDN.tex
/usr/share/doc/packages/leafnode/README-SUSE.rst
/usr/share/doc/packages/leafnode/README-leaf.node
/usr/share/doc/packages/leafnode/README.html
/usr/share/doc/packages/leafnode/TODO
/usr/share/doc/packages/leafnode/config.example
/usr/share/doc/packages/leafnode/filters.example
/usr/share/licenses/leafnode
/usr/share/licenses/leafnode/COPYING
/usr/share/licenses/leafnode/COPYING.LGPL
/usr/share/man/man1/leafnode-version.1.gz
/usr/share/man/man1/lsmac.1.gz
/usr/share/man/man1/newsq.1.gz
/usr/share/man/man1/sendbatch.1.gz
/usr/share/man/man5/filterfile.5.gz
/usr/share/man/man5/moderators.5.gz
/usr/share/man/man8/applyfilter.8.gz
/usr/share/man/man8/checkgroups.8.gz
/usr/share/man/man8/fetchnews.8.gz
/usr/share/man/man8/leafnode.8.gz
/usr/share/man/man8/rnews.8.gz
/usr/share/man/man8/texpire.8.gz
/var/spool/news
/var/spool/news/leaf.node
Telcontar:~ #
Post by D
and despite those not being mentioned in the INSTALL file, they looked
good enough! So after enabling those leafnode is up and running!
So far the speed of going through newsgroup on leafnode compared with my
regular news provider is an enormous improvement.
The only thing I have not yet figured out is how to get my news-server
view and my localhost server view to line up.
Huh?
Post by D
For some reason, messages are not mirrored. I can press "&" and then
I'll get back all messages and my news-server messages are as they
should be, and in my local news server I have _all_ messages including
the latest ones, but when running fetchnews, for some reason, new
messages to not show up in server 127.0.0.1.
Is the cron job running or systemd timer enabled?

It is not real time, the fetch job runs at intervals.
Post by D
But I'll keep on tinkering to see if I can get it to work.
:-)
--
Cheers, Carlos.
D
2024-02-27 22:17:42 UTC
Permalink
Post by Carlos E.R.
Post by D
And to continue my adventures for the benefit of other seekers, today I
compiled leafnode, discovered that it needs tcpd which I installed. Then
got caught by xinetd which was required according to the documentation and
got stuck...(not supported on my linux any longer)
But! Lo and behold!
The openSUSE rpm supports systemd.
Telcontar:~ # rpm -ql leafnode
...
Post by Carlos E.R.
Post by D
despite those not being mentioned in the INSTALL file, they looked good
enough! So after enabling those leafnode is up and running!
So far the speed of going through newsgroup on leafnode compared with my
regular news provider is an enormous improvement.
The only thing I have not yet figured out is how to get my news-server view
and my localhost server view to line up.
Huh?
I try to explain a bit more clearly further down.
Post by Carlos E.R.
Post by D
For some reason, messages are not mirrored. I can press "&" and then I'll
get back all messages and my news-server messages are as they should be,
and in my local news server I have _all_ messages including the latest
ones, but when running fetchnews, for some reason, new messages to not show
up in server 127.0.0.1.
Is the cron job running or systemd timer enabled?
It is not real time, the fetch job runs at intervals.
Post by D
But I'll keep on tinkering to see if I can get it to work.
:-)
Thank you Carlos, I think you would have saved me a few hours, but where
would the fun have been in that? ;)

Jokes aside, what I have a problem with is the following.

I check news on the remote server and alt.atheism has 22 news messages. I
then run fetchnews to fetch news into the leafnode spool directory, and
then check my second collection which is leafnode (127.0.0.1) and when I
enter alt.atheism, I see nothing!

The strange thing is, your message right now, shows up both in
comp.mail.pine on the remote server, _and_ on my leafnode server and I
don't currently understand what I did differently.

I suspect it has something to do with exclude/unexclude and that I use
delete to keep track of new messages in alpine, but that is just a
suspicion for the moment.

Best regards,
Daniel

Loading...