🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
43 messages
43 total messages Started by Rahul Dhesi Tue, 05 May 1998 00:00
risk of UNIX postings being misidentified as spam?
#27987
Author: Rahul Dhesi
Date: Tue, 05 May 1998 00:00
20 lines
1429 bytes
Given that some spam killing software counts repetitions of the same
host in the Nntp-Posting-Host header, what is the realistic chance of
postings made by UNIX shell customers being mis-identified as spam?
What are typical posting rates that if exceeded would cause postings to
be incorrectly killed?  Is there a consensus as to what posting rate
is a good threshold that minimizes the risk of killing postings from
shell users?

Are their any work-arounds for this other than (a) persuading everybody
to add your hosts to their exceptions list and (b) faking the
Nntp-Posting-Host header so differnt postings from the same client UNIX
host have different host names?

If anybody has studied this issue it would be useful to know what your
conclusions were.
-- 
Rahul Dhesi <dhesi@spams.r.us.com>

Re: risk of UNIX postings being misidentified as spam?
#27988
Author: Dale Ghent
Date: Tue, 05 May 1998 00:00
34 lines
2241 bytes
Rahul Dhesi wrote:
> 
> Given that some spam killing software counts repetitions of the same
> host in the Nntp-Posting-Host header, what is the realistic chance of
> postings made by UNIX shell customers being mis-identified as spam?
> What are typical posting rates that if exceeded would cause postings to
> be incorrectly killed?  Is there a consensus as to what posting rate
> is a good threshold that minimizes the risk of killing postings from
> shell users?

I've been looking into this myself.  After installing Cleanfeed on all
of our news feeders and readers... all the wierd and odd things
concerning filtering came to light. Several examples of customers that
can trip a EMP filter, but are legitamite is multi-part binary postings,
companies that post to *.jobs* groups, and, as you said, shell boxes
where you may see large amount of posts from one IP.

The only EMP filter that would catch the later are the ones that zero in
on the NNTP-Posting-Host lines. The solution: exempt the shell box from
the filter. If someone does spam from the shell box, the EMP filters
that look at Subject, From, and article body would catch it. That's the
best compromise I can come up with, without reducing the effectivness of
the fitlers by a large degree. 

			-Dale G.

-- 
Dale Ghent                        daleg @ digex.net
NetworkNews Administrator             DIGEX, Inc.
http://www.digex.net                Beltsville, MD
                    I speak for myself

Re: risk of UNIX postings being misidentified as spam?
#27993
Author: Jeremy
Date: Wed, 06 May 1998 00:00
19 lines
1324 bytes
Kenneth Herron <kherron@campus.mci.net> wrote:

> I see the posting-host+lines filter catch a lot of job posts where the
> posts came from the same place but the jobs being advertised are all
> different.

My heart bleeds.  I consider those database-dumpers worse than most
spammers.

The only way to really allow that stuff is to add 'jobs' to the
'allexclude' config line, or shut off the ph/l filter completely.

-- 
Jeremy | jeremy@exit109.com
"...by God I *KNOW* what this network is for, and you can't have it."
                             --Russ Allbery

Re: risk of UNIX postings being misidentified as spam?
#28000
Author: T. William Wells
Date: Wed, 06 May 1998 00:00
15 lines
1222 bytes
In article <6io1ku$c3$1@samba.rahul.net>,
Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:
: Given that some spam killing software counts repetitions of the same
: host in the Nntp-Posting-Host header, what is the realistic chance of
: postings made by UNIX shell customers being mis-identified as spam?

Lovely. And what about anon.twwells.com, which provides anonymous
posting for the support and recovery groups? There are 20,000
addresses assigned there but they all feed through the same news
server, typically around 100/day. Am I going to have to resort to
spammers' evasion techniques to keep overzealous despammers from
disrupting my service?

Re: risk of UNIX postings being misidentified as spam?
#28001
Author: Ray Rocker
Date: Wed, 06 May 1998 00:00
29 lines
1835 bytes
In article <00003550A81F.NO_UCE@mauve.demon.co.uk>,
Ian Stirling  <00003550A81F.NO_UCE@mauve.demon.co.uk> wrote:
>Curt Welch <curt@kcwc.com> wrote:
>: Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
>: product doing that) but the default filter doesn't kick in until it sees 16
>: posts within 16 minutes (at least according to the 1.11 man page).
>
>Yeouch, I diddn't realise how much I'd been posting, I count about 3300 
>articles this past year.
>Given that the distribution is a bit bumpy, I'd have got filtered for at
>least 60 or 70 days out of the past year, if I was posting via something
>that put in nntp-posting-host.

I imagine quite a few Diablo admins have turned off the posting-host
filter as I have, leaving only the duplicate-body filter. Jeff Garzik
has a very simple patch for this on his site.

For me that decision came after my reader box had throttled itself 
for a while and posts from my users had built up in in.coming.
When the whole bunch got sent to Diablo in one burst, it happily
rejected a bunch of non-spam binary articles one user had posted. 

--
Ray Rocker
rocker@datasync.com


Re: risk of UNIX postings being misidentified as spam?
#28002
Author: Dale Ghent
Date: Wed, 06 May 1998 00:00
20 lines
1375 bytes
Jeremy wrote:

> The only ones I see are in the exemption list by default.  Contributions
> always welcome -- but I've not seen false postives from a shell system
> before.

Reflecting alittle bit... you typicaly do not see a shell box spewing
forth posts from different users. It's typically spread-out, sparse
traffic that isnt enough to trip the filters.

			-Dale G.

-- 
Dale Ghent                        daleg @ digex.net
NetworkNews Administrator             DIGEX, Inc.
http://www.digex.net                Beltsville, MD
                    I speak for myself

Re: risk of UNIX postings being misidentified as spam?
#28003
Author: Jeremy
Date: Wed, 06 May 1998 00:00
20 lines
1495 bytes
Russ Allbery  <rra@stanford.edu> wrote:

> I've seen Cleanfeed's ph/l filter take out posts in this fashion before
> in the (very rare) combination of a mail to news gateway and a lot of
> traffic with exactly the same line count.  In particular, can.domains.
> 
> The modified version of Cleanfeed that I'm using excludes all moderated
> groups from the ph/l filter, since the chance of false positives was too
> high for my comfort.

My version of Cleanfeed will do things like this for moderated groups
as soon as I code up a way to tell what groups are moderated without
trusting a random Approved header.

-- 
Jeremy  |  jeremy@exit109.com
Here's a nickel, kid.  Go buy yourself a real computer.

Re: risk of UNIX postings being misidentified as spam?
#28004
Author: Russ Allbery
Date: Wed, 06 May 1998 00:00
19 lines
1434 bytes
USENET news <news@news.cam.ac.uk> writes:

> What about mailing list to news gateways? Especially if the gateway's
> been down for a few hours or days, a busy gateway could easily send out
> a few hundreds posts as fast the hardware and network could handle it...

