Thread View: news.software.nntp
8 messages
8 total messages
Started by D. Stussy
Sat, 13 Jun 2009 20:46
Cleanfeed (v227) comments:
Author: D. Stussy
Date: Sat, 13 Jun 2009 20:46
Date: Sat, 13 Jun 2009 20:46
29 lines
2250 bytes
2250 bytes
Version: $Id: cleanfeed 227 2009-06-05 11:49:33Z cleanfeed $
faq_groups: Add "\.faqs?$"
I count 17 additional groups that would match.
image_extensions: Add "icon?"
For the ".ico"/".icon" image type. Granted, rarely seen.
spam_report_groups: Change "\.spamtrap" to "\.spamtrap$"
Exclude "\.spamtraps" which would be a discussion about how to spamtrap.
spam_report_groups: Consider adding "\.spam\.sightings"
Picks up 3 groups but avoids "alt.elvis.sightings".
Bad_From(_RE): I see that the suggestion regarding bad "From:" header
matching didn't fall on deaf ears. However, consider also matching the
pattern against "Sender:" and "Reply-To:" headers, perhaps as an option.
Possibly "Errors-To:" also (which should only appear in articles gated from
mailing lists where it is technically depreciated).
Some variables have mixed-case regex expressions - e.g.:
$HTTP = '[Hh][Tt][Tt][Pp][Ss]?:\/\/?(?:\w+(?::\w+)?@)?';
Is this necessary, as opposed to using "=~ /$HTTP/i", thus making the
expression comparison case insensitive with the "i" flag? Would this
change result in either cleaner looking code or faster execution?
Re: Cleanfeed (v227) comments:
Author: Steve Crook
Date: Mon, 15 Jun 2009 13:26
Date: Mon, 15 Jun 2009 13:26
49 lines
2825 bytes
2825 bytes
On Sat, 13 Jun 2009 13:46:51 -0700, D. Stussy wrote in
Message-Id: <h1137j$i7k$1@snarked.org>:
Hi,
Thanks very much for your feedback.
> faq_groups: Add "\.faqs?$"
> I count 17 additional groups that would match.
Done
> image_extensions: Add "icon?"
> For the ".ico"/".icon" image type. Granted, rarely seen.
Done
> spam_report_groups: Change "\.spamtrap" to "\.spamtrap$"
> Exclude "\.spamtraps" which would be a discussion about how to spamtrap.
Done
> spam_report_groups: Consider adding "\.spam\.sightings"
> Picks up 3 groups but avoids "alt.elvis.sightings".
Done
> Bad_From(_RE): I see that the suggestion regarding bad "From:" header
> matching didn't fall on deaf ears. However, consider also matching the
> pattern against "Sender:" and "Reply-To:" headers, perhaps as an option.
All three headers, From, Sender and Reply-To are now checked. A match
against any one will result in a 'Bad From' reject reason.
> Possibly "Errors-To:" also (which should only appear in articles gated from
> mailing lists where it is technically depreciated).
I'll monitor this one for a while and see what hits are logged.
> Some variables have mixed-case regex expressions - e.g.:
>
> $HTTP = '[Hh][Tt][Tt][Pp][Ss]?:\/\/?(?:\w+(?::\w+)?@)?';
>
> Is this necessary, as opposed to using "=~ /$HTTP/i", thus making the
> expression comparison case insensitive with the "i" flag? Would this
> change result in either cleaner looking code or faster execution?
The whole URL matching section needs some rework. It functions on the
principle that all posted URL's are prefixed with http:// which is often
not true. I'll try and clean this section up over the next week, time
permitting.
--
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: Cleanfeed (v227) comments:
Author: D. Stussy
Date: Mon, 15 Jun 2009 20:48
Date: Mon, 15 Jun 2009 20:48
59 lines
3692 bytes
3692 bytes
"Steve Crook" <steve@mixmin.net> wrote in message
news:slrnh3civj.fbg.steve@news.mixmin.net...
> On Sat, 13 Jun 2009 13:46:51 -0700, D. Stussy wrote in
> Message-Id: <h1137j$i7k$1@snarked.org>:
> Thanks very much for your feedback.
> ...
> > Bad_From(_RE): I see that the suggestion regarding bad "From:" header
> > matching didn't fall on deaf ears. However, consider also matching the
> > pattern against "Sender:" and "Reply-To:" headers, perhaps as an
option.
>
> All three headers, From, Sender and Reply-To are now checked. A match
> against any one will result in a 'Bad From' reject reason.
Note that I consider order important here, and the system should report in
the message WHICH header was matched. I checked them locally in this
order: Reply-To, Sender, From. I wanted to give preference to the
optional headers, and Reply-To seems more critical to be a valid mailbox
than the rest. From is often made invalid while Reply-To should (or must?)
be valid. Example:
if ($Bad_From) {
return reject("Banned Reply-To ($1)",'Banned Reply-To')
if $hdr{'Reply-To'} =~ $Bad_From_RE;
return reject("Banned Sender ($1)",'Banned Sender')
if $hdr{'Sender'} =~ $Bad_From_RE;
}
I prefer to say "Banned From|Sender|Reply-To" than "Bad From..." - It's
more precise.
I have also seen some questionable posts where From = Reply-To. However,
Reply-To should only be given if it differs from From.
> > Possibly "Errors-To:" also (which should only appear in articles gated
from
> > mailing lists where it is technically depreciated).
> I'll monitor this one for a while and see what hits are logged.
Locally, I chose not to implement any checks for it. However, it is a
"sender"-type header, so it deserved consideration with the above.
> > Some variables have mixed-case regex expressions - e.g.:
> >
> > $HTTP = '[Hh][Tt][Tt][Pp][Ss]?:\/\/?(?:\w+(?::\w+)?@)?';
> >
> > Is this necessary, as opposed to using "=~ /$HTTP/i", thus making the
> > expression comparison case insensitive with the "i" flag? Would this
> > change result in either cleaner looking code or faster execution?
>
> The whole URL matching section needs some rework. It functions on the
> principle that all posted URL's are prefixed with http:// which is often
> not true. I'll try and clean this section up over the next week, time
> permitting.
Note that my point here was efficiency and ease of reading the code. If it
executes faster "as is", then it should NOT be changed.
Re: Cleanfeed (v227) comments:
Author: Steve Crook
Date: Tue, 16 Jun 2009 10:09
Date: Tue, 16 Jun 2009 10:09
41 lines
2503 bytes
2503 bytes
On Mon, 15 Jun 2009 13:48:37 -0700, D. Stussy wrote in
Message-Id: <h16b3g$ltr$1@snarked.org>:
> I prefer to say "Banned From|Sender|Reply-To" than "Bad From..." - It's
> more precise.
How about this:
if ($Bad_From) {
return reject("Reply-To ($1)", 'Bad originator (Reply-To)')
if $hdr{'Reply-To'} =~ $Bad_From_RE;
return reject("Sender ($1)", 'Bad originator (Sender)')
if $hdr{Sender} =~ $Bad_From_RE;
return reject("From ($1)", 'Bad originator (From)')
if $hdr{From} =~ $Bad_From_RE;
};
Each will now generate a unique reject but for admins who want to log
all rejections against Bad_From, they can use something like:
saveart('cf.from', $vr) if $sr =~ /^Bad originator/;
>> The whole URL matching section needs some rework. It functions on the
>> principle that all posted URL's are prefixed with http:// which is often
>> not true. I'll try and clean this section up over the next week, time
>> permitting.
>
> Note that my point here was efficiency and ease of reading the code. If it
> executes faster "as is", then it should NOT be changed.
I think it needs changing as a post containing "www.badurl.foo" will not
be matched unless it's prefixed with "http://". Quickly scanning
through my logs, there are thousands of URL's posted without the
scheme name.
For the bad_url checking I use:
(?:www\.|http:\/\/(?:www\.)?)
This matches http://www.badurl.foo, www.badurl.foo and
http://badurl.foo.
--
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: Cleanfeed (v227) comments:
Author: D. Stussy
Date: Tue, 16 Jun 2009 19:50
Date: Tue, 16 Jun 2009 19:50
30 lines
2253 bytes
2253 bytes
"Steve Crook" <steve@mixmin.net> wrote in message
news:slrnh3err9.7fb.steve@news.mixmin.net...
> On Mon, 15 Jun 2009 13:48:37 -0700, D. Stussy wrote in
> Message-Id: <h16b3g$ltr$1@snarked.org>:
>
> > I prefer to say "Banned From|Sender|Reply-To" than "Bad From..." - It's
> > more precise.
> How about this:
>
> if ($Bad_From) {
> return reject("Reply-To ($1)", 'Bad originator (Reply-To)')
> if $hdr{'Reply-To'} =~ $Bad_From_RE;
> return reject("Sender ($1)", 'Bad originator (Sender)')
> if $hdr{Sender} =~ $Bad_From_RE;
> return reject("From ($1)", 'Bad originator (From)')
> if $hdr{From} =~ $Bad_From_RE;
> };
>
> Each will now generate a unique reject but for admins who want to log
> all rejections against Bad_From, they can use something like:
> saveart('cf.from', $vr) if $sr =~ /^Bad originator/;
I think you missed the point. My point is to say the word "banned" in the
NNTP message too; e.g.:
return reject("Banned Reply-To ($1)", 'Bad originator (Reply-To)')
That's what I'm currently using in my cleanfeed.local file.
Re: Cleanfeed (v227) comments:
Author: D. Stussy
Date: Mon, 22 Jun 2009 06:25
Date: Mon, 22 Jun 2009 06:25
27 lines
2295 bytes
2295 bytes
"Steve Crook" <steve@mixmin.net> wrote in message
news:slrnh3err9.7fb.steve@news.mixmin.net...
> On Mon, 15 Jun 2009 13:48:37 -0700, D. Stussy wrote in Message-Id:
<h16b3g$ltr$1@snarked.org>:
> > I prefer to say "Banned From|Sender|Reply-To" than "Bad From..." - It's
> > more precise.
>
> How about this:
>
> if ($Bad_From) {
> return reject("Reply-To ($1)", 'Bad originator (Reply-To)')
> if $hdr{'Reply-To'} =~ $Bad_From_RE;
> return reject("Sender ($1)", 'Bad originator (Sender)')
> if $hdr{Sender} =~ $Bad_From_RE;
> return reject("From ($1)", 'Bad originator (From)')
> if $hdr{From} =~ $Bad_From_RE;
> };
>
> Each will now generate a unique reject but for admins who want to log
> all rejections against Bad_From, they can use something like:
> saveart('cf.from', $vr) if $sr =~ /^Bad originator/;
You're missing my point: It's the message of the FIRST parameter to
reject() that I'm talking about, not the second. The first one is what
ultimately is sent to the remote host and shows up in innreport's results.
Re: Cleanfeed (v227) comments:
Author: Steve Crook
Date: Mon, 22 Jun 2009 09:06
Date: Mon, 22 Jun 2009 09:06
21 lines
1818 bytes
1818 bytes
On Sun, 21 Jun 2009 23:25:13 -0700, D. Stussy wrote in
Message-Id: <h1n844$jis$1@snarked.org>:
> You're missing my point: It's the message of the FIRST parameter to
> reject() that I'm talking about, not the second. The first one is what
> ultimately is sent to the remote host and shows up in innreport's results.
Sorry, I changed this in development and forgot to respond to your first
posting. The code now reads:
return reject("Banned Reply-To ($1)", 'Bad Reply-To')
if $hdr{'Reply-To'} =~ $Bad_From_RE;
return reject("Banned Sender ($1)", 'Bad Sender')
if $hdr{Sender} =~ $Bad_From_RE;
return reject("Banned From ($1)", 'Bad From')
if $hdr{From} =~ $Bad_From_RE;
--
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: Cleanfeed (v227) comments:
Author: D. Stussy
Date: Mon, 22 Jun 2009 20:37
Date: Mon, 22 Jun 2009 20:37
14 lines
1803 bytes
1803 bytes
"Steve Crook" <steve@mixmin.net> wrote in message
news:slrnh3uid2.930.steve@news.mixmin.net...
> .... The code now reads:
>
> return reject("Banned Reply-To ($1)", 'Bad Reply-To')
> if $hdr{'Reply-To'} =~ $Bad_From_RE;
> return reject("Banned Sender ($1)", 'Bad Sender')
> if $hdr{Sender} =~ $Bad_From_RE;
> return reject("Banned From ($1)", 'Bad From')
> if $hdr{From} =~ $Bad_From_RE;
:-)
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