🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72318

Re: filtering algorithm

#72318
From: Curt Welch
Date: Sun, 25 Sep 2005 03:00
174 lines
8097 bytes
Allen Brunson <brunsona@takethisout.newsguy.com> wrote:
> Curt Welch wrote:

> >> 3) use XHDR to get matching headers/articles.
> >
> > Likewise, some servers only support the XOVER headers for XHDR.
>
> can you qualify "some?"  10 percent, 50 percent, 80 percent?

The trend started with the Highwinds servers (typhoon/cyclone/twister)
which have been very popular in the past with ISPs.  I don't even know if
their current products still do this I would guess they do.  These servers
alone could make a substatial percentage of the servers (30% would be a
wild guess).

Here's what easynews does as an example (They might still be running
Highwind softwre on their backend servers):

group news.software.nntp
211 1213 77870 79283 news.software.nntp
xhdr subject 77870-77875
221 subject fields follow
77870 Newsman Pro 2.0 Released
77871 The Greatest News Ever!
77873 Re: What are these directories, and why doesn't anything prune them?
77874 es, and why doesn't anything prune them?
77875 es, and why doesn't anything prune them?
..
xhdr path 77870-77875
221 path fields follow
77870 (none)
77871 (none)
77873 (none)
77874 (none)
77875 (none)
..
xhdr newsgroups 77870-77875
221 newsgroups fields follow
77870 news.software.nntp
77871 news.software.nntp
77873 news.software.nntp
77874 news.software.nntp
77875 news.software.nntp
..
xhdr organization 77870-77875
221 organization fields follow
77870 (none)
77871 (none)
77873 (none)
77874 (none)
77875 (none)
..

This bizare use of (none) is the crap that Highwinds started.  But it's
interesting that Easynews supports Newsgroups even though it's not in the
XOVER data.  I don't know if that's something Highinwds did or something
Easynews might have "faked" by using the Xref: data.

Diablo servers I think tend to support xhdr for all headers.  So services
like newshosting and octanews and readnews and astraweb as well as all the
ISPs that use Diablo will have full xhdr support.  I don't remember what
INN does.  It used to do full xhdr but I don't know about performance or if
it might be disabled by defalut.

I support xhdr but on all headers, it's very slow on non xover headers
because my server does header featches for each article in order to get the
data.  So this can confuse a client like your's because it will look like
it "works" to your software yet is so slow as to be mostly unusable on
large binay groups with thousands to millions of articles.

Here's another test on a giganews server:

group news.software.nntp
211 6933 92617 99549 news.software.nntp
xover 99549
224 xover information follows
99549   Re: Authentication advice       "John F. Morse"
<xanadu.bbs@invalid.net>        Sat, 24 Sep 2005 17:25:29 -0500
<e90d4$4335d25a$4097152a$3064@EVERESTKC.NET>
<2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET>
<dh4dmf$d5u$1@puck.litech.org>    425793       Xref:
number1.nntp.dca.giganews.com news.software.nntp:99549 .
xhdr organization 99549
221 organization fields follow
99549 (none)
..
xhdr newsgroups 99549
221 newsgroups fields follow
99549 (none)
..
xhdr xref 99549
221 xref fields follow
99549 Xref: number1.nntp.dca.giganews.com news.software.nntp:99549
..
xhdr message-id 99549
221 message-id fields follow
99549 <e90d4$4335d25a$4097152a$3064@EVERESTKC.NET>
..


So it looks like the old highwinds technique but unlike easynews, they
don't support newsgroups.  Giganews used to use Highwinds software but
wrote their own a few years back - but it looks like they cloned the
Highwinds behavior.

Supernews I believe supports a few more useful headers other than just the
xover headers for commands like xhdr, but they don't support all of them
(if I remember correctly - I don't have an account on their servers so I
cant test).

That should give you an idea of the mess you are getting into by trying to
make intelligent use of xhdr for non-xover fields.

> i'm trying to decide if it would be worthwhile to write code that tries
> XHDR and then falls back to something else, or just immediately fall back
> to something else.
>
> > If you can filter sets of binary posts by doing a header only on the
> > first article from each set, then that might be useful. But to try and
> > do header fetches on 100,000 headers to filter a binary group will
> > never work.
>
> well, i'm not trying to do "xbin on the client" or anything severe like
> that. this will be for things like "killfile this thread,"

Why can't you do that with References: and Subject: data from XOVER?

> "auto-download
> bodies for all replies to my posts,"

If you put custom markers in your Message-IDs you can spot replies with the
References: data in XOVER.

> etc.  some people get really bent
> out of shape over morphing trolls, i've noticed, and would like to filter
> on one of those headers that some news servers supply that give the IP
> address of the poster.

Yeah, spam/troll filtering is where access to all the other headers that
show up in posts becomes very useful.  It's just not easy to get access to
those headers in bulk from most news servers.

If you are trying to do better spam/troll filtering for small text groups
that tend to have 1000 or less posts, then playing games with xhdr can work
well.  If you are trying to filter binary groups with 100,000 new posts a
day, it's hard to make xhdr worth the time.  So if you add features
designed to work well in small text groups, you have to take care about
what happens when people try to use them in a group with 10 million
articles in it.

> and while HEAD might be slow, it's definitely
> faster than getting the whole article, which is what i'm currently doing
> in most cases, and then applying the filtering in a killfile-like fashion
> to get rid of stuff the user doesn't want to see.

Yeah, for sure.  HEAD is better than the entire article even for text
posts.  And if your code is smart, and uses BODY to get the body instead of
ARTICLE then you don't have to download the header twice.  If your intent
is to work well for slower speed connections like dial up, then doing
things like that can still be a win.

A technique that can work well (and maybe this is what you are already
doing), is to not try to do the extra filtering until the user selects a
"next article" function, so you fetch headers, and skip articles as needed
until you find the next good one.  That why you are not trying to filter
1000 articles at once using HEAD for each when you first enter the group.
But you still need to watch out for what happens when you get a flood of
1000's of posts which you filter tries to reject and causes it to hang for
minutes scanning the crap. You need a UI to let the user know this is
happening and given them the option to abort instead of waiting.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20050924230059.258$6V@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mail
References: <PM0004016A591AD163@remy.nashville.comcast.net> <20050923204014.201$oA@newsreader.com> <PM0004017C87959F07@remy.nashville.comcast.net>

Show Full Headers
Complete Article Headers
Message-ID: <20050924230059.258$6V@newsreader.com>
Subject: Re: filtering algorithm
Date: Sun, 25 Sep 2005 03:00:59 +0000
From: curt@kcwc.com (Curt Welch)
References: <PM0004016A591AD163@remy.nashville.comcast.net> <20050923204014.201$oA@newsreader.com> <PM0004017C87959F07@remy.nashville.comcast.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com Mg,yi8-lmEZuCL6iJosE.AHnCTK8C5GTC8jzMsxEPenRjrt@
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 174