I've seen Cleanfeed's ph/l filter take out posts in this fashion before
in the (very rare) combination of a mail to news gateway and a lot of
traffic with exactly the same line count.  In particular, can.domains.

The modified version of Cleanfeed that I'm using excludes all moderated
groups from the ph/l filter, since the chance of false positives was too
high for my comfort.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: risk of UNIX postings being misidentified as spam?
#28005
Author: Curt Welch
Date: Wed, 06 May 1998 00:00
44 lines
2762 bytes
bill@twwells.com (T. William Wells) wrote:
> In article <6io1ku$c3$1@samba.rahul.net>,
> Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:
> : Given that some spam killing software counts repetitions of the same
> : host in the Nntp-Posting-Host header, what is the realistic chance of
> : postings made by UNIX shell customers being mis-identified as spam?
>
> Lovely. And what about anon.twwells.com, which provides anonymous
> posting for the support and recovery groups? There are 20,000
> addresses assigned there but they all feed through the same news
> server, typically around 100/day. Am I going to have to resort to
> spammers' evasion techniques to keep overzealous despammers from
> disrupting my service?

Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
product doing that) but the default filter doesn't kick in until it sees 16
posts within 16 minutes (at least according to the 1.11 man page).

At 100/day that works out to an avg of 1 every 14 minutes which I think
will keep you well below the filter's limit.  But if your volume picks up
enough or something happens to cause a batch of more then 16 articles to
go thought at once, you could get filtered.  Checking my Diablo logs for
the past 5 days I see no posts from twwells.com being filtered. It's only
some of the largest services like aol that seem to be able to hit these
limits.

If you are concerned enough to do something, it would be good if you
could make the nntp-Posting-Host: header reflect the source of the
message.  I.e.  All posts from the same user should have the same (but
unique) Nntp-Posting-Host value.

Something like:

NNTP-Posting-Host: anon-19801.twwells.com

would be good. (unless some people filter on bogus host names which
I would doubt).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com         Now Open! ---->  Webmaster for http://NewsReader.Com/

Re: risk of UNIX postings being misidentified as spam?
#28007
Author: Ian Stirling
Date: Wed, 06 May 1998 00:00
43 lines
3162 bytes
Curt Welch <curt@kcwc.com> wrote:
: bill@twwells.com (T. William Wells) wrote:
:> In article <6io1ku$c3$1@samba.rahul.net>,
:> Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:
:> : Given that some spam killing software counts repetitions of the same
:> : host in the Nntp-Posting-Host header, what is the realistic chance of
:> : postings made by UNIX shell customers being mis-identified as spam?
:>
:> Lovely. And what about anon.twwells.com, which provides anonymous
:> posting for the support and recovery groups? There are 20,000
<snip>
: Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
: product doing that) but the default filter doesn't kick in until it sees 16
: posts within 16 minutes (at least according to the 1.11 man page).

Yeouch, I diddn't realise how much I'd been posting, I count about 3300 
articles this past year.
Given that the distribution is a bit bumpy, I'd have got filtered for at
least 60 or 70 days out of the past year, if I was posting via something
that put in nntp-posting-host.

I'm a demon internet customer, which means I've got a static IP, on which
I run INN, sucking articles from demon, and posting them via a mail2news
gateway. If I was posting "normally" being offline, all the messages would
go in a burst, with a nntp-posting-host of mauve.demon.co.uk

Probably time to revive my little "check it all hit a remote server"
script in that case.

(I'm using mail2news, as it makes it trivial to ensure that at least
the message has got to the main news-hub, and back out to the 
customer facing servers, which means it's likely to have hit the net.)



-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
What a wonderfull world it is that has girls in it!     Robert A Heinlein.


Re: risk of UNIX postings being misidentified as spam?
#28008
Author: Jeremy
Date: Wed, 06 May 1998 00:00
22 lines
1733 bytes
Kenneth Herron <kherron@campus.mci.net> wrote:

> Sigh.  Like I said, I realize that these posts are generally not
> wanted.  I'm just saying that if the ph/l filter is supposed to be
> catching database-dump posts it does a poor job of it (because it's
> using irrelevant criteria), and if it's *not* supposed to be catching
> them then it's getting false positives.  Surely you can consider the
> fact that these are false positives separately from the fact that
> dropping them is nevertheless desirable?

Well, the filter is designed to drop posts from the same host that are
of the same length when too many are seen in a very short time; posts
that may be missed by other EMP checks because the message bodies are
slightly different.  Some jobs posts fit this criteria, and others do
not, so in that respect, I'd say it's doing just what it's supposed to.

-- 
Jeremy  |  jeremy@exit109.com
"Never tell me the odds."  --Han Solo

Re: risk of UNIX postings being misidentified as spam?
#28010
Author: Rahul Dhesi
Date: Wed, 06 May 1998 00:00
38 lines
2299 bytes
In <19980506112514.776$34@newsreader.com> curt@kcwc.com (Curt Welch) writes:

>Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
>product doing that) but the default filter doesn't kick in until it sees 16
>posts within 16 minutes (at least according to the 1.11 man page).

The question arose when a newsgroup moderator reported that a batch of
approved postings, posted close together in time from a shell login, did
not propagate.  I wondered if spam filtering was the problem.  A batch
of say 20 approved postings would easily be seen all within 16 minutes;
maybe within just 3-4 minutes.

>Checking my Diablo logs for
>the past 5 days I see no posts from twwells.com being filtered. It's only
>some of the largest services like aol that seem to be able to hit these
>limits.

If the posting site feeds out through a small number of sites, each with
filtering in place, the killed postings might never reach your site.

>If you are concerned enough to do something, it would be good if you
>could make the nntp-Posting-Host: header reflect the source of the
>message.  I.e.  All posts from the same user should have the same (but
>unique) Nntp-Posting-Host value.

This would be a good solution.  In fact one of the built-in options
in inn *ought* to be to do an ident lookup and insert the username
in the Nntp-Posting-Host value.

Would there be any problem if this were in the form of an email
address?  E.g.:

     Nntp-Posting-Host: joeuser@newshost.example.com
-- 
Rahul Dhesi <dhesi@spams.r.us.com>

Re: risk of UNIX postings being misidentified as spam?
#28017
Author: Curt Welch
Date: Wed, 06 May 1998 00:00
26 lines
2080 bytes
news@news.cam.ac.uk (USENET news) wrote:
> If Diablo filters by the rate at which articles arrive from a particular
> host (as opposed to unpicking the Date: headers and looking at posting
> time), I cannot see how it can do anything but nuke batches of articles
> randomly and erroneously in such cases. [Reassurance from Diablo experts
> would be welcome, or fixes to make the code more cautious, as
> appropriate!]

It does.  No question about it.  That's why lots of people that run
diablo don't use it.  They opt for using the other more sophisticated
filters out there.  But still, if you look through the 200K articles
that get filtered, you don't see the false positives.  Out of 200K filtered
articles a day maybe there are 500 false positives.  Yes it would be
nice to not have any false positives, but given the choice between
200K less spam articles in my feed vs 500 missing "good" articles, I'll opt
for taking the spam out.

