Thread View: news.software.nntp
30 messages
30 total messages
Started by D. Stussy
Tue, 31 May 2011 23:15
Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Tue, 31 May 2011 23:15
Date: Tue, 31 May 2011 23:15
21 lines
1992 bytes
1992 bytes
I have recently noticed that there seems to be alot of trolling coming from
users which have "From:" headers that have no "@" in them. Is that even
legal per the standards and RFCs? I think not.
My first impression was ^[^@]*$ into file bad_from.
However, I did get some strange results. I next tried "^[^@]+$" to ignore
the empty header-data case (which should not exist anyway).
I had a few problems with that too. Further tracing this, I discovered
that some systems were setting their "Complaints-To" header (or the field
from "Injection-Info") to an HTTP URL instead of a mailbox address. I
check that field against the "bad_from" regex too.
Therefore, my third try is this: ^[^@:]+$
or is it better to specify it as ^[^@:]{1,}$
My goal is to eliminate illegally formatted messages from my server.
Opinions wanted.
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Wed, 01 Jun 2011 02:10
Date: Wed, 01 Jun 2011 02:10
26 lines
2186 bytes
2186 bytes
D. Stussy wrote:
> I have recently noticed that there seems to be alot of trolling coming from
> users which have "From:" headers that have no "@" in them. Is that even
> legal per the standards and RFCs? I think not.
>
> My first impression was ^[^@]*$ into file bad_from.
>
> However, I did get some strange results. I next tried "^[^@]+$" to ignore
> the empty header-data case (which should not exist anyway).
>
> I had a few problems with that too. Further tracing this, I discovered
> that some systems were setting their "Complaints-To" header (or the field
> from "Injection-Info") to an HTTP URL instead of a mailbox address. I
> check that field against the "bad_from" regex too.
>
> Therefore, my third try is this: ^[^@:]+$
> or is it better to specify it as ^[^@:]{1,}$
>
> My goal is to eliminate illegally formatted messages from my server.
> Opinions wanted.
Is this about filtering "trolling" posts or RFC law enforcement?
Also, I'm wondering what would happen if 'we' changed the From
header to HTobs (obsolete header but keep untouched); would this
interfere with the proper operation of INN?
Re: Cleanfeed: Looking for regex expression for ....
Author: Steve Crook
Date: Wed, 01 Jun 2011 12:45
Date: Wed, 01 Jun 2011 12:45
20 lines
1682 bytes
1682 bytes
On Tue, 31 May 2011 16:15:43 -0700, D. Stussy wrote in
Message-Id: <is3slt$d30$1@snarked.org>:
> Therefore, my third try is this: ^[^@:]+$
> or is it better to specify it as ^[^@:]{1,}$
>
> My goal is to eliminate illegally formatted messages from my server.
> Opinions wanted.
This is a lot harder than it appears because the From header can
contain legitimate freeform text. E.g. Steve <steve@mixmin.net>.
You could check for the presence of a valid address in the From header
with something like this in cleanfeed.local:
if ($hdr{From} !~ /[\w\-\.]+\@[\w\-\.]+/) {
logart('malformed_from');
};
There are much more elaborate email address regexs but that will
probably suffice.
Re: Cleanfeed: Looking for regex expression for ....
Author: Julien ÉLIE
Date: Wed, 01 Jun 2011 20:45
Date: Wed, 01 Jun 2011 20:45
30 lines
2140 bytes
2140 bytes
Hi Junior,
> Also, I'm wondering what would happen if 'we' changed the From
> header to HTobs (obsolete header but keep untouched); would this
> interfere with the proper operation of INN?
innd and nnrpd would then accept articles which do not contain From:
header fields, or which contain several such header fields. It is not
RFC-compliant.
Also please note that innd should not reject these already injected
messages into Usenet. And that nnrpd properly rejects the messages
mentioned by Dieter ("From:" headers that have no "@" in them) at
injection time.
I read in nnrpd/post.c:
p = strchr(frombuf, '@');
if (p) {
[...]
} else {
[...]
return "From: address not in Internet syntax";
}
--
Julien ÉLIE
« La terre étant ronde, le kilomètre devrait être rond et non pas
carré. » (Ramón Gomez de La Serna)
Re: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Wed, 01 Jun 2011 23:57
Date: Wed, 01 Jun 2011 23:57
49 lines
3276 bytes
3276 bytes
"Steve Crook" <steve@mixmin.net> wrote in message
news:slrniucd46.47d.steve@news.mixmin.net...
> On Tue, 31 May 2011 16:15:43 -0700, D. Stussy wrote in
> Message-Id: <is3slt$d30$1@snarked.org>:
>
> > Therefore, my third try is this: ^[^@:]+$
> > or is it better to specify it as ^[^@:]{1,}$
> >
> > My goal is to eliminate illegally formatted messages from my server.
> > Opinions wanted.
>
> This is a lot harder than it appears because the From header can
> contain legitimate freeform text. E.g. Steve <steve@mixmin.net>.
>
> You could check for the presence of a valid address in the From header
> with something like this in cleanfeed.local:
> if ($hdr{From} !~ /[\w\-\.]+\@[\w\-\.]+/) {
> logart('malformed_from');
> };
>
> There are much more elaborate email address regexs but that will
> probably suffice.
OK, but instead of writing code to check for the presence of "@" then
negating, I'm appending to an existing expression and checking for its
absence.
I thought that the purpose of the "bad_from" regex file was:
1) To ban specific users and user patterns, and
2) To detect invalid constructs.
The pattern I'm testing addresses #2. It should reject anything that
doesn't have either "@" or ":". I'm being nice by accepting the colon - so
as not to reject the ONE site that's using a properly formatted HTTP URL
despite the fact that the field is supposed to have a mailbox address.
I've only found 5 sites which are being affected (when applying this to the
"complaints to" field). Two of them are trying to specify HTTP addresses
but don't have a leading "http://". The other three are playing games with
mailbox address formats by using "(at)" or "_at_" instead of "@".
For Julien: It doesn't matter if INN handles it properly. Other software
is also used for Usenet, and we certainly can't speak for them or their
users - beyond what the RFCs and accepted standards tell us. Simply put:
The crap is getting in somewhere, and once in, it doesn't matter from
where.
Re: Cleanfeed: Looking for regex expression for ....
Author: Russ Allbery
Date: Thu, 02 Jun 2011 00:05
Date: Thu, 02 Jun 2011 00:05
25 lines
2511 bytes
2511 bytes
"D. Stussy" <spam+newsgroups@bde-arc.ampr.org> writes:
> For Julien: It doesn't matter if INN handles it properly. Other
> software is also used for Usenet, and we certainly can't speak for them
> or their users - beyond what the RFCs and accepted standards tell us.
> Simply put: The crap is getting in somewhere, and once in, it doesn't
> matter from where.
I have for some time thought that it would be interesting just as an
experimental exercise, if for no other reason, to write a strictly
conforming and checking news server, which enforced every rule of the RFCs
on all articles it accepted. It would be mostly interesting to see what
sort of stuff it threw away, and what the nature of that traffic was.
I'll never have time to actually do it, though. There are a lot of things
that could be checked that major news servers don't, either because it's
too complex (a proper RFC 5322 address validator is a fair bit of work) or
because it's mostly an academic exercise that you probably wouldn't want
to run in the real world.
--
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: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Thu, 02 Jun 2011 00:27
Date: Thu, 02 Jun 2011 00:27
10 lines
1592 bytes
1592 bytes
> Is this about filtering "trolling" posts or RFC law enforcement? Both - as many trolls' posts also violate the standards and RFCs. I've recently noticed that some trolls aren't placing a mailbox address in their "From:" fields at all. That gave me the idea to require "@" in incoming posts from peers, and thus the expression. The absence of that one simple character took care of several of them.
Re: Cleanfeed: Looking for regex expression for ....
Author: Gary L. Burnore
Date: Thu, 02 Jun 2011 01:50
Date: Thu, 02 Jun 2011 01:50
46 lines
3399 bytes
3399 bytes
On Wed, 1 Jun 2011 02:10:23 +0000 (UTC), Junior wrote:
>D. Stussy wrote:
>> I have recently noticed that there seems to be alot of trolling coming from
>> users which have "From:" headers that have no "@" in them. Is that even
>> legal per the standards and RFCs? I think not.
>>
>> My first impression was ^[^@]*$ into file bad_from.
>>
>> However, I did get some strange results. I next tried "^[^@]+$" to ignore
>> the empty header-data case (which should not exist anyway).
>>
>> I had a few problems with that too. Further tracing this, I discovered
>> that some systems were setting their "Complaints-To" header (or the field
>> from "Injection-Info") to an HTTP URL instead of a mailbox address. I
>> check that field against the "bad_from" regex too.
>>
>> Therefore, my third try is this: ^[^@:]+$
>> or is it better to specify it as ^[^@:]{1,}$
>>
>> My goal is to eliminate illegally formatted messages from my server.
>> Opinions wanted.
>
>Is this about filtering "trolling" posts or RFC law enforcement?
It's cuz stussy wants people to think he's a news admin. Nothing
more.
>Also, I'm wondering what would happen if 'we' changed the From
>header to HTobs (obsolete header but keep untouched); would this
>interfere with the proper operation of INN?
INN wants a From.
--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Black Helicopter Repair Services, Ltd.| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
You KNOW you want one: | ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
https://signup.databasix.com | Official Proof of Purchase
===========================================================================
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Thu, 02 Jun 2011 08:48
Date: Thu, 02 Jun 2011 08:48
28 lines
2405 bytes
2405 bytes
D. Stussy wrote: >> Is this about filtering "trolling" posts or RFC law enforcement? > > Both - as many trolls' posts also violate the standards and RFCs. Ah yes; the art of profiling. > I've recently noticed that some trolls aren't placing a mailbox address in > their "From:" fields at all. That gave me the idea to require "@" in > incoming posts from peers, and thus the expression. The absence of that > one simple character took care of several of them. Assuming your filters are still rejecting those From fields that don't contain something that 'looks' like an email address... this post should not annoy you. I replied to your post to try and maybe understand better what your definition of a trolling post is *and* how serious you are about enforcement of RFC dogma. Are you concerned about collateral damage? Or; is it possible that a non-troll may interpret a certain verse from these 'standards and RFCs' in an unorthodox way that might be contrary to the established faith? My goal? To *force* everyone to believe as I do. The only reason I allow usenet to exist is because I believe that the main purpose of usenet is to facilitate discussion and communication. Anything that obstructs this goal (of mine) is the enemy and will be reported to the proper authorities... as soon as I figure out who they are.
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Thu, 02 Jun 2011 09:43
Date: Thu, 02 Jun 2011 09:43
10 lines
1569 bytes
1569 bytes
Gary L Burnore wrote: > On Wed, 1 Jun 2011 02:10:23 +0000 (UTC), Junior wrote: >>Also, I'm wondering what would happen if 'we' changed the From >>header to HTobs (obsolete header but keep untouched); would this >>interfere with the proper operation of INN? > > INN wants a From. I forget who it was... maybe Yoda... but it was said that what INN wants is a "Properly formatted invalid or bogus from address ... "
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Thu, 02 Jun 2011 10:04
Date: Thu, 02 Jun 2011 10:04
39 lines
2534 bytes
2534 bytes
Julien ÉLIE wrote:
> Hi Junior,
>
>> Also, I'm wondering what would happen if 'we' changed the From
>> header to HTobs (obsolete header but keep untouched); would this
>> interfere with the proper operation of INN?
>
> innd and nnrpd would then accept articles which do not contain From:
> header fields, or which contain several such header fields. It is not
> RFC-compliant.
That's what I was thinking. But why would anyone do such a thing? ;)
Cuz you can? It's interesting because it might help me understand
what INN actually *needs* to function without a meltdown.
> Also please note that innd should not reject these already injected
> messages into Usenet. And that nnrpd properly rejects the messages
> mentioned by Dieter ("From:" headers that have no "@" in them) at
> injection time.
Steve Crook pointed that out to me awhile ago and mentioned that
some older servers didn't enforce a working email address in the
>From header. Got me thinking... that it might be better to handle
things like this with "posting filters" or Cleanfeed, if you decided
to filter incoming posts based on this.
> I read in nnrpd/post.c:
>
> p = strchr(frombuf, '@');
> if (p) {
> [...]
> } else {
> [...]
> return "From: address not in Internet syntax";
> }
/* return "From: address not in Internet syntax"; */
Commenting out a single line eliminates that pesky feature.
Re: Cleanfeed: Looking for regex expression for ....
Author: Steve Crook
Date: Thu, 02 Jun 2011 10:50
Date: Thu, 02 Jun 2011 10:50
31 lines
2939 bytes
2939 bytes
On Thu, 2 Jun 2011 08:48:30 +0000 (UTC), Junior wrote in Message-Id: <201106020848.UTC.is7iou$dop$1@tioat.net>: > I replied to your post to try and maybe understand better what your > definition of a trolling post is *and* how serious you are about > enforcement of RFC dogma. Trolling is a difficult term to quantify as people interpret it in different ways. I certainly wouldn't try to censor trolling using my definition of it. Lets assume that by trolling, D.Stussy is referring to undesirable spam or abuse of some kind. In simple terms I'd consider any non-conformance with the RFCs to be undesirable. If an RFC states MUST then all software should conform with that. To do otherwise risks breaking other software that, quite rightly, assumes conformance. This particular issue is complicated by INN not absolutely enforcing compliance with the RFC. As a result, some people will unknowingly fail to conform whilst others (Jeff Relf) will delight in breaking the rule. As new software and software versions come along, I think they should enforce conformance to the best extent they can without becoming bloated by it. When news admins upgrade to new versions, they have the responsibility of making their users aware of any changes to their perception of the service. This is where a Cleanfeed rule would be useful to log non-compliance for a period of time prior to the upgrade so that users can be advised of the forthcoming change. To modify new versions of software to relax conformance with current RFCs is IMO a poor solution. In these instances the software isn't at fault for complying and if the admin has issues they should take them up with the RFC rather than the application or its developers.
Re: Cleanfeed: Looking for regex expression for ....
Author: Julien ÉLIE
Date: Thu, 02 Jun 2011 11:50
Date: Thu, 02 Jun 2011 11:50
23 lines
2354 bytes
2354 bytes
Hi Junior, > what INN actually *needs* to function without a meltdown. [...] > /* return "From: address not in Internet syntax"; */ > > Commenting out a single line eliminates that pesky feature. Altering the source code of a program, of any kind, can lead to a "meltdown". I do not deny the fact. You can also just comment the call to the function that actually posts the article, or transfers it to other peers. You can also only keep the even lines when transferring the article. Other funny things to do with control articles. Also alter your sshd source code to allow direct root authentication without password :-) -- Julien ÉLIE « La terre étant ronde, le kilomètre devrait être rond et non pas carré. » (Ramón Gomez de La Serna)
Re: Cleanfeed: Looking for regex expression for ....
Author: Julien ÉLIE
Date: Thu, 02 Jun 2011 12:01
Date: Thu, 02 Jun 2011 12:01
27 lines
2748 bytes
2748 bytes
Hi Steve, > When news admins upgrade to new versions, they have the > responsibility of making their users aware of any changes to their > perception of the service. This is where a Cleanfeed rule would be > useful to log non-compliance for a period of time prior to the > upgrade so that users can be advised of the forthcoming change. That would indeed be a useful "best practice". It however assumes that the news admin knows the exact changes made in the source code of new versions (for instance, if a check for a missing '@' in Sender: is added, will it always be mentioned in the release notes? — be it INN or any other news server) The news admin will also not know what his peers do. If a few articles suddenly do not come to his news server (for instance from a person who sends invalid articles, and it appears that these articles were only transferred by one peer, and that peer upgraded and no longer accepts such articles). Well, not easy to do in practice in fact :-/ -- Julien ÉLIE « La terre étant ronde, le kilomètre devrait être rond et non pas carré. » (Ramón Gomez de La Serna)
Re: Cleanfeed: Looking for regex expression for ....
Author: Russ Allbery
Date: Thu, 02 Jun 2011 17:37
Date: Thu, 02 Jun 2011 17:37
17 lines
1970 bytes
1970 bytes
Junior writes:
> /* return "From: address not in Internet syntax"; */
> Commenting out a single line eliminates that pesky feature.
INN is free software, so you can make whatever modifications you'd like,
and it's up to you and your peers whether they work. However, we
generally strive for RFC compliance in the version that we distribute, and
changes away from that aren't really supported. All that means is that if
you break something, you get to keep both pieces. :)
--
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: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Fri, 03 Jun 2011 00:34
Date: Fri, 03 Jun 2011 00:34
53 lines
4045 bytes
4045 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrniueqnk.47d.steve@news.mixmin.net... > On Thu, 2 Jun 2011 08:48:30 +0000 (UTC), Junior wrote in > Message-Id: <201106020848.UTC.is7iou$dop$1@tioat.net>: > > > I replied to your post to try and maybe understand better what your > > definition of a trolling post is *and* how serious you are about > > enforcement of RFC dogma. > > Trolling is a difficult term to quantify as people interpret it in > different ways. I certainly wouldn't try to censor trolling using my > definition of it. Lets assume that by trolling, D.Stussy is referring > to undesirable spam or abuse of some kind. I'll accept that goal. However, I note that alot of "classical" trolling is ALSO spam or abuse (just like forged e-mail messages are also often spam). > In simple terms I'd consider any non-conformance with the RFCs to be > undesirable. If an RFC states MUST then all software should conform > with that. To do otherwise risks breaking other software that, quite > rightly, assumes conformance. This particular issue is complicated by > INN not absolutely enforcing compliance with the RFC. As a result, some > people will unknowingly fail to conform whilst others (Jeff Relf) will > delight in breaking the rule. Noting Julien's and Russ' responses, INN does more to enforce RFC in its nnrpd utility than it does in what it accepts from peers. It might not generate [some types of] garbage but it certainly will pass it through from peer to peer. > As new software and software versions come along, I think they should > enforce conformance to the best extent they can without becoming > bloated by it. When news admins upgrade to new versions, they have the > responsibility of making their users aware of any changes to their > perception of the service. This is where a Cleanfeed rule would be > useful to log non-compliance for a period of time prior to the > upgrade so that users can be advised of the forthcoming change. > > To modify new versions of software to relax conformance with current > RFCs is IMO a poor solution. In these instances the software isn't at > fault for complying and if the admin has issues they should take them up > with the RFC rather than the application or its developers. My primary questions for posting my regex expression: 1) Does it do what I think it should? 2) Does it reject something that is valid per the RFCs/standards? As far as RFC/standards violations go, as long as the violation is willful, then if it "causes problems," it's up to the violator to fix (especially if he wants his message to get out).
Re: Cleanfeed: Looking for regex expression for ....
Author: Gary L. Burnore
Date: Fri, 03 Jun 2011 01:35
Date: Fri, 03 Jun 2011 01:35
32 lines
3043 bytes
3043 bytes
On Thu, 2 Jun 2011 17:34:42 -0700, "D. Stussy"
<spam+newsgroups@bde-arc.ampr.org> wrote:
>"Steve Crook" <steve@mixmin.net> wrote in message
>news:slrniueqnk.47d.steve@news.mixmin.net...
>> On Thu, 2 Jun 2011 08:48:30 +0000 (UTC), Junior wrote in
>> Message-Id: <201106020848.UTC.is7iou$dop$1@tioat.net>:
>>
>> > I replied to your post to try and maybe understand better what your
>> > definition of a trolling post is *and* how serious you are about
>> > enforcement of RFC dogma.
>>
>> Trolling is a difficult term to quantify as people interpret it in
>> different ways. I certainly wouldn't try to censor trolling using my
>> definition of it. Lets assume that by trolling, D.Stussy is referring
>> to undesirable spam or abuse of some kind.
>
>I'll accept that goal. However, I note that alot of "classical" trolling
>is ALSO spam or abuse
Bullshit, of course. I'd expect nothing less from you.
--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Black Helicopter Repair Services, Ltd.| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
You KNOW you want one: | ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
https://signup.databasix.com | Official Proof of Purchase
===========================================================================
Re: Cleanfeed: Looking for regex expression for ....
Author: Steve Crook
Date: Fri, 03 Jun 2011 10:13
Date: Fri, 03 Jun 2011 10:13
10 lines
1651 bytes
1651 bytes
On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in Message-Id: <is9a68$u9p$1@snarked.org>: > My primary questions for posting my regex expression: > 1) Does it do what I think it should? Yes, providing you escape the @, so: /^[^\@:]*$/ > 2) Does it reject something that is valid per the RFCs/standards? Not that I can think of. It will allow some non-compliance but doesn't reject good stuff.
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Fri, 03 Jun 2011 11:49
Date: Fri, 03 Jun 2011 11:49
18 lines
2058 bytes
2058 bytes
Russ Allbery wrote: > Junior writes: > >> /* return "From: address not in Internet syntax"; */ > >> Commenting out a single line eliminates that pesky feature. > > INN is free software, so you can make whatever modifications you'd like, > and it's up to you and your peers whether they work. However, we > generally strive for RFC compliance in the version that we distribute, and > changes away from that aren't really supported. All that means is that if > you break something, you get to keep both pieces. :) I'm not really brave enough to get too creative with INN. I made that little change because someone kept requesting it and, so far, it hasn't caused too much commotion. Actually, I haven't received any complaints about his posts. Most of the discussion about this is because I can't help stirring the pot. Does that make me a troll? ;)
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Fri, 03 Jun 2011 11:53
Date: Fri, 03 Jun 2011 11:53
13 lines
1777 bytes
1777 bytes
Steve Crook wrote: > On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in > Message-Id: <is9a68$u9p$1@snarked.org>: > >> My primary questions for posting my regex expression: >> 1) Does it do what I think it should? > Yes, providing you escape the @, so: /^[^\@:]*$/ > >> 2) Does it reject something that is valid per the RFCs/standards? > Not that I can think of. It will allow some non-compliance but doesn't > reject good stuff. That regex is looking for an email *or* URL?
Re: Cleanfeed: Looking for regex expression for ....
Author: Steve Crook
Date: Fri, 03 Jun 2011 12:32
Date: Fri, 03 Jun 2011 12:32
6 lines
1579 bytes
1579 bytes
On Fri, 3 Jun 2011 11:53:41 +0000 (UTC), Junior wrote in Message-Id: <201106031153.UTC.isai05$7qr$2@tioat.net>: > That regex is looking for an email *or* URL? Neither really, it just checks for the presence of an '@' or a ':'. If one of those chars doesn't exist, the regex matches.
Re: Cleanfeed: Looking for regex expression for ....
Author: Russ Allbery
Date: Fri, 03 Jun 2011 16:59
Date: Fri, 03 Jun 2011 16:59
38 lines
2820 bytes
2820 bytes
Junior writes:
> Russ Allbery wrote:
>> Junior writes:
>>> /* return "From: address not in Internet syntax"; */
>>> Commenting out a single line eliminates that pesky feature.
>> INN is free software, so you can make whatever modifications you'd
>> like, and it's up to you and your peers whether they work. However, we
>> generally strive for RFC compliance in the version that we distribute,
>> and changes away from that aren't really supported. All that means is
>> that if you break something, you get to keep both pieces. :)
> I'm not really brave enough to get too creative with INN. I made
> that little change because someone kept requesting it and, so far,
> it hasn't caused too much commotion.
The check has always been pretty half-assed anyway, so I'm not horribly
surprised. :)
> Actually, I haven't received any complaints about his posts. Most of the
> discussion about this is because I can't help stirring the pot. Does
> that make me a troll? ;)
Oh, probably. :)
I don't understand why people are unwilling to put a something.invalid
e-mail address in their posts to make them RFC-compliant, given that it
changes nothing about the e-mail behavior and it's trivial. But since
omitting the address entirely also doesn't make anything about the e-mail
behavior worse, I have a hard time getting too worked up about 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: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Fri, 03 Jun 2011 21:17
Date: Fri, 03 Jun 2011 21:17
30 lines
2691 bytes
2691 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrniuhctk.47d.steve@news.mixmin.net... > On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in > Message-Id: <is9a68$u9p$1@snarked.org>: > > > My primary questions for posting my regex expression: > > 1) Does it do what I think it should? > Yes, providing you escape the @, so: /^[^\@:]*$/ Needing to escape the "@" escaped me! Fixing... ;-) > > 2) Does it reject something that is valid per the RFCs/standards? > Not that I can think of. It will allow some non-compliance but doesn't > reject good stuff. I figured that other rules and expressions will catch other bad stuff. I just wanted to make certain that this wasn't catching something that it shouldn't. <Junior> wrote in message news:201106031153.UTC.isai05$7qr$2@tioat.net... > That regex is looking for an email *or* URL? By specifying both "@" and ":", yes, I am looking for either a mailbox address or a URL that contains a scheme component. However, technically, this is being applied to fields where ONLY mailboxes are permitted. I'm being nice in permitting URLs too (and where they technically are not permitted).
Re: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Fri, 03 Jun 2011 21:22
Date: Fri, 03 Jun 2011 21:22
17 lines
2221 bytes
2221 bytes
"D. Stussy" <spam+newsgroups@bde-arc.ampr.org> wrote in message news:isbj0q$3uc$1@snarked.org... > "Steve Crook" <steve@mixmin.net> wrote in message > news:slrniuhctk.47d.steve@news.mixmin.net... > > On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in > > Message-Id: <is9a68$u9p$1@snarked.org>: > > > > > My primary questions for posting my regex expression: > > > 1) Does it do what I think it should? > > Yes, providing you escape the @, so: /^[^\@:]*$/ > > Needing to escape the "@" escaped me! Fixing... ;-) Actually, in thinking about perl, does the at-sign need to be escaped here by a blackslash? Isn't that only needed when it's followed by a letter?
Re: Cleanfeed: Looking for regex expression for ....
Author: Ralf Döblitz
Date: Sun, 05 Jun 2011 15:58
Date: Sun, 05 Jun 2011 15:58
45 lines
4055 bytes
4055 bytes
In news.software.nntp D. Stussy <spam+newsgroups@bde-arc.ampr.org> wrote: > "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> wrote in message > news:isbj0q$3uc$1@snarked.org... >> "Steve Crook" <steve@mixmin.net> wrote in message >> news:slrniuhctk.47d.steve@news.mixmin.net... >> > On Thu, 2 Jun 2011 17:34:42 -0700, D. Stussy wrote in >> > Message-Id: <is9a68$u9p$1@snarked.org>: >> > >> > > My primary questions for posting my regex expression: >> > > 1) Does it do what I think it should? >> > Yes, providing you escape the @, so: /^[^\@:]*$/ >> >> Needing to escape the "@" escaped me! Fixing... ;-) > > Actually, in thinking about perl, does the at-sign need to be escaped here > by a blackslash? Isn't that only needed when it's followed by a letter? man perlvar: | Technical Note on the Syntax of Variable Names |[...] | Perl variable names may also be a sequence of digits or a single | punctuation or control character. These names are all reserved for | special uses by Perl; for example, the all-digits names are used | to hold data captured by backreferences after a regular expression | match. Perl has a special syntax for the single-control-character | names: It understands "^X" (caret "X") to mean the control-"X" | character. For example, the notation $^W (dollar-sign caret "W") | is the scalar variable whose name is the single character | control-"W". This is better than typing a literal control-"W" into | your program. So while today you might get away with not quoting "@:" this might become a special variable in a future release and of course anybody ignoring the reservedness of this name could use in their code, too. Personally, I prefer to always quote expressions like that because you never know when not quoting will bite you after a major perl upgrade. Or do you comlöetely reevaluate and test *all* of your code when a new perl version with at least one incompatible change is released? Defensive coding helps to avoid future problems. Ralf -- "de.alt.comp.kde Die Kommunistische Desktop Erweiterung." – Sven Paulus in <67hu21$43r$1@imperator.oops.sub.de>
Re: Cleanfeed: Looking for regex expression for ....
Author: Julien ÉLIE
Date: Sat, 11 Jun 2011 07:35
Date: Sat, 11 Jun 2011 07:35
18 lines
2079 bytes
2079 bytes
Hi Russ, > I don't understand why people are unwilling to put a something.invalid > e-mail address in their posts to make them RFC-compliant, given that it > changes nothing about the e-mail behavior and it's trivial. Are people really aware of that special syntax? :-) Maybe it would be up to news readers to enforce that syntax if they find out that the domain is invalid, or with a box to check by the user to mention that his address is not valid (yes, of course, the user could choose not to check the box…). -- Julien ÉLIE « Un voyage de mille lieues commence toujours par un premier pas. » (Lao Zi)
Re: Cleanfeed: Looking for regex expression for ....
Author: Russ Allbery
Date: Sat, 11 Jun 2011 19:43
Date: Sat, 11 Jun 2011 19:43
33 lines
2924 bytes
2924 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> Hi Russ,
>> I don't understand why people are unwilling to put a something.invalid
>> e-mail address in their posts to make them RFC-compliant, given that it
>> changes nothing about the e-mail behavior and it's trivial.
> Are people really aware of that special syntax? :-)
Well, it's not really a special syntax. It's the same syntax; it's just
that .invalid is a reserved top-level domain, so you can be sure that
you're not tromping on someone else's. .example would work too, but
people usually think that looks weird.
You can also just make up top-level domains, but then you run the risk
that eventually they'll be allocated.
> Maybe it would be up to news readers to enforce that syntax if they find
> out that the domain is invalid, or with a box to check by the user to
> mention that his address is not valid (yes, of course, the user could
> choose not to check the box…).
Yeah... but I'm thinking of the people who specifically go to great
lengths to omit any address and even ask detailed questions about it.
Those folks could have just used .invalid with a lot less work and
effort. :)
--
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: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Sun, 12 Jun 2011 00:31
Date: Sun, 12 Jun 2011 00:31
48 lines
3704 bytes
3704 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message news:87sjrgm9ww.fsf@windlord.stanford.edu... > Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes: > >> I don't understand why people are unwilling to put a something.invalid > >> e-mail address in their posts to make them RFC-compliant, given that it > >> changes nothing about the e-mail behavior and it's trivial. > > > Are people really aware of that special syntax? :-) > > Well, it's not really a special syntax. It's the same syntax; it's just > that .invalid is a reserved top-level domain, so you can be sure that > you're not tromping on someone else's. .example would work too, but > people usually think that looks weird. Actually, I filter for the ".example" TLD and for "example" as a 2LD for gtlds since [for the latter] the registry agreements consider example a reserved word that should not appear on the live Internet. Same with the "test" TLD, except for all TLDs including the cctlds. "Example" is allowed as a 2LD for cctlds, and "example.de" actually has a non-reserved whois entry indicating assignment. I specifically permit the ".invalid" TLD except for Reply-To and *-Complaints-To (sub-)headers which are meant to be reachable mailboxes. > You can also just make up top-level domains, but then you run the risk > that eventually they'll be allocated. One also runs the risk of the "next level" of checker - one that in the absence of ".invalid" would require a valid TLD. I kill all occurances of Micro$oft's "phx.gbl" pseudodomain on sight - Usenet, SMTP, HTTP, reverse DNS, etc., even in message-IDs. > > Maybe it would be up to news readers to enforce that syntax if they find > > out that the domain is invalid, or with a box to check by the user to > > mention that his address is not valid (yes, of course, the user could > > choose not to check the box.). > > Yeah... but I'm thinking of the people who specifically go to great > lengths to omit any address and even ask detailed questions about it. > Those folks could have just used .invalid with a lot less work and > effort. :) About half of them are trolls, thus the issue in the OP.
Re: Cleanfeed: Looking for regex expression for ....
Author: D. Stussy
Date: Fri, 17 Jun 2011 18:13
Date: Fri, 17 Jun 2011 18:13
31 lines
2384 bytes
2384 bytes
Here are my RFC-enforcement-based "bad_from" patterns for cleanfeed:
^@
<>
@\.
^[^@:]+$
@[^(, ]*\.\.
@[[:alnum:]]*@
@(.+\.)?test>?$
@.+\.phx\.gbl>?$
@(.+\.)?[0-9]*>?$
@(.+\.)?ipv6-literal\.net>?$
@(.+\.)?example(\.[a-z]{3,})?>?$
@(.+\.)?local(|host|domain|net)>?$
Explanations:
^@ - May not start with "@"
<> - No empty mailbox (or DSN)
@\. - No "@." (NULL domain element)
^[^@:]+$ - Must have "@" or ":"
@[^(, ]*\.\. - No double ".." (NULL domain element)
@[[:alnum:]]*@ - No double "@@"
@(.+\.)?test>?$ - Reserved TLD.
@.+\.phx\.gbl>?$ - Bogus Microsoft Domain.
@(.+\.)?[0-9]*>?$ - No numeric TLDs.
@(.+\.)?ipv6-literal\.net>?$ - Reserved TLD.
@(.+\.)?example(\.[a-z]{3,})?>?$ - Reserved TLDs.
@(.+\.)?local(|host|domain|net)>?$ - Reserved TLDs.
Re: Cleanfeed: Looking for regex expression for ....
Author: Junior
Date: Fri, 17 Jun 2011 22:10
Date: Fri, 17 Jun 2011 22:10
36 lines
2563 bytes
2563 bytes
D. Stussy wrote:
> Here are my RFC-enforcement-based "bad_from" patterns for cleanfeed:
>
> ^@
><>
> @\.
> ^[^@:]+$
> @[^(, ]*\.\.
> @[[:alnum:]]*@
> @(.+\.)?test>?$
> @.+\.phx\.gbl>?$
> @(.+\.)?[0-9]*>?$
> @(.+\.)?ipv6-literal\.net>?$
> @(.+\.)?example(\.[a-z]{3,})?>?$
> @(.+\.)?local(|host|domain|net)>?$
>
> Explanations:
>
> ^@ - May not start with "@"
><> - No empty mailbox (or DSN)
> @\. - No "@." (NULL domain element)
> ^[^@:]+$ - Must have "@" or ":"
> @[^(, ]*\.\. - No double ".." (NULL domain element)
> @[[:alnum:]]*@ - No double "@@"
> @(.+\.)?test>?$ - Reserved TLD.
> @.+\.phx\.gbl>?$ - Bogus Microsoft Domain.
> @(.+\.)?[0-9]*>?$ - No numeric TLDs.
> @(.+\.)?ipv6-literal\.net>?$ - Reserved TLD.
> @(.+\.)?example(\.[a-z]{3,})?>?$ - Reserved TLDs.
> @(.+\.)?local(|host|domain|net)>?$ - Reserved TLDs.
I curious if multi-byte character sets in the mailbox address part
of a From header would match any of those. It's getting common to
see UTF-8 and other encodings in the name or pseudonym part but what
about in the address part? There's a rumor that non-ascii based
domains exist so I would guess that email addresses would too.
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