Thread View: news.software.nntp
54 messages
54 total messages
Page 1 of 2
Started by John F. Morse
Sat, 07 Mar 2009 17:10
Page 1 of 2 • 54 total messages
Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Sat, 07 Mar 2009 17:10
Date: Sat, 07 Mar 2009 17:10
99 lines
5237 bytes
5237 bytes
The problem I have is inappropriate posting in a Usenet group that I carry.
I only allow binaries in two groups, one is local with authentication
for readers access, and I can easily control it. The troublesome group
is a Usenet group that is fed to me by multiple peers, as well as
pullnews that I run on my cable ISP.
I don't think it is right for me to have to remove the group because of
one person's behavior, therefore I thought Cleanfeed could do the job.
But I can't get it to filter articles posted by this one individual.
I've added this persons "From" name (also displayed as the "Sender"),
and the e-mail domain in the From line, and the domain portion of the
Message-ID, to my cleanfeed.local -- but still the messages keep rolling
in daily.
I'm not even sure that cleanfeed.local is actually working. I can only
guess the filter is working because I get daily reports containing info
like this:
Server status:
Server running
Allowing remote connections
Parameters c 10 i 50 (2) l 1000000 o 1011 t 300 H 2 T 60 X 0 normal
specified
Not reserved
Readers follow enabled
Perl filtering enabled
Perl filter stats: Pass: 157616 Reject: 2723 Refuse: MD5: 61 PHL:
56 FSL: 24
I presume the Perl filter stats are the result of cleanfeed.local.pl and
not just filter.innd alone.
In /etc/news/filter/filter_innd.pl I have:
$config_dir = '/etc/news/filter';
Permissions for these two files are:
john@news:/etc/news/filter$ ls -al
-rw-r--r-- 1 root root 8525 2009-03-05 17:37 cleanfeed.local.pl
-rw-r--r-- 1 root root 53106 2008-06-16 21:07 filter_innd.pl
In cleanfeed.local.pl I have added the new data as a new item at the end
of the existing areas as shown below:
my @badaspnntps = (
'PostIT Now',
'Jobsearch Limited',
'AudioWeb', # audioweb.com
'Alex', # sex spam
'Paul Simmons', # OperationIT.com
'Alan', # equest.com
'Digital Media Works', # html sex spam
'Captive Technology', # ccsscorp.com jobs flood
'Computer Horzions ISG', # isgjobs.com jobs flood
'Mike Powers', # ResumeGateway.com jobs flood
'new_name', # The "From" (or "Sender") name
Further down:
# specific sites or companies ############################################
return reject("Job spam ($1)")
if $hdr{From} =~
/@(ajilon\.ca|ntes\.com|trai\.com|lesliecorp\.com|topechelon\.net|ERecruitingWorld\.com|(?:data\.)?JobBankUSA\.com|resumes\.gojobs\.com|
chemjobs\.net|eurosoft-inc\.com|newlonservices\.com|medzilla\.com|gisajob\.com|geologics\.com|brainhunter\.com|dsijobs\.com|offsitetechies\.com|new_name\.net)\b/
... Continuing:
# I suppose I can't add new domains forever
if (not $hdr{'X-Mailer'} and not $hdr{'X-Newsreader'} and
not $hdr{References} and
$hdr{__BODY__} =~
/www\.(?:pure-instinct\.com|get-some-mojo\.com|magnetizewomen\.com|makeherscream\.net|wantmoresex\.com|lovesenses\.com|
sexfit\.net|enhancelibido\.net|lovesenses\.com|bettersexlife\.com|erect4life\.com|androsfit\.com|smokefreelungs\.com|evidencegone\.com|biggertool\.com|forthepuss\.com|mo
reladies\.com|improve-libido\.com|openthathole\.com|at7x\.com|fuas\.net|dheafit\.com|sexboxoffice\.com|increasemanhood\.com|getsomeass\.com|nicotineaddict\.net|perkupsex
drive\.com|dateseverynight\.com|hot-products\.net|greatproducts\.net|landinbed\.com|getfemales\.net|sexattention\.com|allurefem\.com|smokerusa\.com|improve-libido\.com|y
oungeryears\.com|compelthem\.net|fightimpotency\.com|drawherin\.com|invitelust\.com|youlivelonger\.com|new_name\.net)/)
{
Again, I'm not sure this cleanfeed.local file is even read by Cleanfeed
(or filter_innd.pl).
Any help will be appreciated.
--
John
Re: Can Cleanfeed filter on a specific user?
Author: Ray Banana
Date: Sat, 07 Mar 2009 18:15
Date: Sat, 07 Mar 2009 18:15
53 lines
2822 bytes
2822 bytes
Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
> I'm not even sure that cleanfeed.local is actually working. I can only
> guess the filter is working because I get daily reports containing
> info like this:
> Readers follow enabled
> Perl filtering enabled
> Perl filter stats: Pass: 157616 Reject: 2723 Refuse: MD5: 61 PHL:
> 56 FSL: 24
> I presume the Perl filter stats are the result of cleanfeed.local.pl
> and not just filter.innd alone.
No, they are for cleanfeed with or without cleanfeed.local.
> In /etc/news/filter/filter_innd.pl I have:
> $config_dir = '/etc/news/filter';
> In cleanfeed.local.pl I have added the new data as a new item at the
> end of the existing areas as shown below:
Please check your cleanfeed file for the line
my $local_file = "$config_dir/cleanfeed.local";
and note that cleanfeed will look for a file called
"cleanfeed.local", not "cleanfeed.local.pl".
Also, please take a look at Steve's Cleanfeed documentation at
http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
for subroutines you can define in your cleanfeed.local and when they are
called by cleanfeed.
If you just want to filter articles by the From: header, this might be
as simple as adding a subroutine
sub local_filter_first {
if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
return 'Spam';
}
return '';
}
to your cleanfeed.local.
hth
--
Time flies like an arrow, fruit flies like a Banana.
http://news.motzarella.org
Re: Can Cleanfeed filter on a specific user?
Author: Julien ÉLIE
Date: Sat, 07 Mar 2009 19:39
Date: Sat, 07 Mar 2009 19:39
22 lines
1957 bytes
1957 bytes
Hi Ray,
> Also, please take a look at Steve's Cleanfeed documentation at
>
> http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
>
> for subroutines you can define in your cleanfeed.local and when they are
> called by cleanfeed.
>
> sub local_filter_first {
Amusingly, this function is not documented in that man page for 0.95.7b :)
But it is in Steve's new version:
http://www.mixmin.net/cleanfeed/files.html
A few functions do not exist any longer (like local_filter_before_emp).
--
Julien ÉLIE
« Mon âme a son secret, ma vie a son mystère. » (Félix Arvers)
Re: Can Cleanfeed filter on a specific user?
Author: Ray Banana
Date: Sat, 07 Mar 2009 19:45
Date: Sat, 07 Mar 2009 19:45
17 lines
2010 bytes
2010 bytes
Thus spake Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
>> http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
>> for subroutines you can define in your cleanfeed.local and when they are
>> called by cleanfeed.
>> sub local_filter_first {
> Amusingly, this function is not documented in that man page for 0.95.7b :)
> But it is in Steve's new version:
> http://www.mixmin.net/cleanfeed/files.html
> A few functions do not exist any longer (like local_filter_before_emp).
Thanks for the pointer ;-)
--
Time flies like an arrow, fruit flies like a Banana.
http://news.motzarella.org
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Sun, 08 Mar 2009 13:43
Date: Sun, 08 Mar 2009 13:43
16 lines
1759 bytes
1759 bytes
On Sat, 7 Mar 2009 20:39:46 +0100, Julien ÉLIE wrote in
Message-Id: <gouijv$ctq$1@news.trigofacile.com>:
> A few functions do not exist any longer (like local_filter_before_emp).
That was taken out before my time. The last record I can find of it is
in cleanfeed-0.95.7b from 1998. There was also local_filter_middle.
I took out local_filter_scoring when I changed the scoring method to use
the more descriptive "!" and "*" method. That was intended as a
short-term change whilst I debugged and revised the scoring filters but
various people reported that they liked it so I've not reverted back.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Sun, 08 Mar 2009 18:06
Date: Sun, 08 Mar 2009 18:06
36 lines
2597 bytes
2597 bytes
Julien ÉLIE wrote:
> Hi Ray,
>
>> Also, please take a look at Steve's Cleanfeed documentation at
>>
>> http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
>>
>>
>> for subroutines you can define in your cleanfeed.local and when they are
>> called by cleanfeed.
>>
>> sub local_filter_first {
>
> Amusingly, this function is not documented in that man page for
> 0.95.7b :)
> But it is in Steve's new version:
> http://www.mixmin.net/cleanfeed/files.html
>
> A few functions do not exist any longer (like local_filter_before_emp).
>
Perhaps I'm using the wrong version?
Which is current, 0.95.7b or 20020501?
I think I'd have less trouble if I'd simply delete the older version. At
least there would be less confusion added to confusion. ;-)
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Sun, 08 Mar 2009 19:31
Date: Sun, 08 Mar 2009 19:31
29 lines
2050 bytes
2050 bytes
On Sun, 08 Mar 2009 13:06:30 -0500, John F. Morse wrote in
Message-Id: <gp11f6$jf$1@optima7.xanadu-bbs.net>:
> Perhaps I'm using the wrong version?
>
> Which is current, 0.95.7b or 20020501?
Hi John,
0.95.7b was the last release made by Jeremy Nixon, the creator of
Cleanfeed. I believe it dates from 1998.
20020501 was a beta release made by Marco d'Itri. Despite being beta,
it is still the officially recommended version.
The newest is produced and maintained by me and is based on Marco's
20020501. Details on it can be found here:
http://www.mixmin.net/cleanfeed/
> I think I'd have less trouble if I'd simply delete the older version. At
> least there would be less confusion added to confusion. ;-)
All three are drop in solutions that will function with current INN2
releases although 0.95.7b is probably quite outdated for today's spam.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Sun, 08 Mar 2009 20:26
Date: Sun, 08 Mar 2009 20:26
83 lines
3867 bytes
3867 bytes
Ray Banana wrote:
> Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
>
>
>> I'm not even sure that cleanfeed.local is actually working. I can only
>> guess the filter is working because I get daily reports containing
>> info like this:
>> Readers follow enabled
>> Perl filtering enabled
>> Perl filter stats: Pass: 157616 Reject: 2723 Refuse: MD5: 61 PHL:
>> 56 FSL: 24
>> I presume the Perl filter stats are the result of cleanfeed.local.pl
>> and not just filter.innd alone.
>>
>
> No, they are for cleanfeed with or without cleanfeed.local.
>
>
>> In /etc/news/filter/filter_innd.pl I have:
>> $config_dir = '/etc/news/filter';
>> In cleanfeed.local.pl I have added the new data as a new item at the
>> end of the existing areas as shown below:
>>
>
> Please check your cleanfeed file for the line
>
> my $local_file = "$config_dir/cleanfeed.local";
>
> and note that cleanfeed will look for a file called
> "cleanfeed.local", not "cleanfeed.local.pl".
>
The "my $local_file = "$config_dir/cleanfeed.local";" was present, and
it was another clue after I studied it. ;-)
I removed the ".pl" from cleanfeed.local and it apparently made a
difference according to news.notice which now indicates filter entries
(see the reply to Steve).
All these years fighting this because of that one error. I remember how
confusing it was back then to read docs referring to "cleanfeed" which
was renamed to "filter_innd.pl" but I suppose was necessary to keep it
separate from Highwinds.
> Also, please take a look at Steve's Cleanfeed documentation at
>
> http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
>
> for subroutines you can define in your cleanfeed.local and when they are
> called by cleanfeed.
>
> If you just want to filter articles by the From: header, this might be
> as simple as adding a subroutine
>
> sub local_filter_first {
>
> if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
> return 'Spam';
> }
>
> return '';
>
> }
>
> to your cleanfeed.local.
>
> hth
Thanks, Ray. I'll use this if my other additions to cleanfeed.local
don't work. I'll need to wait until "posting time" to see what happens. ;-)
What does the "return 'Spam'" actually do?
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Sun, 08 Mar 2009 20:30
Date: Sun, 08 Mar 2009 20:30
111 lines
5572 bytes
5572 bytes
Steve wrote:
> On Sun, 08 Mar 2009 13:06:30 -0500, John F. Morse wrote in
> Message-Id: <gp11f6$jf$1@optima7.xanadu-bbs.net>:
>
>> Perhaps I'm using the wrong version?
>>
>> Which is current, 0.95.7b or 20020501?
>>
>
> Hi John,
>
> 0.95.7b was the last release made by Jeremy Nixon, the creator of
> Cleanfeed. I believe it dates from 1998.
>
> 20020501 was a beta release made by Marco d'Itri. Despite being beta,
> it is still the officially recommended version.
>
> The newest is produced and maintained by me and is based on Marco's
> 20020501. Details on it can be found here:
> http://www.mixmin.net/cleanfeed/
>
>> I think I'd have less trouble if I'd simply delete the older version. At
>> least there would be less confusion added to confusion. ;-)
>>
> All three are drop in solutions that will function with current INN2
> releases although 0.95.7b is probably quite outdated for today's spam.
>
OK, thanks for that info Steve. I am using the 20020501 version, so I
guess it should suffice.
I found a few errors in my configuration that Ray mentioned, and have
fixed them.
Specifically the filename cleanfeed.local.pl was renamed to eliminate
the .pl Perl extension.
After "ctlinnd reload all" I noticed new "action" in news.notice
including some errors:
Mar 8 13:23:50 localhost innfeed[823]: ME starting innfeed 2.4.3
(20050407 prerelease) at Sun Mar 8 13:23:50 2009
Mar 8 13:23:50 localhost innfeed[823]: loading /etc/news/innfeed.conf
Mar 8 13:23:52 localhost innd: filter: Cannot open /news/db/active: No
such file or directory
Mar 8 13:23:52 localhost innd: filter: Cannot open
/news/log/cleanfeed.stats: No such file or directory
Mar 8 13:23:52 localhost innd: SERVER reload all jfm
Mar 8 13:23:52 localhost controlchan[821]: starting
There is no home directory for news at the root level on Debian, so I
did some changing to the default pathnames in cleanfeed.local from:
sub local_config {
%config_local = (
block_late_cancels => 1,
active_file => '/news/db/active',
statfile => '/news/log/cleanfeed.stats',
# html_statfile => '/news/log/cleanfeed.stats.html',
stats_interval => 300,
do_emp_dump => 1,
emp_dump_file => '/news/tmp/empdump',
debug_batch_directory => '/news/spam',
);
To:
sub local_config {
%config_local = (
block_late_cancels => 1,
active_file => '/var/lib/news/active',
statfile => '/var/spool/news/cleanfeed.stats',
# html_statfile => '/var/spool/news/cleanfeed.stats.html',
stats_interval => 300,
do_emp_dump => 1,
emp_dump_file => '/tmp/empdump',
debug_batch_directory => '/var/spool/news/spam',
);
I just "guessed" at the proper directories to use, and I think these
would work without problems. Comments?
One oddity I see when I look at the cleanfeed.stats file is where
garbage appears at the end:
bin_allowed:
^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork|^alt\.anonymous\.messages$|^de\.alt\.date
ien|^rec\.games\.bolo$|^comp\.security\.pgp\.test$|^sfnet\.tiedostot|^fido\.|^linux\.|^unidata|^xanadu
\.test|^xanadu\.binaries|^ym~}n^?}o^?^?^?ws}o{oker
I believe this is taken from filter_innd.pl where I had to add the
xanadu.test and xanadu.binaries groups a couple of years ago to get the
server to accept binaries. Jeffery warned me about changing items below
the warning line, but I had no choice then since cleanfeed.local was
being "ignored" due to my stupidity.
Maybe with the cleanfeed.local renamed it will now be working correctly,
and I can remove this edit to filter_innd.pl and let cleanfeed.local do
all of the work.
I do not see those garbage characters when viewing the bin_allowed
stanza via ssh or mounting the remote drive and using gedit with the
Perl filter on this local Ubuntu box. Perhaps it is a bug in
cleanfeed.stats that causes this. Any ideas?
--
John
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Sun, 08 Mar 2009 23:20
Date: Sun, 08 Mar 2009 23:20
40 lines
2679 bytes
2679 bytes
John F. Morse wrote: I've got nothing to say about current versions of cleanfeed (I prefer using Jeremy Nixon's last version) but I'll interject this. > There is no home directory for news at the root level on Debian For THAT reason alone you're far better off compiling INN from source and using as many of it's defaults as possible. My first experience with INN was installed from an RPM on a Red Hat Linux machine. I spent an entire weekend trying to get it to work running into problems such as with file permissions / ownership and files not being in logical places which made the INN documentation I was working from useless. Whoever it was that packaged that particular RPM was a bumbling idiot. Life with INN for me became 100% better once I built and installed it from source. Another advantage to that is it seems the people here who are most knowledgeable about INN appear to expect files in default places when giving advice. IMO, your system should have a news user, a news group, and a home directory for news. The INN default is /usr/local/news. I never ever touch anything in the news home dir or even the news spool without being logged in as the news user, is too easy to mangle ownership and permissions otherwise and INN is finicky about that. I understand the desire to want to use a package management system as I much prefer using ports on FreeBSD, but INN is one of the few programs for which I make an exception and for good reason some of which I described. My $.02 mostly gleaned from reading news.software.nntp for many yeas now. HTH :) -- Black Dragon Why on earth do people buy old bottles of wine when they can get a fresh one for a quarter of the price?
Re: Can Cleanfeed filter on a specific user?
Author: Russ Allbery
Date: Mon, 09 Mar 2009 00:20
Date: Mon, 09 Mar 2009 00:20
23 lines
2310 bytes
2310 bytes
Black Dragon <bd@nomail.invalid> writes:
> John F. Morse wrote:
>> There is no home directory for news at the root level on Debian
> For THAT reason alone you're far better off compiling INN from source
> and using as many of it's defaults as possible.
For whatever it's worth, I'm one of the INN maintainers and I happily use
the Debian package on production systems. We have a production
requirement to follow the FHS, which INN compiled with the default paths
definition does not do.
Hopefully eventually we can add better support to INN's build system to
make it easier to put things in an FHS-compliant place, and in the
meantime Debian puts some things in /usr/lib/news that I'd prefer to have
in my path. But it's minor and it's fairly fast to get used to it.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 01:38
Date: Mon, 09 Mar 2009 01:38
66 lines
4435 bytes
4435 bytes
Black Dragon wrote: > John F. Morse wrote: > > I've got nothing to say about current versions of cleanfeed (I prefer > using Jeremy Nixon's last version) but I'll interject this. > >> There is no home directory for news at the root level on Debian >> > > For THAT reason alone you're far better off compiling INN from source > and using as many of it's defaults as possible. My first experience with > INN was installed from an RPM on a Red Hat Linux machine. I spent an > entire weekend trying to get it to work running into problems such as > with file permissions / ownership and files not being in logical places > which made the INN documentation I was working from useless. Whoever it > was that packaged that particular RPM was a bumbling idiot. Life with INN > for me became 100% better once I built and installed it from source. > Another advantage to that is it seems the people here who are most > knowledgeable about INN appear to expect files in default places when > giving advice. > > IMO, your system should have a news user, a news group, and a home > directory for news. The INN default is /usr/local/news. I never ever > touch anything in the news home dir or even the news spool without > being logged in as the news user, is too easy to mangle ownership and > permissions otherwise and INN is finicky about that. > > I understand the desire to want to use a package management system as I > much prefer using ports on FreeBSD, but INN is one of the few > programs for which I make an exception and for good reason some of > which I described. > > My $.02 mostly gleaned from reading news.software.nntp for many yeas > now. > > HTH :) > The problem is not with Debian, nor INN, but Cleanfeed had hard-coded the file pathnames. Cleanfeed should have dug the correct path information out of /etc/news/inn.conf which is the "parent" application to which it is designed to assist. This is not a new INN install, but a change to one that currently has an uptime of 271 days since I accidentally shut off the power to the wrong computer. ;-) I've been running INN on three computers since 2005, with this one being the one facing the public since 2006. On Debian, news uses /var/spool/news for its home directory. If you compile and didn't use a package manager, then your preferred directory would be /usr/local/news/ so the package manager won't step on it. I think the location in the /var directory is good, because if the directory should fill up, and it is in a separate partition, the system won't crash. Additionally, news' files are dynamic in size and number, which is exactly what the /var directory is designed to accommodate. More info here: http://www.eyrie.org/~eagle/faqs/inn.html#S5.4 -- John
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Mon, 09 Mar 2009 13:13
Date: Mon, 09 Mar 2009 13:13
21 lines
1756 bytes
1756 bytes
John F. Morse wrote: > On Debian, news uses /var/spool/news for its home directory. > I think the location in the /var directory is good, because if the > directory should fill up, and it is in a separate partition, the system > won't crash. Additionally, news' files are dynamic in size and number, > which is exactly what the /var directory is designed to accommodate. I disagree. Program binaries and scripts, configuration files, and documentation aren't things that belong in var since once set up the typicaly don't change. I keep those in /usr/local/news and put the news spool (history / overview / articles, etc) in /var. However, to each his own, YMMV. :) -- Black Dragon Legalize free-enterprise murder: why should governments have all the fun?
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Mon, 09 Mar 2009 13:27
Date: Mon, 09 Mar 2009 13:27
31 lines
2277 bytes
2277 bytes
Russ Allbery wrote: > Black Dragon <bd@nomail.invalid> writes: >> John F. Morse wrote: >>> There is no home directory for news at the root level on Debian >> For THAT reason alone you're far better off compiling INN from source >> and using as many of it's defaults as possible. > For whatever it's worth, I'm one of the INN maintainers and I happily use > the Debian package on production systems. We have a production > requirement to follow the FHS, which INN compiled with the default paths > definition does not do. > Hopefully eventually we can add better support to INN's build system to > make it easier to put things in an FHS-compliant place, and in the > meantime Debian puts some things in /usr/lib/news that I'd prefer to have > in my path. But it's minor and it's fairly fast to get used to it. Thanks for that. I never heard of FHS compliance until now. After a real brief look can't say I agree with all of it. I went from Linux to BSD in the early 2000's and have recently been meddling with Linux on occasion once again. It appears there has been some improvement over the years. At least with a few long standing Linux distributions anyway. -- Black Dragon Legalize free-enterprise murder: why should governments have all the fun?
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 15:16
Date: Mon, 09 Mar 2009 15:16
32 lines
2615 bytes
2615 bytes
Black Dragon wrote: > John F. Morse wrote: > > >> On Debian, news uses /var/spool/news for its home directory. >> > > >> I think the location in the /var directory is good, because if the >> directory should fill up, and it is in a separate partition, the system >> won't crash. Additionally, news' files are dynamic in size and number, >> which is exactly what the /var directory is designed to accommodate. >> > > I disagree. Program binaries and scripts, configuration files, and > documentation aren't things that belong in var since once set up the > typicaly don't change. I keep those in /usr/local/news and put the news > spool (history / overview / articles, etc) in /var. > > However, to each his own, YMMV. :) > And you also have the mentality of a single-computer user, eh? -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 15:39
Date: Mon, 09 Mar 2009 15:39
75 lines
4677 bytes
4677 bytes
Black Dragon wrote: > Russ Allbery wrote: > > >> Black Dragon <bd@nomail.invalid> writes: >> >>> John F. Morse wrote: >>> > > >>>> There is no home directory for news at the root level on Debian >>>> > > >>> For THAT reason alone you're far better off compiling INN from source >>> and using as many of it's defaults as possible. >>> > > >> For whatever it's worth, I'm one of the INN maintainers and I happily use >> the Debian package on production systems. We have a production >> requirement to follow the FHS, which INN compiled with the default paths >> definition does not do. >> > > >> Hopefully eventually we can add better support to INN's build system to >> make it easier to put things in an FHS-compliant place, and in the >> meantime Debian puts some things in /usr/lib/news that I'd prefer to have >> in my path. But it's minor and it's fairly fast to get used to it. >> > > Thanks for that. I never heard of FHS compliance until now. After a real > brief look can't say I agree with all of it. I went from Linux to BSD in > the early 2000's and have recently been meddling with Linux on occasion > once again. It appears there has been some improvement over the years. > At least with a few long standing Linux distributions anyway. > There are a lot more Linux users than FreeBSD users, or all BSDs together. Even throw in the "real" Unix users.... With that in mind, I would guess they must all believe Linux is an improvement over BSD. I also believe it's not because a Linux distro is "easier" than using BSD, since I also use FreeBSD, FreeSBIE, NetBSD and OpenBSD, and I find them no more difficult than any Linux distro, and not much different. I can't speak for the masses though. You seem to be blowing a lot of steam about what is wrong with Linux, while admitting you are not a current user, and therefore may not have a clue about what you speak. At least it appears that way after your admissions of never hearing, real brief looks, meddling on occasion, .... You are certainly free to disagree though, but may I suggest you at least try it first, then jump onto any conclusions you may form? Your time will be better spent on self-education than writing questionable material in this group, and you will improve your own understanding of FHS, GoboLinux, OS-X, etc. I won't stay involved in this thread beyond this message. I have no desire to participate in "advocacy" arguments where usually the apparently unknowing try to impress others, while displaying their faults and shortcomings at the same time. Please take the above as advice and not condemnation. I am not a Net Cop, and have no official position in this group or any group. It's just my opinion, and actually humbler than it may sound. -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Mon, 09 Mar 2009 16:06
Date: Mon, 09 Mar 2009 16:06
37 lines
2073 bytes
2073 bytes
John F. Morse wrote: > Black Dragon wrote: >> John F. Morse wrote: >>> On Debian, news uses /var/spool/news for its home directory. >>> I think the location in the /var directory is good, because if the >>> directory should fill up, and it is in a separate partition, the system >>> won't crash. Additionally, news' files are dynamic in size and number, >>> which is exactly what the /var directory is designed to accommodate. >> I disagree. Program binaries and scripts, configuration files, and >> documentation aren't things that belong in var since once set up the >> typicaly don't change. I keep those in /usr/local/news and put the news >> spool (history / overview / articles, etc) in /var. >> However, to each his own, YMMV. :) > And you also have the mentality of a single-computer user, eh? On a server? Not at all. -- Black Dragon There once was a lifeguard named Lee Who rescued a girl from the sea She asked how to pay, And he said "Try this way, Go down for the third time on me."
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Mon, 09 Mar 2009 16:08
Date: Mon, 09 Mar 2009 16:08
16 lines
1384 bytes
1384 bytes
John F. Morse wrote: > You seem to be blowing a lot of steam about what is wrong with Linux, You're getting overly defensive over nothing. Goodbye. -- Black Dragon There once was a lifeguard named Lee Who rescued a girl from the sea She asked how to pay, And he said "Try this way, Go down for the third time on me."
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 16:15
Date: Mon, 09 Mar 2009 16:15
98 lines
4507 bytes
4507 bytes
Ray Banana wrote:
> If you just want to filter articles by the From: header, this might be
> as simple as adding a subroutine
>
> sub local_filter_first {
>
> if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
> return 'Spam';
> }
>
> return '';
>
> }
>
> to your cleanfeed.local.
>
> hth
I was hoping too, Ray, but the articles are getting past it.
Here is what I have added to the bottom of the sub local_filter_first
(the "from_name_here" is the actual name in the header From entry):
sub local_filter_first {
my $localpost = 0;
$localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~
/\.inwind\.it /;
study $hdr{__BODY__} if $hdr{__LINES__} <= 250;
# local posts
############################################################
if ($localpost) {
if ($hdr{Approved}) {
foreach (@groups) {
if (not /^(?:alt|wind|inwind)\./) {
saveart('CF.approved');
return reject("Forged approval
in $_ ($hdr{Approved})");
}
}
}
# if ($hdr{Subject} =~ /^R: /) { saveart('L.r'); }
return reject('Non usare HTML in Usenet!')
if $hdr{'Content-Type'} and
($hdr{'Content-Type'} =~ m#text/html#
or $hdr{'Content-Type'} =~
m#multipart/alternative#);
if ( $hdr{'From'} =~ /$from_name_here/ ) {
return 'Spam';
}
return '';
}
##########################################################################
I am not a Perl programmer, so I probably have something broken above,
or I placed your suggested addition in the wrong place. Maybe you can
spot a goof in syntax?
All I can see that is different from the original stanzas above the
addition, is you added extra spaces at the parentheses. I don't know if
this would cause a problem or not.
Then I see the conditional immediately above the added one appears to
have an "if" without any "then" or "else" (a "do-nothing" check?). I
wonder what happens if either "if" is met? Does it put the added "From"
text into its conditional check? That might be why the new text is skipped.
And there is one line which is commented out. Maybe it causes all of the
remainder to be ignored?
Finally, I see references to "localpost" which is not what my problem
is, since I'm concerned by articles arriving from peers.
What "local" means is a mystery to me since innd handles everything, and
innd is where Cleanfeed hooks up. IOW, I'd think filter_nnrpd.pl would
be the place for "localpost" configuration to stop trouble at the front
door before filter_innd.pl even sees the local-posted messages.
Misunderstanding of terminology I suspect. ;-)
I don't know if any of these are problems, or if I should simply remove
these "factory" examples.
Seems there was a routine to check Perl script syntax, but I can't find it.
--
John
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Mon, 09 Mar 2009 16:40
Date: Mon, 09 Mar 2009 16:40
39 lines
2479 bytes
2479 bytes
On Mon, 09 Mar 2009 11:15:41 -0500, John F. Morse wrote in
Message-Id: <gp3fbd$k29$1@optima7.xanadu-bbs.net>:
> Here is what I have added to the bottom of the sub local_filter_first
> (the "from_name_here" is the actual name in the header From entry):
[snip]
Hi John,
It looks like you're using the example cleanfeed.local supplied with
cleanfeed-20020501. I'd suggest you use this for examples rather than
going live with it. It contains various sections that are specific to
the environment it was created on. For example:
$localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~ /\.inwind\.it /;
This will only work if your domain is inwind.it, so anything that sits
within the "if localpost" conditional will not work.
I'd suggest keeping that file as a reference and creating your own from
scratch. All you want at the moment in local_filter_first is:
sub local_filter_first {
if ($hdr{'From'} =~ /$from_name_here/) {
return reject('Spam');
};
I'd further suggest:
* Delete all the other local_filter sections and create them as needed.
* Keep local_config for defining things specific to your environment.
* Use local_filter_reject to log what you're filtering.
* Keep the few lines at the bottom that reside outside any functions,
they're important.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 17:27
Date: Mon, 09 Mar 2009 17:27
187 lines
8439 bytes
8439 bytes
Steve wrote:
> On Mon, 09 Mar 2009 11:15:41 -0500, John F. Morse wrote in
> Message-Id: <gp3fbd$k29$1@optima7.xanadu-bbs.net>:
>
>> Here is what I have added to the bottom of the sub local_filter_first
>> (the "from_name_here" is the actual name in the header From entry):
>>
>
> [snip]
>
> Hi John,
>
> It looks like you're using the example cleanfeed.local supplied with
> cleanfeed-20020501. I'd suggest you use this for examples rather than
> going live with it. It contains various sections that are specific to
> the environment it was created on. For example:
>
> $localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~ /\.inwind\.it /;
>
> This will only work if your domain is inwind.it, so anything that sits
> within the "if localpost" conditional will not work.
>
> I'd suggest keeping that file as a reference and creating your own from
> scratch. All you want at the moment in local_filter_first is:
>
> sub local_filter_first {
> if ($hdr{'From'} =~ /$from_name_here/) {
> return reject('Spam');
> };
>
> I'd further suggest:
> * Delete all the other local_filter sections and create them as needed.
> * Keep local_config for defining things specific to your environment.
> * Use local_filter_reject to log what you're filtering.
> * Keep the few lines at the bottom that reside outside any functions,
> they're important.
>
Thanks for the fast reply, Steve.
Have made your suggested edits, but am now receiving an error message in
news.notice :
Mar 9 11:58:08 localhost innd: filter: Cannot load
/etc/news/filter/cleanfeed.local: Missing right curly or square bracket
at (eval 7) line 90, at end of line syntax error at (eval 7) line 90, at
EOF
This is odd because there are only 88 lines in the cleanfeed.local file
(see complete file below).
I do see an unbalance in the curly brackets in the sub
local_filter_first section. Should it be like this? :
sub local_filter_first {
if ($hdr{'From'} =~ /$from_name_here/) {
return reject('Spam');
} <==Added?
};
Here is how I "butchered" the example cleanfeed.local file:
1 # vim: set syntax=perl ts=4 ai si:
2
3 ######################### IMPORTANT! - READ CAREFULLY
########################
4 # This file contains some parts of my own cleafeed.local.
5 # Many of these checks are too much content based than what I feel
6 # confortable to put in the official source and others are just
7 # experimental or need site-specific tweaks.
8 # Before using any of this code please *think*, and be sure you
really
9 # understand what it does.
10 ######################### IMPORTANT! - READ CAREFULLY
########################
11
12 my @badaspnntps = (
13 'PostIT Now',
14 'Jobsearch Limited',
15 'AudioWeb', #
audioweb.com
16 'Alex', # sex spam
17 'Paul Simmons', # OperationIT.com
18 'Alan', # equest.com
19 'Digital Media Works', # html sex spam
20 'Captive Technology', # ccsscorp.com jobs flood
21 'Computer Horzions ISG', # isgjobs.com jobs flood
22 'Mike Powers', #
ResumeGateway.com jobs flood
23 'from_name_here',
24 );
25
26 my %badaspnntp = map { $_ => 1 } @badaspnntps;
27 undef @badaspnntps;
28
29 sub local_filter_first {
30 if ($hdr{'From'} =~ /$from_name_here/) {
31 return reject('Spam');
32 };
33
34
35 sub local_filter_reject {
36 my ($vr, $sr) = @_;
37
38 saveart('CF.local', $vr)
39 if $hdr{'X-Trace'} and
$hdr{'X-Trace'} =~ /\.inwind\.it /;
40 saveart('WARN.it', $vr)
41 if $vr =~ /^NewsAgent/ and $hdr{Newsgroups}
=~ /\bit\./;
42 saveart('W.supersedes') if $vr =~ /^Excessive
Supersedes/;
43 # saveart('CF.scoring', $vr) if $vr =~ /^Scoring filter/;
44 saveart('CF.NewsAgent', $vr) if $vr =~ /^NewsAgent/;
45 saveart('CF.SEX', $vr) if $vr =~ /^Sex spam/ and
$lines < 300;
46 saveart('Z.EMP', $vr) if $vr =~ /^EMP/;
47 saveart('R.nanacancel') if $vr eq 'Cancel in
forbidden group';
48
49 return @_;
50 }
51
52
53 sub local_config {
54 %config_local = (
55 block_late_cancels => 1,
56 active_file => '/var/lib/news/active',
57 statfile => '/var/spool/news/cleanfeed.stats',
58 # html_statfile =>
'/var/spool/news/cleanfeed.stats.html',
59 stats_interval => 300,
60 do_emp_dump => 1,
61 emp_dump_file => '/tmp/empdump',
62 debug_batch_directory => '/var/spool/news/spam',
63 );
64
65 %config_append = (
66 bin_allowed =>
'^alt\.mag\.'|'^alt\.binaries\.joker'|'^xanadu\.binaries'|'^xanadu\.brisbee'|'
66 ^xanadu\.test',
67 );
68
69 $Restricted_Groups{netscape} = '^netscape\.';
70
71 $config{reject_suspect_cancels} = 0;
72 $config{watch_cancels} = 0;
73 if ($config{watch_cancels}) {
74 eval { require AnyDBM_File; import AnyDBM_File;
75 require Fcntl; import Fcntl; };
# XXX ugly
76 if ($@) {
77 $config{watch_cancels} = undef;
78 slog('E', 'Cannot load AnyDBM_File: ' . $@);
79 }
80 tie %LocalPosts, 'AnyDBM_File', "$config_dir/posts",
81 &Fcntl::O_CREAT|&Fcntl::O_RDWR, 0666
82 or slog('E', 'Cannot load AnyDBM_File: '
. $!);
83 }
84 }
85
86 print
$now.$config_dir.$lines.%Restricted_Groups.%Moderated.%config_local.%config_append.@followups
if 0; # l
86 int food
87
88 1;
Does that resemble what you suggested?
Note I also had an addition on line 23 from earlier, which didn't seem
to work. I probably should remove it. Maybe remove everything from line
2 through line 28?
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 17:54
Date: Mon, 09 Mar 2009 17:54
183 lines
9652 bytes
9652 bytes
John F. Morse wrote:
> Steve wrote:
>> On Mon, 09 Mar 2009 11:15:41 -0500, John F. Morse wrote in
>> Message-Id: <gp3fbd$k29$1@optima7.xanadu-bbs.net>:
>>
>>> Here is what I have added to the bottom of the sub
>>> local_filter_first (the "from_name_here" is the actual name in the
>>> header From entry):
>>>
>>
>> [snip]
>>
>> Hi John,
>>
>> It looks like you're using the example cleanfeed.local supplied with
>> cleanfeed-20020501. I'd suggest you use this for examples rather than
>> going live with it. It contains various sections that are specific to
>> the environment it was created on. For example:
>>
>> $localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~
>> /\.inwind\.it /;
>>
>> This will only work if your domain is inwind.it, so anything that sits
>> within the "if localpost" conditional will not work.
>>
>> I'd suggest keeping that file as a reference and creating your own from
>> scratch. All you want at the moment in local_filter_first is:
>>
>> sub local_filter_first {
>> if ($hdr{'From'} =~ /$from_name_here/) {
>> return reject('Spam'); };
>>
>> I'd further suggest:
>> * Delete all the other local_filter sections and create them as needed.
>> * Keep local_config for defining things specific to your environment.
>> * Use local_filter_reject to log what you're filtering.
>> * Keep the few lines at the bottom that reside outside any functions,
>> they're important.
>>
>
>
> Thanks for the fast reply, Steve.
>
> Have made your suggested edits, but am now receiving an error message
> in news.notice :
>
> Mar 9 11:58:08 localhost innd: filter: Cannot load
> /etc/news/filter/cleanfeed.local: Missing right curly or square
> bracket at (eval 7) line 90, at end of line syntax error at (eval 7)
> line 90, at EOF
>
> This is odd because there are only 88 lines in the cleanfeed.local
> file (see complete file below).
>
> I do see an unbalance in the curly brackets in the sub
> local_filter_first section. Should it be like this? :
>
> sub local_filter_first {
> if ($hdr{'From'} =~ /$from_name_here/) {
> return reject('Spam');
> } <==Added
> };
>
Steve,
The above is how I edited the file to test if that was the cause of the
news.notice error, and it apparently was. I didn't see any error message
in news.notice:
Mar 9 12:28:31 localhost innfeed[21804]: loading /etc/news/innfeed.conf
Mar 9 12:28:31 localhost innd: filter: Cannot load
/etc/news/filter/cleanfeed.local: Missing right curly or square bracket
at (eval 8) line 90, at end of line syntax error at (eval 8) line 90, at
EOF
Mar 9 12:28:31 localhost innd: SERVER reload all jfm
Mar 9 12:28:31 localhost innd: controlchan! exit 0 elapsed 1825 pid 21221
Mar 9 12:28:32 localhost controlchan[21803]: starting
...
Mar 9 12:29:31 localhost innfeed[21950]: loading /etc/news/innfeed.conf
Mar 9 12:29:32 localhost innd: SERVER reload all jfm
Mar 9 12:29:32 localhost controlchan[21949]: starting
However, now EVERY article is being rejected as SPAM, including my own
locally-posted test post shown at the end of the following:
Mar 9 12:29:57 localhost innd: rejecting[perl]
<gp3jmk$lld$2@news.motzarella.org> 437 Spam
Mar 9 12:30:15 localhost innd: rejecting[perl]
<20090309172504.F12824832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:38 localhost innd: rejecting[perl] <gp3jn5$6tp$1@online.de>
437 Spam
Mar 9 12:30:39 localhost innd: rejecting[perl]
<20090309172517.445104832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<20090309172538.CA1464832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<20090309172629.BB75C4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<262076e7-c5a4-4e7c-aa3f-47b4682a45f4@q1g2000vbn.googlegroups.com> 437 Spam
Mar 9 12:30:41 localhost innd: rejecting[perl]
<20090309172621.AED444832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:41 localhost innd: rejecting[perl]
<20090309172638.715264832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:43 localhost innd: rejecting[perl]
<20090309172958.DCD4BBCDF@ip-64-139-1-69.sjc.megapath.net> 437 Spam
Mar 9 12:30:47 localhost innd: rejecting[perl]
<20090309172648.7908A4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:47 localhost innd: rejecting[perl]
<20090309172453.011204832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:48 localhost innd: rejecting[perl]
<71l21lFl6bupU1@mid.individual.net> 437 Spam
Mar 9 12:30:50 localhost innd: rejecting[perl]
<20090309172551.B3E5B4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:51 localhost innd: rejecting[perl]
<20090309172601.281BC4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:51 localhost innd: rejecting[perl]
<20090309172609.F26EA4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:53 localhost innd: rejecting[perl]
<mailman.1540.1236619830.11746.python-list@python.org> 437 Spam
Mar 9 12:31:26 localhost innd: rejecting[perl]
<gp3jpc$mot$1@news.motzarella.org> 437 Spam
Mar 9 12:31:42 localhost innd: rejecting[perl]
<gp3jps$op0$1@news.motzarella.org> 437 Spam
Mar 9 12:32:00 localhost innd: rejecting[perl]
<x7mybuiovk.fsf@mail.sysarch.com> 437 Spam
Mar 9 12:32:01 localhost innd: rejecting[perl]
<4832b2cc-2d36-49ad-990c-a7e833e6936b@o11g2000yql.googlegroups.com> 437 Spam
Mar 9 12:32:02 localhost innd: rejecting[perl]
<Fictl.13557$8_3.418@flpi147.ffdc.sbc.com> 437 Spam
Mar 9 12:32:45 localhost innd: rejecting[perl]
<gp3jrs$lld$3@news.motzarella.org> 437 Spam
Mar 9 12:34:16 localhost innd: rejecting[perl]
<tph-D9A2BA.11341309032009@localhost> 437 Spam
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org:0
periodic close
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org:0 final
seconds 315 offered 0 accepted 0 refused 0 rejected 0 accsize 0 rejsize 0
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org final
seconds 315 offered 0 accepted 0 refused 0 rejected 0 missing 0 accsize
0 rejsize 0 spooled 0 on_close 0 unspooled 0 deferred 0/0.0 requeued 0
queue 0.0/200:100,0,0,0,0,0
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu connected 31
streaming allowed
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu:31 NCmode "mode
stream" received
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu:21 closed seconds
1200 accepted 0 refused 1 rejected 0 duplicate 0 accepted size 0
duplicate size 0
Mar 9 12:35:06 localhost innd: rejecting[perl]
<WeydnRxdu5_YzijUnZ2dnUVZ_qHinZ2d@supernews.com> 437 Spam
Mar 9 12:35:10 localhost innd: rejecting[perl]
<f80a9809b3ce0c677d82c0513929815b@pseudo.borked.net> 437 Spam
Mar 9 12:35:10 localhost innd: rejecting[perl]
<3c70301d-93b2-46f3-965f-bf1f3d090ddb@l37g2000vba.googlegroups.com> 437 Spam
Mar 9 12:35:48 localhost innd: rejecting[perl]
<20090309173538.CB6A037F1@mta-fe.casema.nl> 437 Spam
Mar 9 12:36:07 localhost innd: rejecting[perl]
<gp3k25$2rs4$1@sf1.isc.org> 437 Spam
Mar 9 12:36:10 localhost nnrpd[21957]: SERVER perl filtering enabled
Mar 9 12:36:10 localhost innd: localhost connected 21
Mar 9 12:36:10 localhost innd: rejecting[perl]
<gp3k2a$le5$1@news.my.net> 437 Spam
Mar 9 12:36:10 localhost innd: localhost:21 closed seconds 0 accepted 0
refused 0 rejected 1 duplicate 0 accepted size 0 duplicate size 0
Mar 9 12:36:10 localhost nnrpd[21957]: noc.my.net post failed 437 Spam
I had to shut off the filter ("ctlinnd perl n") until this can be resolved.
Actually, I will go back to cleanfeed.local and remove the curly-bracket
to "break" cleanfeed.local, then restart the Perl filter to stop all of
the other garbage.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Russ Allbery
Date: Mon, 09 Mar 2009 18:34
Date: Mon, 09 Mar 2009 18:34
16 lines
1983 bytes
1983 bytes
Black Dragon <bd@nomail.invalid> writes:
> Thanks for that. I never heard of FHS compliance until now. After a real
> brief look can't say I agree with all of it.
No one agrees with all of it, but file layout is exactly one of those
places where it matters more to have a standard than what the standard
is. What you gain is consistency across every server and every
application. You get used to just about any consistency as long as it's
consistent.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Can Cleanfeed filter on a specific user?
Author: Son of Serpent Esq
Date: Mon, 09 Mar 2009 19:42
Date: Mon, 09 Mar 2009 19:42
21 lines
1715 bytes
1715 bytes
John F. Morse wrote:
>> I do see an unbalance in the curly brackets in the sub
>> local_filter_first section. Should it be like this? :
>>
>> sub local_filter_first {
>> if ($hdr{'From'} =~ /$from_name_here/) {
>> return reject('Spam');
>> } <==Added
>> };
That sure looks like it should work to me. Try something like:
sub local_filter_first {
if ($hdr{'From'} =~ /John_F\..Morse/i) {
return reject('Spam');
}; # <==Added
};
And then add the underscore between your first and middle initial
and see if it rejects a post from John_F. Morse.
Re: Can Cleanfeed filter on a specific user?
Author: Frank Slootweg
Date: Mon, 09 Mar 2009 20:48
Date: Mon, 09 Mar 2009 20:48
30 lines
2516 bytes
2516 bytes
John F. Morse <xanadu.bbs@example.invalid> wrote: > Black Dragon wrote: > > John F. Morse wrote: > > > >> On Debian, news uses /var/spool/news for its home directory. > > > >> I think the location in the /var directory is good, because if the > >> directory should fill up, and it is in a separate partition, the system > >> won't crash. Additionally, news' files are dynamic in size and number, > >> which is exactly what the /var directory is designed to accommodate. > > > > I disagree. Program binaries and scripts, configuration files, and > > documentation aren't things that belong in var since once set up the > > typicaly don't change. I keep those in /usr/local/news and put the news > > spool (history / overview / articles, etc) in /var. > > > > However, to each his own, YMMV. :) > > And you also have the mentality of a single-computer user, eh? Can you say "PKB"? Exactly which part of "typicaly don't change" (in size), or "var" or "spool" didn't you understand? That you (apparently) think that non-standard is a good idea, is not a very convincing argument. [N.B. There nothing wrong with /var/spool/news being news' *home* directory, but that's not what's being 'discussed'.]
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 21:16
Date: Mon, 09 Mar 2009 21:16
35 lines
2470 bytes
2470 bytes
Son of Serpent Esq wrote:
> John F. Morse wrote:
>
>>> I do see an unbalance in the curly brackets in the sub
>>> local_filter_first section. Should it be like this? :
>>>
>>> sub local_filter_first {
>>> if ($hdr{'From'} =~ /$from_name_here/) {
>>> return reject('Spam');
>>> } <==Added
>>> };
>>>
>
> That sure looks like it should work to me. Try something like:
>
> sub local_filter_first {
> if ($hdr{'From'} =~ /John_F\..Morse/i) {
> return reject('Spam');
> }; # <==Added
> };
>
> And then add the underscore between your first and middle initial
> and see if it rejects a post from John_F. Morse.
>
The present problem is it is rejecting every post. ;-)
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Son of Serpent Esq
Date: Mon, 09 Mar 2009 21:28
Date: Mon, 09 Mar 2009 21:28
31 lines
2164 bytes
2164 bytes
John F. Morse wrote:
> Son of Serpent Esq wrote:
>> John F. Morse wrote:
>>
>>>> I do see an unbalance in the curly brackets in the sub
>>>> local_filter_first section. Should it be like this? :
>>>>
>>>> sub local_filter_first {
>>>> if ($hdr{'From'} =~ /$from_name_here/) {
>>>> return reject('Spam');
>>>> } <==Added
>>>> };
>>>>
>>
>> That sure looks like it should work to me. Try something like:
>>
>> sub local_filter_first {
>> if ($hdr{'From'} =~ /John_F\..Morse/i) {
>> return reject('Spam');
>> }; # <==Added
>> };
>>
>> And then add the underscore between your first and middle initial
>> and see if it rejects a post from John_F. Morse.
>
> The present problem is it is rejecting every post. ;-)
And why is that a problem? ;)
Well, I know just enough about perl to be dangerous. We need Steve
or Russ to look at this stuff.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Mon, 09 Mar 2009 22:51
Date: Mon, 09 Mar 2009 22:51
54 lines
3084 bytes
3084 bytes
Son of Serpent Esq wrote:
> John F. Morse wrote:
>
>> Son of Serpent Esq wrote:
>>
>>> John F. Morse wrote:
>>>
>>>
>>>>> I do see an unbalance in the curly brackets in the sub
>>>>> local_filter_first section. Should it be like this? :
>>>>>
>>>>> sub local_filter_first {
>>>>> if ($hdr{'From'} =~ /$from_name_here/) {
>>>>> return reject('Spam');
>>>>> } <==Added
>>>>> };
>>>>>
>>>>>
>>> That sure looks like it should work to me. Try something like:
>>>
>>> sub local_filter_first {
>>> if ($hdr{'From'} =~ /John_F\..Morse/i) {
>>> return reject('Spam');
>>> }; # <==Added
>>> };
>>>
>>> And then add the underscore between your first and middle initial
>>> and see if it rejects a post from John_F. Morse.
>>>
>> The present problem is it is rejecting every post. ;-)
>>
>
> And why is that a problem? ;)
>
> Well, I know just enough about perl to be dangerous. We need Steve
> or Russ to look at this stuff.
>
Yes, and I hope they can find a solution soon.
I could probably do a cram course on Perl, but I'm about to have supper,
and after that it will be dreamsville for this old body.
At least I'm back to where I was earlier, with Cleanfeed running without
the local file.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Jeffrey M. Vinocur
Date: Tue, 10 Mar 2009 02:03
Date: Tue, 10 Mar 2009 02:03
30 lines
1704 bytes
1704 bytes
In article <gp3fbd$k29$1@optima7.xanadu-bbs.net>,
John F. Morse <dont.bother> wrote:
>Ray Banana wrote:
>>
>> if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
>
> if ( $hdr{'From'} =~ /$from_name_here/ ) {
I think both of you know this, but...that dollar sign doesn't
belong there, unless you've got a variable defined somewhere
else.
Good:
if ( $hdr{'From'} =~ /aol\.com/ ) {
Perhaps better:
my $badpeople = 'aol\.com';
if ( $hdr{'From'} =~ /$badpeople/o ) {
Very broken:
if ( $hdr{'From'} =~ /$aol\.com/ ) {
--
Jeffrey M. Vinocur
jeff@litech.org
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 02:37
Date: Tue, 10 Mar 2009 02:37
53 lines
2950 bytes
2950 bytes
Jeffrey M. Vinocur wrote:
> In article <gp3fbd$k29$1@optima7.xanadu-bbs.net>,
> John F. Morse <dont.bother> wrote:
>
>> Ray Banana wrote:
>>
>>> if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
>>>
>> if ( $hdr{'From'} =~ /$from_name_here/ ) {
>>
>
> I think both of you know this, but...that dollar sign doesn't
> belong there, unless you've got a variable defined somewhere
> else.
>
> Good:
>
> if ( $hdr{'From'} =~ /aol\.com/ ) {
>
> Perhaps better:
>
> my $badpeople = 'aol\.com';
> if ( $hdr{'From'} =~ /$badpeople/o ) {
>
> Very broken:
>
> if ( $hdr{'From'} =~ /$aol\.com/ ) {
>
I was just reading http://perldoc.perl.org/perlintro.html and couldn't
see why the $ was used since this is not a variable.
Thanks for confirming this, Jeff.
I'm going to remove the $ tomorrow and have another run with
cleanfeed.local to see if it will work without rejecting every article
as spam.
Can your my $badpeople = 'aol\.com'; be added to in the future with the
alternation metacharacter '|' ? Such as:
my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife';
and so forth?
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 03:04
Date: Tue, 10 Mar 2009 03:04
48 lines
3271 bytes
3271 bytes
Steve wrote: > Hi John, > > 0.95.7b was the last release made by Jeremy Nixon, the creator of > Cleanfeed. I believe it dates from 1998. > > 20020501 was a beta release made by Marco d'Itri. Despite being beta, > it is still the officially recommended version. > > The newest is produced and maintained by me and is based on Marco's > 20020501. Details on it can be found here: > http://www.mixmin.net/cleanfeed/ > Is http://www.mixmin.net/cleanfeed/install.html your site? If so, here is a small error: # Move the cleanfeed file to INN's filter directory. The location of this is defined in inn.conf, (look for the pathfilter option). By default this is /usr/local/news/bin/filter. Rename the cleanfeed file to filter_innd.pl. This will overwrite the example filter file supplied with INN so you might want to take a copy of it first. cd /usr/local/news/bin/filter mv filter_innd.pl filter_innd.pl.old mv /usr/local/news/cleanfeed/cleanfeed filter_innd.pl # Open the filter_innd.pl file with your preferred text editor and check the $config_dir variable is pointing to the correct location of the cleanfeed.local file. If it isn't, correct it and resave the file. # Validate the syntax of cleanfeed and cleanfeed.local: perl -wc /usr/local/news/bin/filter/cleanfeed perl -wc /usr/local/news/cleanfeed/etc/cleanfeed.local In the third bulleted block above, the word "cleanfeed" should be "filter_innd.pl" and in the line below it "perl -wc /usr/local/news/bin/filter/cleanfeed" should be "perl -wc /usr/local/news/bin/filter/filter_innd.pl" since the file was previously renamed. ;-) -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Julien ÉLIE
Date: Tue, 10 Mar 2009 06:59
Date: Tue, 10 Mar 2009 06:59
27 lines
2652 bytes
2652 bytes
Hi John, > mv /usr/local/news/cleanfeed/cleanfeed filter_innd.pl > > In the third bulleted block above, the word "cleanfeed" should be "filter_innd.pl" and in the line below it "perl -wc > /usr/local/news/bin/filter/cleanfeed" should be "perl -wc /usr/local/news/bin/filter/filter_innd.pl" since the file was previously > renamed. ;-) I for one create a symbolic link between cleanfeed and filter_innd.pl in order to better see where cleanfeed is: -rw-r--r-- 1 news news 414 2006-07-31 16:29 bad_adult_paths -rw-r--r-- 1 news news 731 2009-03-04 08:10 bad_body -rw-r--r-- 1 news news 416 2007-04-26 12:00 bad_cancel_paths -rw-r--r-- 1 news news 261 2009-03-04 08:10 bad_groups -rw-r--r-- 1 news news 941 2007-04-16 21:14 bad_hosts -rw-r--r-- 1 news news 991 2009-03-10 03:50 bad_hosts_central -rw-r--r-- 1 news news 1,2K 2007-04-26 12:00 bad_paths -rwxr--r-- 1 news news 73K 2009-03-04 08:13 cleanfeed* -rw-r--r-- 1 news news 8,6K 2009-01-11 15:06 cleanfeed.local -lrwxrwxrwx 1 news news 9 2007-04-26 12:03 filter_innd.pl -> cleanfeed* -- Julien ÉLIE « Tant qu'il y a des marmites, il y a de l'espoir ! » (Astérix)
Re: Can Cleanfeed filter on a specific user?
Author: Julien ÉLIE
Date: Tue, 10 Mar 2009 07:03
Date: Tue, 10 Mar 2009 07:03
13 lines
1817 bytes
1817 bytes
Hi John,
>>> if ( $hdr{'From'} =~ /$from_name_here/ ) {
>
> I was just reading http://perldoc.perl.org/perlintro.html and couldn't see why the $ was used since this is not a variable.
In which *regular expression pattern* do you see that on that page?
--
Julien ÉLIE
« Tant qu'il y a des marmites, il y a de l'espoir ! » (Astérix)
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Tue, 10 Mar 2009 09:34
Date: Tue, 10 Mar 2009 09:34
18 lines
1801 bytes
1801 bytes
On Mon, 09 Mar 2009 12:54:07 -0500, John F. Morse wrote in
Message-Id: <gp3l3v$lob$1@optima7.xanadu-bbs.net>:
> Steve,
>
> The above is how I edited the file to test if that was the cause of the
> news.notice error, and it apparently was. I didn't see any error message
> in news.notice:
Apologies John, you're correct. I missed a curly bracket in my example.
As a sidenote, it's always worth doing a syntax check on cleanfeed.local
before reloading your perl filters:-
perl -wc cleanfeed.local
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Tue, 10 Mar 2009 09:58
Date: Tue, 10 Mar 2009 09:58
39 lines
2367 bytes
2367 bytes
On Mon, 09 Mar 2009 12:54:07 -0500, John F. Morse wrote in
Message-Id: <gp3l3v$lob$1@optima7.xanadu-bbs.net>:
>> sub local_filter_first {
>> if ($hdr{'From'} =~ /$from_name_here/) {
>> return reject('Spam');
>> } <==Added
>> };
>>
>
> Steve,
>
> The above is how I edited the file to test if that was the cause of the
> news.notice error, and it apparently was. I didn't see any error message
> in news.notice:
>
> However, now EVERY article is being rejected as SPAM, including my own
> locally-posted test post shown at the end of the following:
It's hard to debug this without knowing what you replaced
$from_name_here with. As an example, it should read something like
this:
if ($hdr{'From'} =~ /steve\@mixmin\.net/) {
If you want to keep your cleanfeed.local in a more human-friendly
format, you can also do it like this:
if ($hdr{'From'} =~ /
steve\@mixmin\.net # Troll
| example\@invalid\.org # Flooder
| \@baddomain.com # Shoe sales
/x) {
The /x tells Perl to ignore whitespace, comments and newlines.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Tue, 10 Mar 2009 12:18
Date: Tue, 10 Mar 2009 12:18
24 lines
1910 bytes
1910 bytes
Russ Allbery wrote: > Black Dragon <bd@nomail.invalid> writes: >> Thanks for that. I never heard of FHS compliance until now. After a real >> brief look can't say I agree with all of it. > No one agrees with all of it, but file layout is exactly one of those > places where it matters more to have a standard than what the standard > is. What you gain is consistency across every server and every > application. You get used to just about any consistency as long as it's > consistent. >From Unix variant to Unix variant where many things are consistently inconsistent a move toward some sort of standardization isn't a bad thing. Best of luck getting consistency from everyone involved in the process of defining the standards. :) -- Black Dragon Force it!!! If it breaks, well, it wasn't working anyway... No, don't force it, get a bigger hammer.
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Tue, 10 Mar 2009 12:28
Date: Tue, 10 Mar 2009 12:28
20 lines
1599 bytes
1599 bytes
Frank Slootweg wrote: [...] > Can you say "PKB"? It's all good. John and I have opposing opinions on some things we talked about in another newsgroup and I think he may have carried that into here in his last reply to me. If he wants to engage in a pissing contest I'm more than happy to oblige, but we need to take it elsewhere because I refuse to do it here in nsn. :) -- Black Dragon Force it!!! If it breaks, well, it wasn't working anyway... No, don't force it, get a bigger hammer.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 14:46
Date: Tue, 10 Mar 2009 14:46
47 lines
3130 bytes
3130 bytes
Black Dragon wrote: > Frank Slootweg wrote: > > [...] > > >> Can you say "PKB"? >> > > It's all good. John and I have opposing opinions on some things we > talked about in another newsgroup and I think he may have carried > that into here in his last reply to me. > Not really. I don't hold grudges. What I stated here was in response to what you stated here, and how I analyzed it and where I thought you were heading. If you think I erred, please accept my apology. > If he wants to engage in a pissing contest I'm more than happy to > oblige, but we need to take it elsewhere because I refuse to do it > here in nsn. :) Then simply stop discussing human behavior, which is unpredictable and totally different from one individual to another, and keep the discussion on the technical subject of NNTP software. That will eliminate any possible misrepresentation or misunderstanding, such as bragging about how BSD is better than Linux, or Linux is better than BSD, or my dad can beat up your dad. That kind of advocacy (advertisement) belongs in an alt.* group, where most everybody is running on tilt. Or try a soc.* group or talk.* group. You won't find me there to cause you any grief. -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 15:03
Date: Tue, 10 Mar 2009 15:03
42 lines
2818 bytes
2818 bytes
Julien ÉLIE wrote:
> Hi John,
>
>>>> if ( $hdr{'From'} =~ /$from_name_here/ ) {
>>
>> I was just reading http://perldoc.perl.org/perlintro.html and
>> couldn't see why the $ was used since this is not a variable.
>
> In which *regular expression pattern* do you see that on that page?
>
I was referring to the above regex: "/$from_name_here/" which, in my
case, I use a real name and not a variable. Something like:
if ( $hdr{'From'} =~ /john/ ) {
No "@" nor domain required because the actual name I'm trying to filter
is not a simple "john" but very unique.
Therefore it is highly unlikely any other like-named poster would have
articles rejected.
I guess I could use a full e-mail address to eliminate any possibility.
Further reading and thinking makes me wonder if I shouldn't be using
something like this:
if ( $hdr{'From'} =~ /^john/ ) {
So any following text, like the "@domain" wouldn't matter. Comments?
BTW, "reading and thinking" can also be defined as "muddying up the water"!
Right now this is as clear as mud. ;-)
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 15:17
Date: Tue, 10 Mar 2009 15:17
61 lines
3856 bytes
3856 bytes
Steve wrote: > On Mon, 09 Mar 2009 12:54:07 -0500, John F. Morse wrote in > Message-Id: <gp3l3v$lob$1@optima7.xanadu-bbs.net>: > >> Steve, >> >> The above is how I edited the file to test if that was the cause of the >> news.notice error, and it apparently was. I didn't see any error message >> in news.notice: >> > > Apologies John, you're correct. I missed a curly bracket in my example. > As a sidenote, it's always worth doing a syntax check on cleanfeed.local > before reloading your perl filters:- > perl -wc cleanfeed.local > No problem, Steve. It was a needed learning experience for me. I was lucky I was able to find the solution by comparing to other areas in the files. This is the command I was trying to remember yesterday. I found it on the http://www.mixmin.net/cleanfeed/install.html page last night. I ran it, and the two Perl scripts do verify, despite several single use errors, like these: john@news:/etc/news/filter$ perl -wc cleanfeed.local Name "main::LocalPosts" used only once: possible typo at cleanfeed.local line 81. Name "main::Moderated" used only once: possible typo at cleanfeed.local line 87. Name "main::followups" used only once: possible typo at cleanfeed.local line 87. Name "main::now" used only once: possible typo at cleanfeed.local line 87. cleanfeed.local syntax OK john@news:/etc/news/filter$ perl -wc filter_innd.pl Useless use of a variable in void context at filter_innd.pl line 16. Useless use of a constant in void context at filter_innd.pl line 16. filter_innd.pl syntax OK I don't think these errors are important though. I remember reading something a long time ago to just ignore them. But whether it was for Cleanfeed or INN I cannot remember. ;-) The big problem, as I see it Steve, is INN is so stable that it tends to run for many months or years without needing any administration (beyond adding users with htpasswd). This causes a slow loss of memory on how to maintain the software due to no "refresher" activity for the old brain. ;-) -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Tue, 10 Mar 2009 15:17
Date: Tue, 10 Mar 2009 15:17
38 lines
2210 bytes
2210 bytes
John F. Morse wrote: > Black Dragon wrote: >> Frank Slootweg wrote: >> [...] >>> Can you say "PKB"? >> It's all good. John and I have opposing opinions on some things we >> talked about in another newsgroup and I think he may have carried >> that into here in his last reply to me. > Not really. I don't hold grudges. > What I stated here was in response to what you stated here, and how I > analyzed it and where I thought you were heading. > If you think I erred, please accept my apology. No need for an apology for a minor misunderstanding however it is accepted. > That kind of advocacy Here's where the misunderstanding is, I think. You appear to be interpreting my posting of examples as advocacy and that's not my intention at all. Not here in news.software.nntp anyway, I know this isn't the place for that. I didn't just fall off the back of a turnip truck you know. :) -- Black Dragon Be frank and explicit with your lawyer ... it is his business to confuse the issue afterwards.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 15:18
Date: Tue, 10 Mar 2009 15:18
38 lines
2944 bytes
2944 bytes
Julien ÉLIE wrote: > Hi John, > >> mv /usr/local/news/cleanfeed/cleanfeed filter_innd.pl >> >> In the third bulleted block above, the word "cleanfeed" should be >> "filter_innd.pl" and in the line below it "perl -wc >> /usr/local/news/bin/filter/cleanfeed" should be "perl -wc >> /usr/local/news/bin/filter/filter_innd.pl" since the file was >> previously renamed. ;-) > > I for one create a symbolic link between cleanfeed and filter_innd.pl > in order to better see where cleanfeed is: > > -rw-r--r-- 1 news news 414 2006-07-31 16:29 bad_adult_paths > -rw-r--r-- 1 news news 731 2009-03-04 08:10 bad_body > -rw-r--r-- 1 news news 416 2007-04-26 12:00 bad_cancel_paths > -rw-r--r-- 1 news news 261 2009-03-04 08:10 bad_groups > -rw-r--r-- 1 news news 941 2007-04-16 21:14 bad_hosts > -rw-r--r-- 1 news news 991 2009-03-10 03:50 bad_hosts_central > -rw-r--r-- 1 news news 1,2K 2007-04-26 12:00 bad_paths > -rwxr--r-- 1 news news 73K 2009-03-04 08:13 cleanfeed* > -rw-r--r-- 1 news news 8,6K 2009-01-11 15:06 cleanfeed.local > -lrwxrwxrwx 1 news news 9 2007-04-26 12:03 filter_innd.pl -> > cleanfeed* > That is a good solution. You have a very good mind. Thanks, Julien. -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 15:33
Date: Tue, 10 Mar 2009 15:33
80 lines
4386 bytes
4386 bytes
Steve wrote:
> On Mon, 09 Mar 2009 12:54:07 -0500, John F. Morse wrote in
> Message-Id: <gp3l3v$lob$1@optima7.xanadu-bbs.net>:
>
>
>>> sub local_filter_first {
>>> if ($hdr{'From'} =~ /$from_name_here/) {
>>> return reject('Spam');
>>> } <==Added
>>> };
>>>
>>>
>> Steve,
>>
>> The above is how I edited the file to test if that was the cause of the
>> news.notice error, and it apparently was. I didn't see any error message
>> in news.notice:
>>
>> However, now EVERY article is being rejected as SPAM, including my own
>> locally-posted test post shown at the end of the following:
>>
>
> It's hard to debug this without knowing what you replaced
> $from_name_here with. As an example, it should read something like
> this:
> if ($hdr{'From'} =~ /steve\@mixmin\.net/) {
>
> If you want to keep your cleanfeed.local in a more human-friendly
> format, you can also do it like this:
>
> if ($hdr{'From'} =~ /
> steve\@mixmin\.net # Troll
> | example\@invalid\.org # Flooder
> | \@baddomain.com # Shoe sales
> /x) {
>
> The /x tells Perl to ignore whitespace, comments and newlines.
>
I was just using a "handle" in the "from_name_here" spot. Not a complete
e-mail "From" address. If you want to debug the text, just plug in
anything, like "john" or "steve" where "from_name_here" is shown. But
first read on below as I may have an idea....
The cause of everything being filtered might have been due to the use of
the $ at the beginning of the regex. This $ would indicate the regex is
a variable as I understand it, and as Jeff pointed out.
The other use of a dollar sign would be at the end of a regex but there
it represents using the end of the matching text, like the caret ("^")
represents the beginning.
With that in mind (and I'm losing mine!), I wonder if this regex would
be better written as:
if ($hdr{'From'} =~ /^steve/) {
I believe this would filter ANY Steve from any domain? Then if the
person changed their e-mail address but retained the same unique handle,
the filter would still catch them.
Don't worry -- I'm not planing on filtering you or even Steve Jobs. ;-)
Speaking of Steves, did you see Steve Wozniak on "Dancing with the
Stars" last night? I guess he will be huffing and puffing every week
until he is voted off. He's put on a few pounds since I last saw a
picture of him. Maybe he will lose some of it? He certainly appears to
be having a blast on that show.
I'll be trying this new format and the others today to see what happens.
Thanks for your assistance.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Steve
Date: Tue, 10 Mar 2009 15:40
Date: Tue, 10 Mar 2009 15:40
14 lines
1821 bytes
1821 bytes
On Tue, 10 Mar 2009 10:33:58 -0500, John F. Morse wrote in
Message-Id: <gp6197$970$1@optima7.xanadu-bbs.net>:
> The cause of everything being filtered might have been due to the use of
> the $ at the beginning of the regex. This $ would indicate the regex is
> a variable as I understand it, and as Jeff pointed out.
That would certainly explain it. Cleanfeed (sadly) doesn't use a strict
'vars' pragma so an undefined $foo in a regex will match everything.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Can Cleanfeed filter on a specific user?
Author: Russ Allbery
Date: Tue, 10 Mar 2009 17:20
Date: Tue, 10 Mar 2009 17:20
24 lines
2428 bytes
2428 bytes
Black Dragon <bd@nomail.invalid> writes:
> Russ Allbery wrote:
>> No one agrees with all of it, but file layout is exactly one of those
>> places where it matters more to have a standard than what the standard
>> is. What you gain is consistency across every server and every
>> application. You get used to just about any consistency as long as
>> it's consistent.
> From Unix variant to Unix variant where many things are consistently
> inconsistent a move toward some sort of standardization isn't a bad
> thing. Best of luck getting consistency from everyone involved in the
> process of defining the standards. :)
For production servers in my day job, I only care about Linux, so a
standard across Linux systems is enough for me. We solved the problem of
standardization across other versions of UNIX by getting rid of all of
them. :)
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 17:32
Date: Tue, 10 Mar 2009 17:32
104 lines
5373 bytes
5373 bytes
Black Dragon wrote: > John F. Morse wrote: > > >> Black Dragon wrote: >> >>> Frank Slootweg wrote: >>> > > >>> [...] >>> > > > >>>> Can you say "PKB"? >>>> > > > >>> It's all good. John and I have opposing opinions on some things we >>> talked about in another newsgroup and I think he may have carried >>> that into here in his last reply to me. >>> > > >> Not really. I don't hold grudges. >> > > >> What I stated here was in response to what you stated here, and how I >> analyzed it and where I thought you were heading. >> > > >> If you think I erred, please accept my apology. >> > > No need for an apology for a minor misunderstanding however it is > accepted. > > >> That kind of advocacy >> > > Here's where the misunderstanding is, I think. You appear to be > interpreting my posting of examples as advocacy and that's not my > intention at all. Not here in news.software.nntp anyway, I know > this isn't the place for that. I didn't just fall off the back of a > turnip truck you know. :) > My comments are not against what might be an (unknown) "intention" at all. They are specifically directed on what I perceive. Not just here in n.s.n but in other groups as well. There is a pattern that maybe isn't obvious to you. In your case, it is my perception of "use BSD for all of your ills." Now I know you never said that in that fashion, but I do sniff the odor. ;-) And I have nothing against BSD or you. Another example is the fellow who always drops the Linux Mint as a cure-all for Ubuntu problems, in the Ubuntu newsgroup. He likes Mint (if that was the distro that I am thinking of in this example), and I'm sure Mint is as good as Ubuntu (or BSD for that matter). Way out on the edge are all of the "Win-driods" as they have been labeled, who push Windows in a Ubuntu group. This is the extreme, but it amplifies on what I see in someone's thought pattern. It is all advocacy; advice to "use what I use." (Pleading for, arguing, promoting, pitching, championing, campaigning, supporting, or recommending; active espousal.) I like the "pitching" definition. It's like a "sales pitch" without any reasoning of "why" explained. It's perfectly correct to discuss Leafnode or Typhoon in this group, even though most people here are INN users. That is because this is an NNTP Software group, and not an INN group. I consider it bad taste to go to, for instance, a Highwinds group, and try and show my love for INN, or Leafnode.... I don't understand why someone would even be reading another group if they thought their particular whatever was the best. ;-) Other than they are "nosy" and want to learn, which is fine. However, if they need "learning" then why are they trying to "teach"? Different people have different tastes, and taking away their plate of food and putting a helping of what you might like in front of them, then telling then to "eat," is not a very constructive way to get your idea across. You have not only provided a new "unknown" to them, but you have removed what they like. That is a double-whammy. ;-) HTH, and let's drop this since it (barely) mentions NNTP software. ;-) -- John No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message. The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Tue, 10 Mar 2009 18:12
Date: Tue, 10 Mar 2009 18:12
36 lines
2497 bytes
2497 bytes
John F. Morse wrote: > Black Dragon wrote: >> John F. Morse wrote: >>> That kind of advocacy >> Here's where the misunderstanding is, I think. You appear to be >> interpreting my posting of examples as advocacy and that's not my >> intention at all. Not here in news.software.nntp anyway, I know >> this isn't the place for that. I didn't just fall off the back of a >> turnip truck you know. :) > My comments are not against what might be an (unknown) "intention" at > all. They are specifically directed on what I perceive. Not just here in > n.s.n but in other groups as well. There is a pattern that maybe isn't > obvious to you. That is exactly what I was referring to when I said you may have carried some baggage from other newsgroups here. What I say in other newsgroups has no relevance at all to what I'm saying here unless the topic is specifically about news servers. The worst thing I'm guilty of here is assuming your level of experience with INN was less than mine. I based my assumption on the discussion about suck we had a while back, and for that I apologize. This discussion belongs elsewhere. I'm finished with it. -- Black Dragon Everybody lies; but it doesn't matter, since nobody listens.
Re: Can Cleanfeed filter on a specific user?
Author: Black Dragon
Date: Tue, 10 Mar 2009 21:29
Date: Tue, 10 Mar 2009 21:29
33 lines
2393 bytes
2393 bytes
Russ Allbery wrote: > Black Dragon <bd@nomail.invalid> writes: >> Russ Allbery wrote: >>> No one agrees with all of it, but file layout is exactly one of those >>> places where it matters more to have a standard than what the standard >>> is. What you gain is consistency across every server and every >>> application. You get used to just about any consistency as long as >>> it's consistent. >> From Unix variant to Unix variant where many things are consistently >> inconsistent a move toward some sort of standardization isn't a bad >> thing. Best of luck getting consistency from everyone involved in the >> process of defining the standards. :) > For production servers in my day job, I only care about Linux, so a > standard across Linux systems is enough for me. We solved the problem of > standardization across other versions of UNIX by getting rid of all of > them. :) I'm employed in manufacturing, CNC machining to be specific. I can only wish for *THAT* kind of standardization. :) With different CAD/CAM applications, operating systems, programming (motion control) dialects and the machine controls themselves, getting the job done is often like orchestrated chaos. -- Black Dragon Never have children, only grandchildren. -- Gore Vidal
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Tue, 10 Mar 2009 23:28
Date: Tue, 10 Mar 2009 23:28
52 lines
3366 bytes
3366 bytes
Steve wrote:
> On Tue, 10 Mar 2009 10:33:58 -0500, John F. Morse wrote in
> Message-Id: <gp6197$970$1@optima7.xanadu-bbs.net>:
>
>
>> The cause of everything being filtered might have been due to the use of
>> the $ at the beginning of the regex. This $ would indicate the regex is
>> a variable as I understand it, and as Jeff pointed out.
>>
>
> That would certainly explain it. Cleanfeed (sadly) doesn't use a strict
> 'vars' pragma so an undefined $foo in a regex will match everything.
>
Removing the $ took care of the problem, Steve.
It is presently working as expected, rejecting and logging in news and
news.notice. I'll need to wait until midnight to see how it appears in
the Daily Report, but it should be OK.
Well, maybe not....
scanlogs norotate
INND perl filter [Top 20]:
Reason
Count
Name changed to protect the innocent ;-)
11
Scoring filter
(9) 3
Attached HTML
file 2
Binary in non-binary
group 1
Scoring filter
(10) 1
TOTAL:
5 18
Thank you for your assistance, and to those others who helped, I
appreciate your help as well.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Re: Can Cleanfeed filter on a specific user?
Author: Jeffrey M. Vinocur
Date: Wed, 11 Mar 2009 00:54
Date: Wed, 11 Mar 2009 00:54
41 lines
2469 bytes
2469 bytes
In article <gp4jp2$tc5$1@optima7.xanadu-bbs.net>, John F. Morse <dont.bother> wrote: > >Can your my $badpeople = 'aol\.com'; be added to in the future with the >alternation metacharacter '|' ? Such as: > >my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife'; > >and so forth? Eek not quite like that. The single quotes define a string. The equals sign puts that string into a variable. When you use the variable in a regular expression (or almost anywhere else), the contents of that string are inserted in place of the variable. So you can't do my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife'; any more than you can do print 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife'; because there's nothing magical about combining strings with | to make some extra special kinda of string that you're then putting into a variable. (The | used as top-level syntax like you're doing means something totally different.) But you -can- absolutely do what you're intending, by making one long string that goes into a variable, and then putting that into the regular expression. (It's the regular expression that makes the | mean what you think it means.) Like this: my $badpeople = 'aol\.com|gmail\.com|microsoft\.com|ex-wife'; -- Jeffrey M. Vinocur jeff@litech.org
Re: Can Cleanfeed filter on a specific user?
Author: John F. Morse
Date: Wed, 11 Mar 2009 01:25
Date: Wed, 11 Mar 2009 01:25
76 lines
4053 bytes
4053 bytes
Jeffrey M. Vinocur wrote:
> In article <gp4jp2$tc5$1@optima7.xanadu-bbs.net>,
> John F. Morse <dont.bother> wrote:
>
>> Can your my $badpeople = 'aol\.com'; be added to in the future with the
>> alternation metacharacter '|' ? Such as:
>>
>> my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife';
>>
>> and so forth?
>>
>
> Eek not quite like that.
>
> The single quotes define a string. The equals sign puts that
> string into a variable. When you use the variable in a regular
> expression (or almost anywhere else), the contents of that string
> are inserted in place of the variable.
>
> So you can't do
>
> my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife';
>
> any more than you can do
>
> print 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife';
>
> because there's nothing magical about combining strings with | to
> make some extra special kinda of string that you're then putting
> into a variable. (The | used as top-level syntax like you're
> doing means something totally different.)
>
> But you -can- absolutely do what you're intending, by making one
> long string that goes into a variable, and then putting that into
> the regular expression. (It's the regular expression that makes
> the | mean what you think it means.) Like this:
>
> my $badpeople = 'aol\.com|gmail\.com|microsoft\.com|ex-wife';
>
Understood.
This is similar to what Steve recommended for multiple bad guys:
if ($hdr{'From'} =~ /
steve\@mixmin\.net # Troll
| example\@invalid\.org # Flooder
| \@baddomain.com # Shoe sales
/x) {
I did try the above, but perl -wc reports a syntax error that I couldn't
find/fix. Maybe it was a missing curly bracket?
I'll find it because I'm going to fire up an off-line INN and play with
this so I won't be disturbing the "public." ;-)
I did spend several hours last night reading the Perl documentation, but
without trial and error practice, it will quickly slip away.
Memory that is 64 years old doesn't retain like it did 30 years ago,
when I could read a book on assembler, Pascal, FORTRAN, ..., and
practically memorize it.
Enjoy while you can. ;-)
And thanks for your help, Jeff. It is appreciated.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Page 1 of 2 • 54 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