Over time, I'll move to better spam filters, but for now I don't mind
a few false positives.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com         Now Open! ---->  Webmaster for http://NewsReader.Com/

Re: risk of UNIX postings being misidentified as spam?
#28019
Author: Jeremy
Date: Wed, 06 May 1998 00:00
20 lines
1545 bytes
Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:

> Isn't it possible that postings got killed by the same sort of 
> filtering on their way to you, so you never saw them?  As you know,
> Usenet's redundancy is somewhat illusionary, because everybody uses one
> of a very small number of software packages.  If a software feature
> kills postings, they may get killed on each redundant path.

Yes, this is possible.  However, I do get "full" feeds from quite a
few sites, including two top-twenty sites one of which doesn't filter.
I did a lot of testing before many people were running filters, and I
don't actually see any difference between then and now, in terms of
how much spam is sent to me.

-- 
Jeremy  |  jeremy@exit109.com
"Bunch of savages in this town!"  --Dante ("Clerks")

Re: risk of UNIX postings being misidentified as spam?
#28020
Author: Jeremy
Date: Wed, 06 May 1998 00:00
29 lines
1648 bytes
Dale Ghent  <daleg@digex.net> wrote:

> I've been looking into this myself.  After installing Cleanfeed on all
> of our news feeders and readers... all the wierd and odd things
> concerning filtering came to light. Several examples of customers that
> can trip a EMP filter, but are legitamite is multi-part binary postings,

Posts over 1000 lines in binary groups are exempt from the posting-host
filter in Cleanfeed.

> companies that post to *.jobs* groups,

If they're posting enough to bounce off that filter, they aren't
"legitimate".

> and, as you said, shell boxes where you may see large amount of
> posts from one IP.

The only ones I see are in the exemption list by default.  Contributions
always welcome -- but I've not seen false postives from a shell system
before.

-- 
Jeremy  |  jeremy@exit109.com
"If it's not real, WHY DOES IT TAKE UP DISK SPACE?" --bev.
                                   net.subculture.usenet

Re: risk of UNIX postings being misidentified as spam?
#28022
Author: Kenneth Herron
Date: Wed, 06 May 1998 00:00
24 lines
1815 bytes
In article <GUO31.25$bZ4.12927@firestorm.gunslinger.net>,
Jeremy  <jeremy@exit109.com> wrote:
|I don't see [false rejections based on posting-host] with my filter.
|It requires posts to have the same
|posting-host header *and* be of the same length, and it has to see a lot
|of them in a short time.

I see the posting-host+lines filter catch a lot of job posts where the
posts came from the same place but the jobs being advertised are all
different.  I realize that job-bank-database-dump posts aren't well
thought of (and I tend to agree), but either (a) the filter isn't
supposed to catch these, in which case they're false positives, or (b)
it *is* supposed to catch these, in which case it's being arbitrary and
capricious due to the line count portion of the check (line count seems
largely irrelevent to the issue of which job posts are droppable).
-- 
Kenneth Herron -- kherron@campus.mci.net
"When Microsoft first took control of the Funk & Wagnalls Encyclopedia
product, there was a flattering biography of Bill Gates.  But it said he
was known as a tough competitor.  Now it says that he's known for his
charitable contributions." -- Gary Reback, <http://www.ljx.com/reback/>

Re: risk of UNIX postings being misidentified as spam?
#28026
Author: USENET news
Date: Wed, 06 May 1998 00:00
54 lines
3642 bytes
In article <19980506112514.776$34@newsreader.com>,
Curt Welch <curt@kcwc.com> wrote:
>bill@twwells.com (T. William Wells) wrote:
>> In article <6io1ku$c3$1@samba.rahul.net>,
>> Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:
>> : Given that some spam killing software counts repetitions of the same
>> : host in the Nntp-Posting-Host header, what is the realistic chance of
>> : postings made by UNIX shell customers being mis-identified as spam?
>>
>> Lovely. And what about anon.twwells.com, which provides anonymous
>> posting for the support and recovery groups? There are 20,000
>> addresses assigned there but they all feed through the same news
>> server, typically around 100/day. Am I going to have to resort to
>> spammers' evasion techniques to keep overzealous despammers from
>> disrupting my service?
>
>Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
>product doing that) but the default filter doesn't kick in until it sees 16
>posts within 16 minutes (at least according to the 1.11 man page).
>
>At 100/day that works out to an avg of 1 every 14 minutes which I think
>will keep you well below the filter's limit.  But if your volume picks up
>enough or something happens to cause a batch of more then 16 articles to
>go thought at once, you could get filtered.  Checking my Diablo logs for
>the past 5 days I see no posts from twwells.com being filtered. It's only
>some of the largest services like aol that seem to be able to hit these
>limits.

What about mailing list to news gateways? Especially if the gateway's been 
down for a few hours or days, a busy gateway could easily send out a few 
hundreds posts as fast the hardware and network could handle it...

For that matter, what about a normal feed from a busy site when the link has 
been down. Universities (for example) tend to have a lot of UNIX systems 
(and rooms of general-access PCs and Macs, so even if one person posts only 
a few articles from a particular system, the total from a system may be much 
higher). You could easily get a few hundred articles as fast as the link
could manage after any significant link downtime, with a fair chance that
quite a few would be from particular large UNIX boxes or specific systems in
the PC/Mac clusters, giving the impression of a very high short-term posting
rate. [There are UNIX systems around here with thousands of registered
users, and hundreds of active users on some of them at peak times. Not all
reading use, but around 200 doing so at peak times.]

If Diablo filters by the rate at which articles arrive from a particular 
host (as opposed to unpicking the Date: headers and looking at posting 
time), I cannot see how it can do anything but nuke batches of articles 
randomly and erroneously in such cases. [Reassurance from Diablo experts 
would be welcome, or fixes to make the code more cautious, as appropriate!]

                                John Line

Re: risk of UNIX postings being misidentified as spam?
#28027
Author: Timothy J. Miller
Date: Wed, 06 May 1998 00:00
13 lines
1041 bytes
kherron@campus.mci.net (Kenneth Herron) writes:

> I see the posting-host+lines filter catch a lot of job posts where the
> posts came from the same place but the jobs being advertised are all
> different.

	This is a feature.

-- 
Cerebus <tmill06@ibm.net>

Re: risk of UNIX postings being misidentified as spam?
#28028
Author: Kenneth Herron
Date: Wed, 06 May 1998 00:00
27 lines
1875 bytes
In article <%W_31.29$bZ4.13852@firestorm.gunslinger.net>,
Jeremy  <jeremy@exit109.com> wrote:
|Kenneth Herron <kherron@campus.mci.net> wrote:
|
|> I see the posting-host+lines filter catch a lot of job posts where the
|> posts came from the same place but the jobs being advertised are all
|> different.
|
|My heart bleeds.  I consider those database-dumpers worse than most
|spammers.

Sigh.  Like I said, I realize that these posts are generally not
wanted.  I'm just saying that if the ph/l filter is supposed to be
catching database-dump posts it does a poor job of it (because it's
using irrelevant criteria), and if it's *not* supposed to be catching
them then it's getting false positives.  Surely you can consider the
fact that these are false positives separately from the fact that
dropping them is nevertheless desirable?
-- 
Kenneth Herron -- kherron@campus.mci.net
"When Microsoft first took control of the Funk & Wagnalls Encyclopedia
product, there was a flattering biography of Bill Gates.  But it said he
was known as a tough competitor.  Now it says that he's known for his
charitable contributions." -- Gary Reback, <http://www.ljx.com/reback/>

Re: risk of UNIX postings being misidentified as spam?
#28031
Author: Russ Allbery
Date: Wed, 06 May 1998 00:00
17 lines
1275 bytes
Chris Lewis <clewis@ferret.ocunix.on.ca> writes:
> Jeremy <jeremy@exit109.com> wrote:

>> My version of Cleanfeed will do things like this for moderated groups
>> as soon as I code up a way to tell what groups are moderated without
>> trusting a random Approved header.

> You are inside innd, why not read the active file? ;-)

You're not really inside innd, you're just kinda inside innd.  Perl
filtering is very odd.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: risk of UNIX postings being misidentified as spam?
#28033
Author: Rahul Dhesi
Date: Wed, 06 May 1998 00:00
19 lines
1501 bytes
In <GUO31.25$bZ4.12927@firestorm.gunslinger.net> Jeremy
<jeremy@exit109.com> writes:

>The only stuff that I see bouncing off it that
>shouldn't (except one or two odd one-off incidents) are posts from AOL,
>Dejanews, etc, where a huge number of people are posting all the time.
>I've looked at literally weeks worth of rejections from the filter
>several times and come to the conclusion that it's safe.

Isn't it possible that postings got killed by the same sort of 
filtering on their way to you, so you never saw them?  As you know,
Usenet's redundancy is somewhat illusionary, because everybody uses one
of a very small number of software packages.  If a software feature
kills postings, they may get killed on each redundant path.
-- 
Rahul Dhesi <dhesi@spams.r.us.com>

Re: risk of UNIX postings being misidentified as spam?
#28034
Author: Jeremy
Date: Wed, 06 May 1998 00:00
27 lines
1851 bytes
Rahul Dhesi <c.c.eiftj@18.usenet.us.com> wrote:

> Given that some spam killing software counts repetitions of the same
> host in the Nntp-Posting-Host header, what is the realistic chance of
> postings made by UNIX shell customers being mis-identified as spam?
> What are typical posting rates that if exceeded would cause postings to
> be incorrectly killed?  Is there a consensus as to what posting rate
> is a good threshold that minimizes the risk of killing postings from
> shell users?

I don't see it with my filter.  It requires posts to have the same
posting-host header *and* be of the same length, and it has to see a lot
of them in a short time.  The only stuff that I see bouncing off it that
shouldn't (except one or two odd one-off incidents) are posts from AOL,
Dejanews, etc, where a huge number of people are posting all the time.
I've looked at literally weeks worth of rejections from the filter
several times and come to the conclusion that it's safe.

Rate filtering only on the posting-host, however, *will* get false
positives like this, and should *never* be used.

-- 
Jeremy  |  jeremy@exit109.com
"Never tell me the odds."  --Han Solo

Re: risk of UNIX postings being misidentified as spam?
#28044
Author: Kenneth Herron
Date: Thu, 07 May 1998 00:00
21 lines
1647 bytes
In article <6iqut8$qtq@bcarh8ab.bnr.ca>,
Chris Lewis <clewis@ferret.ocunix.on.ca> wrote:
|>My version of Cleanfeed will do things like this for moderated groups
|>as soon as I code up a way to tell what groups are moderated without
|>trusting a random Approved header.
|
|You are inside innd, why not read the active file? ;-)

From a software engineering standpoint, the filter interface is rather
primitive and poorly designed (personal #1 gripe: %hdr keys, i.e. header
names, are provided in mixed case).  My learn-to-build-perl-extensions-in-C
project is probably going to be a set of INN callbacks.
-- 
Kenneth Herron -- kherron@campus.mci.net
"When Microsoft first took control of the Funk & Wagnalls Encyclopedia
product, there was a flattering biography of Bill Gates.  But it said he
was known as a tough competitor.  Now it says that he's known for his
charitable contributions." -- Gary Reback, <http://www.ljx.com/reback/>

Re: risk of UNIX postings being misidentified as spam?
#28046
Author: Russ Allbery
Date: Thu, 07 May 1998 00:00
27 lines
1632 bytes
Bob MacDowell <bobmacd> writes:
> c.c.eiftj@18.usenet.us.com (Rahul Dhesi) writes:

>> Given that some spam killing software counts repetitions of the same
>> host in the Nntp-Posting-Host header, what is the realistic chance of
>> postings made by UNIX shell customers being mis-identified as spam?

Pretty low; I watched those filters very closely for that.  (At least in
Cleanfeed; I can't speak for Diablo, which does some other things.)

>> What are typical posting rates that if exceeded would cause postings to
>> be incorrectly killed?

20 posts *with the exact same line length* in a hour or two.

> I'm surprised spam filters are doing this; I've never considered that
> line to be a useful metric in identifying spam.  I would never use it.
> But then, I'm a shell account user :-)

It's proven incredibly useful at catching all sorts of spam, and nukes
jobs database dumps as a side benefit.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: risk of UNIX postings being misidentified as spam?
#28047
Author: Jeremy
Date: Thu, 07 May 1998 00:00
18 lines
1372 bytes
Chris Lewis <clewis@ferret.ocunix.on.ca> wrote:

>> My version of Cleanfeed will do things like this for moderated
>> groups as soon as I code up a way to tell what groups are moderated
>> without trusting a random Approved header.
> 
> You are inside innd, why not read the active file? ;-)

Unfortunately, you don't have access to anything from the Perl
filter.  You have to just read it as a file like everyone else.
Which isn't any big deal, of course. :)

-- 
Jeremy  |  jeremy@exit109.com
The customer is always right, until he tries to say something.

Re: risk of UNIX postings being misidentified as spam?
#28048
Author: Matt Dillon
Date: Thu, 07 May 1998 00:00
32 lines
2146 bytes
:In article <6iqdsk$bmb$1@osh1.datasync.com>,
:Ray Rocker <rocker@datasync.com> wrote:
:>In article <00003550A81F.NO_UCE@mauve.demon.co.uk>,
:>Ian Stirling  <00003550A81F.NO_UCE@mauve.demon.co.uk> wrote:
:..
:>>Yeouch, I diddn't realise how much I'd been posting, I count about 3300 
:>>articles this past year.
:>>Given that the distribution is a bit bumpy, I'd have got filtered for at
:>>least 60 or 70 days out of the past year, if I was posting via something
:>>that put in nntp-posting-host.
:>
:>I imagine quite a few Diablo admins have turned off the posting-host
:>filter as I have, leaving only the duplicate-body filter. Jeff Garzik
:>has a very simple patch for this on his site.

    It's a tradeoff.  I'm definitely going to add appropriate options to
    allow finer control of Diablo's spam filter, including turning off
    the nntp-posting-host: part of it, but it will still be on by default
    (i.e. so smart news admins will be able to tune it, and dumb ones will
    get the benefit of the filter even if they lose a small percentage of
    valid postings through it).

						-Matt

-- 
    Matthew Dillon   Engineering, BEST Internet Communications, Inc.
    <dillon@best.net>, include original article w/ any response.
    do not under any circumstances send email to joeblow@bigspender.idiom.com
    and, for gods sake, don't email bucktram@popserver.idiom.com

Re: risk of UNIX postings being misidentified as spam?
#28065
Author: Chris Lewis
Date: Thu, 07 May 1998 00:00
23 lines
1675 bytes
In article <pp641.33$bZ4.14697@firestorm.gunslinger.net>,
Jeremy  <jeremy@exit109.com> wrote:
>Russ Allbery  <rra@stanford.edu> wrote:
>
>> I've seen Cleanfeed's ph/l filter take out posts in this fashion before
>> in the (very rare) combination of a mail to news gateway and a lot of
>> traffic with exactly the same line count.  In particular, can.domains.
>> 
>> The modified version of Cleanfeed that I'm using excludes all moderated
>> groups from the ph/l filter, since the chance of false positives was too
>> high for my comfort.
>
>My version of Cleanfeed will do things like this for moderated groups
>as soon as I code up a way to tell what groups are moderated without
>trusting a random Approved header.

You are inside innd, why not read the active file? ;-)
-- 
For more information on spam, see http://spam.abuse.net/spam
Fight spam, support Rep. Chris Smith's TCPA extension: http://www.cauce.org

Re: risk of UNIX postings being misidentified as spam?
#28067
Author: T. William Wells
Date: Fri, 08 May 1998 00:00
54 lines
2913 bytes
In article <19980506112514.776$34@newsreader.com>,
Curt Welch <curt@kcwc.com> wrote:
: bill@twwells.com (T. William Wells) wrote:
: > Lovely. And what about anon.twwells.com, which provides anonymous
: > posting for the support and recovery groups? There are 20,000
: > addresses assigned there but they all feed through the same news
: > server, typically around 100/day. Am I going to have to resort to
: > spammers' evasion techniques to keep overzealous despammers from
: > disrupting my service?
:
: Diablo filters spam by Nntp-Posting-Host rate (I think it might be the only
: product doing that) but the default filter doesn't kick in until it sees 16
: posts within 16 minutes (at least according to the 1.11 man page).
:
: At 100/day that works out to an avg of 1 every 14 minutes which I think
: will keep you well below the filter's limit.

You think wrong. I have a, guess what, *spam filter* in front of
that server. Messages are delayed varying amounts to collect
statistics and released in batches.

: go thought at once, you could get filtered.  Checking my Diablo logs for
: the past 5 days I see no posts from twwells.com being filtered. It's only
: some of the largest services like aol that seem to be able to hit these
: limits.

I already have a report from someone that this filtering is
happening and has affected the propagation of anon.twwells.com at
several news sites.

: If you are concerned enough to do something, it would be good if you

There are people whose lives have been saved by this service.

: could make the nntp-Posting-Host: header reflect the source of the
: message.  I.e.  All posts from the same user should have the same (but
: unique) Nntp-Posting-Host value.

: Something like:
:
: NNTP-Posting-Host: anon-19801.twwells.com
:
: would be good. (unless some people filter on bogus host names which
: I would doubt).

Even that won't help. In recent memory, some of my users have
posted large numbhers of messages in a single day and, because
their mail servers weren't talking to mine for a time, those
messages all got posted at the same time. Using NNTP-Posting-Host
on its own to spam filter is *stupid* -- that simply penalizes
almost any news server that handles other than dialups.

Re: risk of UNIX postings being misidentified as spam?
#28068
Author: rjk
Date: Fri, 08 May 1998 00:00
17 lines
1286 bytes
mooring@arduin.Tymnet.COM (Ed Mooring) writes:

> As a first cut, here are some of the pieces of INN that should be
> accessible to the Perl filters, along with a proposed calling
> sequence.
> 
> 1) Check the history database for a message-id.
>     INN::havehist($messageid);
>     returns true if $messageid is in the history database.

It'd be nice if returned information like newsgroups and article
numbers for the article too (like xpath in NNTP).  I don't have an
immediate application for this, it just seems like the sensible thing
to include for completeness.

Re: risk of UNIX postings being misidentified as spam?
#28073
Author: stare master
Date: Fri, 08 May 1998 00:00
23 lines
1781 bytes
In article <wiemy4aa5c.fsf@hera.local.easynet.de>,
Jonas Luster  <jonas@easynews.net> wrote:
>dillon@best.net (Matt Dillon) writes:
>>     the nntp-posting-host: part of it, but it will still be on by default
>>     (i.e. so smart news admins will be able to tune it, and dumb ones will
>>     get the benefit of the filter even if they lose a small percentage of
>>     valid postings through it).
>Reads like: "Let's pray my newsadmin is competent enough". Why not
>just turn it off by default and let the dumber ones pay for it?

"Goddammit, i wish that retard upstream from me would turn his damn
spam filter on!  I've emailed him about it but he just doesn't have a
fucking clue!"

rone
-- 
fuck, i'm so fucking full of angst i think i'll go read generation x so many
times i have it memorized and it just oozes out of my pores like so much of
the empty pseudophilosphy and religion i willingly embrace and espouse to my
peers and mentors.	- Patrick J. Finerty <zinc@zifi.genetics.utah.edu>

Re: risk of UNIX postings being misidentified as spam?
#28074
Author: Jeremy
Date: Fri, 08 May 1998 00:00
28 lines
1740 bytes
Ed Mooring <mooring@tymnet.com> wrote:

> This is the third time I've seen somebody (at least implicitly) wishing
> that INN's Perl filter had more access to INN's innards.  Since I've
> already added a message-id filter for Perl, and I've looked at the idea
> of a Perl/INN interface already, I'll round up some loose tuits and
> bash something together if people are interested.

Consider people interested. :)

Speaking of the message-id filter, initial tests are positive, though
I've not had a chance to try it out myself.  This is a patch to add a
perl hook to the NNTP CHECK transaction, to look at the message-id and
decide whether you want to continue or reject the article.

I've made it available:

ftp://ftp.exit109.com/users/jeremy/messageid.patch

Consider it a beta.

-- 
Jeremy  |  jeremy@exit109.com
"I wish to have no connection with any ship that does not sail fast;
    for I intend to go in harm's way."  --John Paul Jones

Re: risk of UNIX postings being misidentified as spam?
#28075
Author: john
Date: Fri, 08 May 1998 00:00
13 lines
1223 bytes
Ed Mooring wrote:
> If anybody has any comments or wishes to add, post and/or mail 'em. If I get
> more than a couple of responses, I'll build the thing.

That would be ggggrrreeeaaaattt!

-- 
        John Payne          | VM:    JOHN at RTP                     
  IBM Global Services NS    | email: john@raleigh.ibm.com            
  OpenNet Services (EMEA)   | Intranet http://w3.irc.ibm.com/jpayne

Re: risk of UNIX postings being misidentified as spam?
#28077
Author: Silas Dunsmore
Date: Fri, 08 May 1998 00:00
84 lines
4002 bytes
In article <6iui65$rl2@arduin.Tymnet.COM>,
Ed Mooring <mooring@tymnet.com> wrote:
>
>This is the third time I've seen somebody (at least implicitly) wishing
>that INN's Perl filter had more access to INN's innards.  Since I've
>already added a message-id filter for Perl, and I've looked at the idea
>of a Perl/INN interface already, I'll round up some loose tuits and
>bash something together if people are interested.

It appears to me that the proper place to put the callback is in the
innd/cc.c file.  This code already implements an interface for ctlinnd.
It should be easier to leverage that than to write it from scratch.

I've done some preparatory work toward this end, though I haven't touched
the actual Perl/C thunks yet.  Want the diffs?


>1) Check the history database for a message-id.
>2) Cancel an article.
>3) Add an article to the history database.
>4) Check to see if a newsgroup exists, and find its status.

The first three of these are available through the aforementioned ICC
interface.  Implementation should be trivial.  (He said with a smirk.)

The last could perhaps be implemented by tie'ing a hash to INND's
internal newsgroups list.  I haven't researched this at all.

It might be better (easier, anyway) to have the filter explicitly parse
the active file into a standard hash, with a resync every so often.

It'd eat a couple megs of memory, though.  Ah, but memory's cheap.  And
this would allow more flags than INND itself uses: binaries allowed,
only-binaries, poison newsgroups, stricter filtering, per-newsgroup
crossposting limits, ....  All the ad-hoc stuff (sorry, Jeremy) that
cleanfeed is doing could be made more regular and orthogonal.

Q: how nasty would it be to have our own special flags in the active
file itself, after the y/n/m ? And what breaks if we do so?  I note that
ctlinnd won't let me insert them.


>This, along with a Perl interface to PGP, and the dynamic-loading patch to
>INN, would be enough to implement NOCEM in the Perl filter. 

No!  Don't do this!  Really!

Remember, while the perl filter is running, INND is not doing anything
else.  Also, the necessary execs (and forks?) to call PGP from the filter
sound like a highly suspect thing to do.

Bottom line: mass-cancels should be done outside the core.


>If anybody has any comments or wishes to add, post and/or mail 'em. If I get
>more than a couple of responses, I'll build the thing.

Q: how much experience do you have with the Perl-XS interface?  This is
the first time I've looked at it, and I'm not comfortable with it yet.

The callback seems doable, but there's no real examples of the right way
to implement it in the documentation.

The examples that exist are geared toward making a C library available
as a Perl module.  (Much as MD5.pm is implemented.)  There's really no
good "meat" on getting embedded Perl interpreters to call back into the
C program they're within.

Q: Does anyone know of any program that already implements embeded Perl
and strong two-way Perl/C calling, that could be used as an example?


>-- 
>Regards,
>Ed Mooring (mooring@tymnet.com 408-922-7504)

-- 
Later, eh?    Silas

Announcer(after a long thoughtful pause): Sure makes you think, this modern
               physics.

Re: risk of UNIX postings being misidentified as spam?
#28078
Author: Ed Mooring
Date: Fri, 08 May 1998 00:00
53 lines
2664 bytes
In article <4Z741.34$bZ4.14913@firestorm.gunslinger.net>,
Jeremy  <jeremy@exit109.com> wrote:
>Chris Lewis <clewis@ferret.ocunix.on.ca> wrote:
[snip]
>> You are inside innd, why not read the active file? ;-)
>
>Unfortunately, you don't have access to anything from the Perl
>filter.  You have to just read it as a file like everyone else.
>Which isn't any big deal, of course. :)

This is the third time I've seen somebody (at least implicitly) wishing
that INN's Perl filter had more access to INN's innards.  Since I've
already added a message-id filter for Perl, and I've looked at the idea
of a Perl/INN interface already, I'll round up some loose tuits and
bash something together if people are interested.

As a first cut, here are some of the pieces of INN that should be
accessible to the Perl filters, along with a proposed calling
sequence.

1) Check the history database for a message-id.
    INN::havehist($messageid);
    returns true if $messageid is in the history database.

2) Cancel an article.
    INN::cancel($messageid);
    returns true if $messageid was successfully cancelled.

3) Add an article to the history database.
    INN::addhistory($messageid);
    returns true if $messageid was successfully added to the 
    history database.

4) Check to see if a newsgroup exists, and find its status.
    $status = INN::newsgroup($group)
    returns undef if the group is not in active, otherwise returns
    the status of the group:
    'y' for posting ok
    'm' for moderated
    'j' for junk
    '=whatever' if it's aliased

This, along with a Perl interface to PGP, and the dynamic-loading patch to
INN, would be enough to implement NOCEM in the Perl filter. 

If anybody has any comments or wishes to add, post and/or mail 'em. If I get
more than a couple of responses, I'll build the thing.
-- 
Regards,
Ed Mooring (mooring@tymnet.com 408-922-7504)

Re: risk of UNIX postings being misidentified as spam?
#28080
Author: tom minchin
Date: Fri, 08 May 1998 00:00
20 lines
1449 bytes
bobmacd+980507Nnsn@netcom.com (Bob MacDowell) writes:
>c.c.eiftj@18.usenet.us.com (Rahul Dhesi) writes:
>I'm surprised spam filters are doing this; I've never considered that 
>line to be a useful metric in identifying spam.   I would never use it.
>But then, I'm a shell account user :-) 

From reading the marketing, DNEWS uses this method to 'filter spam'.

>Making their NNTP-Posting-Host be set based on user would be a good plan.
>I don't know how doable it is, but I know Netcom forces the Sender line...
>so I don't see why you couldn't force the NNTP-Posting-Host to be like
>NNTP-Posting-Host: user.bobmacd/host.netcom4.netcom.com
>I wouldn't do it as user@host because it would invite spam harvesting. 

Probably better to use UID for privacy and accountability.

tom@interact.net.au

Re: risk of UNIX postings being misidentified as spam?
#28083
Author: Jonas Luster
Date: Fri, 08 May 1998 00:00
15 lines
1193 bytes
dillon@best.net (Matt Dillon) writes:

>     the nntp-posting-host: part of it, but it will still be on by default
>     (i.e. so smart news admins will be able to tune it, and dumb ones will
>     get the benefit of the filter even if they lose a small percentage of
>     valid postings through it).

Reads like: "Let's pray my newsadmin is competent enough". Why not
just turn it off by default and let the dumber ones pay for it?

take care,
        jonas

Re: risk of UNIX postings being misidentified as spam?
#28087
Author: Russ Allbery
Date: Sat, 09 May 1998 00:00
33 lines
2317 bytes
Will Pierce <*-NOSPAM-*willp@dreamscape.com> writes:

> Though at times I truly wonder if I should try my hand at modifying
> cleanfeed to make it concern itself with the content of postings.

Already done.  You need INN 1.7.2-insync-1.1d or the equivalent patches to
make it work really well, though.

> However, I'm guessing that the biggest problem with content-sensitive
> filtering is the CPU required for filtering.  When you're receiving
> postings at a rate of anywhere from 9 to 20 articles a second, with an
> average article size of 8-16k.... you need some fast hardware to back up
> your filtering program.

Nah.  I'm running MD5 checksums on a fairly decent percentage of all of my
incoming traffic, as well as doing regex matches on the body looking for
misplaced binaries, and the CPU usage is hardly noticeable.  News servers
are horribly I/O bound; if using the CPU some more means you write fewer
files out to disk, it's probably going to be a net performance gain.

> Has anyone else thought about this?  I'd imagine that you could put
> together a set of regexp's and build up an index of how many match
> against the body of a message.  If the total index exceeds a certain
> threshhold, then whammo it's blown away.  It would probably take a lot
> of work to create the regexp's in the first place, though.

See the current Cleanfeed.  :)

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: risk of UNIX postings being misidentified as spam?
#28089
Author: Jeremy
Date: Sun, 10 May 1998 00:00
36 lines
2341 bytes
Will Pierce  <*-NOSPAM-*willp@dreamscape.com> wrote:

> However, I'm guessing that the biggest problem with content-sensitive
> filtering is the CPU required for filtering.  When you're receiving
> postings at a rate of anywhere from 9 to 20 articles a second, with an
> average article size of 8-16k.... you need some fast hardware to back up
> your filtering program.
> 
> Has anyone else thought about this?  I'd imagine that you could put
> together a set of regexp's and build up an index of how many match against
> the body of a message.  If the total index exceeds a certain threshhold,
> then whammo it's blown away.  It would probably take a lot of work to
> create the regexp's in the first place, though.

Coincidentally, I'm already doing this; the code is running on my server
now and will be in the next release.  It hasn't slowed down the filtering
by any noticeable amount.  Perl is fast; I think it runs in another
dimension.

Creating the regexps has been quite a lot of work.

> Whether an approach like this would even filter out an appreciable number
> of articles after a content-blind filter got done is another question
> entirely.

It gets more than enough to make it worthwhile.  It's generally number
4 or 5 on the list of rejections, and what's in there is only really
the beginning of what could be there, geared mostly toward sex spam.

-- 
Jeremy  |  jeremy@exit109.com
"I wish to have no connection with any ship that does not sail fast;
    for I intend to go in harm's way."  --John Paul Jones

Re: risk of UNIX postings being misidentified as spam?
#28090
Author: Will Pierce
Date: Sun, 10 May 1998 00:00
37 lines
2335 bytes
Russ Allbery <rra@stanford.edu> wrote:

> You're not really inside innd, you're just kinda inside innd.  Perl
> filtering is very odd.

Amen brother.  Though at times I truly wonder if I should try my hand at
modifying cleanfeed to make it concern itself with the content of
postings.  I've thought of a few ways it might be possible to characterize
the content of spam.  The idea of a spam "index" is absolutely necessary
though, to permit tuning.

However, I'm guessing that the biggest problem with content-sensitive
filtering is the CPU required for filtering.  When you're receiving
postings at a rate of anywhere from 9 to 20 articles a second, with an
average article size of 8-16k.... you need some fast hardware to back up
your filtering program.

Has anyone else thought about this?  I'd imagine that you could put
together a set of regexp's and build up an index of how many match against
the body of a message.  If the total index exceeds a certain threshhold,
then whammo it's blown away.  It would probably take a lot of work to
create the regexp's in the first place, though.

Whether an approach like this would even filter out an appreciable number
of articles after a content-blind filter got done is another question
entirely.

-Will

-- 
Will Pierce
System Administrator
Dreamscape Online, LLC.
*-NOSPAM-*willp@dreamscape.com

Re: risk of UNIX postings being misidentified as spam?
#28129
Author: Russ Allbery
Date: Wed, 13 May 1998 00:00
17 lines
1346 bytes
Simon Lyall <simon@darkmere.gen.nz> writes:

> Hmm I just had 50 odd posts come out as fast as the moderation program
> would handle them. They were all posted to the group
> nz.politics.announce with the same From "Ministerial Announcements
> <announce@ministers.govt.nz> " and the same NNTP-Posting-Host:
> ("localhost" which I guess I should fix ).

localhost should be explicitly exempted from posting host / lines filters,
since it can see unusually high volumes of posts for various reasons.
It's certainly exempted from mine, and is from Cleanfeed as well.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: risk of UNIX postings being misidentified as spam?
#28160
Author: Simon Lyall
Date: Thu, 14 May 1998 00:00
18 lines
1395 bytes
Hmm I just had 50 odd posts come out as fast as the moderation program
would handle them. They were all posted to the group nz.politics.announce
with the same From "Ministerial Announcements <announce@ministers.govt.nz> "
and the same NNTP-Posting-Host: ("localhost" which I guess I should fix ).

Did these trip anyones filters?

BTW: They were all legit posts, it is budget day today and as soon as the
Treasurer's speech has finished everything is released.

-- 
Simon J. Lyall  |  Very Busy  |  Mail: simon@darkmere.gen.nz
"Inside me Im Screaming, Nobody pays any attention."  |  MT.

Why is that those who trust politicians least, want them to run everything? 

Re: risk of UNIX postings being misidentified as spam?
#28161
Author: USENET news
Date: Thu, 14 May 1998 00:00
25 lines
1793 bytes
In article <m3hg2tjx2h.fsf@windlord.Stanford.EDU>,
Russ Allbery  <rra@stanford.edu> wrote:
>Simon Lyall <simon@darkmere.gen.nz> writes:
>
>> Hmm I just had 50 odd posts come out as fast as the moderation program
>> would handle them. They were all posted to the group
>> nz.politics.announce with the same From "Ministerial Announcements
>> <announce@ministers.govt.nz> " and the same NNTP-Posting-Host:
>> ("localhost" which I guess I should fix ).
>
>localhost should be explicitly exempted from posting host / lines filters,
>since it can see unusually high volumes of posts for various reasons.
>It's certainly exempted from mine, and is from Cleanfeed as well.

No good if your peers (or their peers, or...) drop the legitimate articles
instead, of course. :-(   [Posting rate per host filters would be more of
an issue, probably, than "too many articles the same length" filters.]

                                John Line
-- 
Cambridge University Computing Service - USENET news manager.
newsmaster@ucs.cam.ac.uk    (alias {newsmaster,news,usenet}@news.cam.ac.uk)

PERL calling back to INN [was Re: risk of UNIX postings being misidentified as spam?]
#28203
Author: Ed Mooring
Date: Sat, 16 May 1998 00:00
181 lines
5933 bytes
I rounded up enough tuits to let perl call back into INN for the
features I outlined. It's been running for a few thousand trials in my
production server, so I guess it's time to unleash it on the world. The
patch that follows is against inn-1.7.2.innsync-1.1d as archived on
jeremy@exit109.com's web site.

I have provided no documentation as yet, so this sketch will have to do
for you doughty beta testers:

There are four perl subs available from the perl subroutines called
from within INN:

INN::havehist(messageid)  # returns true if messageid is in the history db
INN::newsgroup(newsgroup) # returns the status of the news group (the last
	                  # field of the active file, or false if the
			  # isn't in your active file
INN::cancel(messageid)    # cancels messageid on your server

INN::addhist(messageid, arrivaltime,articletime,expiretime,paths)
			  # adds messageid to the history database
			  # all the other fields are optional.
			  # the time fields default to the current
			  # time, and the paths field defaults to
			  # the empty string.

Passing garbage messageid's _will_ crash INN. This patch has no
sanity checking on content or length of messageid's. I await field
reports to determine whether such checking is necessary.

Here's the patch:

*** ../inn-1.7.2.insync-1.1d/innd/innd.c	Mon Dec  8 15:48:50 1997
--- innd/innd.c	Fri May 15 16:25:47 1998
***************
*** 937,942 ****
--- 937,943 ----
  #if defined(DO_PERL)
      /* Load the Perl code */
      PERLsetup(_PATH_PERL_STARTUP_INND, _PATH_PERL_FILTER_INND, "filter_art");
+     PERLinndAPIinit();
      PerlFilter (TRUE) ;
  #endif /* defined(DO_PERL) */
   
*** ../inn-1.7.2.insync-1.1d/innd/cc.c	Fri Dec 12 08:58:54 1997
--- innd/cc.c	Fri May 15 23:13:03 1998
***************
*** 1868,1870 ****
--- 1868,1994 ----
      CCclose();
      CCsetup();
  }
+ 
+ /*
+  * The beginnings of a perl interface to the INN command set.
+  * I chose to put it in this file to avoid having to rewrite any code,
+  * and to avoid having to change the visibility of any of the functions
+  * in this module.
+  * -- Ed Mooring (mooring@acm.org) May 14, 1998
+  */
+ 
+ #if defined(DO_PERL)
+ 
+ #include "EXTERN.h"
+ #include "perl.h"
+ #include "XSUB.h"
+ 
+ 
+ XS(XS_INN_havehist)
+ {
+     dXSARGS;
+     char*	msgid;
+ 
+     if (items != 1)
+         croak("Usage: INN::havehist(msgid)");
+ 
+     msgid = (char *)SvPV(ST(0),na);
+     HIShavearticle(msgid) ? XSRETURN_YES : XSRETURN_NO;
+ }
+ 
+ XS(XS_INN_cancel)
+ {
+     dXSARGS;
+     char*	msgid;
+     char*	parambuf[2];
+ 
+     if (items != 1)
+         croak("Usage: INN::cancel(msgid)");
+ 
+     msgid = (char *)SvPV(ST(0),na);
+     parambuf[0]=msgid;
+     parambuf[1]= 0;
+     /* CCcancel returns NULL on success, hence reversed return codes */
+     CCcancel(parambuf) ? XSRETURN_NO : XSRETURN_YES;
+ }
+ 
+ XS(XS_INN_addhist)
+ {
+     dXSARGS;
+     char*	msgid;
+     char*	arrivaltime;
+     char*	articletime;
+     char*	expiretime;
+     char*	articlepaths = "";
+     char	tbuff[12];
+     char*	parambuf[6];
+ 
+     if (items < 1 || items > 5)
+ 	croak("Usage INN::addhist(msgid,[arrivaltime,articletime,expiretime,paths])");
+ 
+ 
+     /* we will always have a message id */
+     msgid = (char *)SvPV(ST(0),na);
+ 
+     /* set up sensible defaults for the time values */
+     sprintf(tbuff, "%d",time((long *)0));
+     arrivaltime = articletime = expiretime = tbuff;
+ 
+     switch (items) {
+     case 2:
+ 	arrivaltime = (char *)SvPV(ST(1),na);
+ 	articletime = expiretime = arrivaltime;
+ 	break;
+     case 3: 
+ 	arrivaltime = (char *)SvPV(ST(1),na);
+ 	articletime = (char *)SvPV(ST(2),na);
+ 	expiretime = arrivaltime;
+ 	break;
+     case 4:
+ 	arrivaltime = (char *)SvPV(ST(1),na);
+ 	articletime = (char *)SvPV(ST(2),na);
+ 	expiretime =  (char *)SvPV(ST(3),na);
+ 	break;
+     case 5:
+ 	arrivaltime = (char *)SvPV(ST(1),na);
+ 	articletime = (char *)SvPV(ST(2),na);
+ 	expiretime =  (char *)SvPV(ST(3),na);
+ 	articlepaths =  (char *)SvPV(ST(4),na);
+ 	break;
+     }
+     parambuf[0] = msgid;
+     parambuf[1] = arrivaltime;
+     parambuf[2] = articletime;
+     parambuf[3] = expiretime;
+     parambuf[4] = articlepaths;
+     parambuf[5] = 0;
+ 
+     /* CCaddhist returns NULL on success, hence reversed return codes */
+     CCaddhist(parambuf) ? XSRETURN_NO : XSRETURN_YES;
+ }
+ 
+ XS(XS_INN_newsgroup)
+ {
+     dXSARGS;
+     char*	newsgroup;
+     NEWSGROUP*  ngp;
+ 
+     if (items != 1)
+         croak("Usage: INN::newsgroup(msgid)");
+     newsgroup = (char *)SvPV(ST(0),na);
+ 
+     if ((ngp = NGfind(newsgroup)) == NULL)
+ 	XSRETURN_UNDEF;
+     else
+ 	XSRETURN_PV(ngp->Rest);
+ }
+ 
+ void
+ PERLinndAPIinit()
+ {
+     newXS("INN::havehist", XS_INN_havehist, "cc.c");
+     newXS("INN::cancel", XS_INN_cancel, "cc.c");
+     newXS("INN::addhist", XS_INN_addhist, "cc.c");
+     newXS("INN::newsgroup", XS_INN_newsgroup, "cc.c");
+ }
+ #endif
-- 
Regards,
Ed Mooring (mooring@tymnet.com 408-922-7504)

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