🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
10 messages
10 total messages Started by Steve Crook Fri, 24 Aug 2012 08:43
slrn - filtering on non-ascii
#251159
Author: Steve Crook
Date: Fri, 24 Aug 2012 08:43
18 lines
1432 bytes
Hi all,

Is there a way to score on non-ascii headers in slrn?

One such example is: From: §pamßµstèr@news.ca
                     (MID: <I3yZr.934$4Z6.613@newsfe07.iad>)

Ideally I'd like to score in two ways:-
Generically; the From header contains non-ascii.
Specifically; the address in the From header.

Cheers,
Steve

-- 
What shall we use 
To fill the empty spaces 
Where we used to talk?
Re: slrn - filtering on non-ascii
#251157
Author: Salvatore
Date: Fri, 24 Aug 2012 15:07
27 lines
1871 bytes
On 2012-08-24, Steve Crook <steve@mixmin.net> wrote:
> Is there a way to score on non-ascii headers in slrn?
>
> One such example is: From: §pamßµstèr@news.ca
>                      (MID: <I3yZr.934$4Z6.613@newsfe07.iad>)

The regular expression library used doesn't have Unicode support, but
you can build a filter that looks for headers that only contain ASCII
characters, then negate that regex.

Here's an example:

--- begin News/Score ---

[misc.test]
	Score: -999
	~From: ^[ -~]*$

---  end News/Score  ---

Let me know if that works.

-- 
Blah blah bleh...

GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++
Re: slrn - filtering on non-ascii
#251160
Author: Steve Crook
Date: Fri, 24 Aug 2012 18:11
31 lines
1873 bytes
On Fri, 24 Aug 2012 15:07:17 +0000 (UTC), Salvatore wrote in
Message-Id: <k185b5$1oj3$1@yojimbo.hack>:

> The regular expression library used doesn't have Unicode support, but
> you can build a filter that looks for headers that only contain ASCII
> characters, then negate that regex.
>
> Here's an example:
>
> --- begin News/Score ---
>
> [misc.test]
> 	Score: -999
> 	~From: ^[ -~]*$
>
> ---  end News/Score  ---
>
> Let me know if that works.

Hi Salvatore,

I couldn't get it to work.  My guess is that [ -~] isn't recognized as a
valid range of chars.  I don't think s-lang supports hexadecimal
notation either so that approach is out.  Doing ^[all_ascii_chars]+$
would probably work but that doesn't help with scoring on specific,
non-ascii addresses.

-- 
What shall we use 
To fill the empty spaces 
Where we used to talk?
Re: slrn - filtering on non-ascii
#251158
Author: Salvatore
Date: Fri, 24 Aug 2012 18:40
16 lines
1936 bytes
On 2012-08-24, Steve Crook <steve@mixmin.net> wrote:
> I couldn't get it to work.  My guess is that [ -~] isn't recognized as a
> valid range of chars.  I don't think s-lang supports hexadecimal
> notation either so that approach is out.  Doing ^[all_ascii_chars]+$
> would probably work but that doesn't help with scoring on specific,
> non-ascii addresses.

What does your scorefile look like right now? Also, let me know what
version of slrn you're using. The negated regular expression worked for
me when I tested it.

-- 
Blah blah bleh...

GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++
Re: slrn - filtering on non-ascii
#251162
Author: Steve Crook
Date: Fri, 24 Aug 2012 19:01
29 lines
1862 bytes
On Fri, 24 Aug 2012 18:40:13 +0000 (UTC), Salvatore wrote in
Message-Id: <k18hqd$1uen$1@yojimbo.hack>:

> What does your scorefile look like right now? Also, let me know what
> version of slrn you're using. The negated regular expression worked for
> me when I tested it.

My apologies!

I renamed my existing scorefile and created a new one using nothing but
that expression:

Score: 10
    ~From: ^[ -~]*$

I'll do some debugging as to why it didn't work in combination with my
existing scorefile.

Current versions are:
slrn pre1.0.0-40
        * Note: This version is a developer preview.
S-Lang Library Version: 2.2.4
Compiled on: May 10 2012 10:58:28
Operating System: Linux

-- 
What shall we use 
To fill the empty spaces 
Where we used to talk?
Re: slrn - filtering on non-ascii
#251161
Author: Salvatore
Date: Fri, 24 Aug 2012 19:16
38 lines
2376 bytes
On 2012-08-24, Steve Crook <steve@mixmin.net> wrote:
> On Fri, 24 Aug 2012 18:40:13 +0000 (UTC), Salvatore wrote in
> Message-Id: <k18hqd$1uen$1@yojimbo.hack>:
>
>> What does your scorefile look like right now? Also, let me know what
>> version of slrn you're using. The negated regular expression worked for
>> me when I tested it.
>
> My apologies!
>
> I renamed my existing scorefile and created a new one using nothing but
> that expression:
>
> Score: 10
>     ~From: ^[ -~]*$
>
> I'll do some debugging as to why it didn't work in combination with my
> existing scorefile.
>
> Current versions are:
> slrn pre1.0.0-40
>         * Note: This version is a developer preview.
> S-Lang Library Version: 2.2.4
> Compiled on: May 10 2012 10:58:28
> Operating System: Linux
>

The scorefile ought to support that regular expression on your client. I
tried it on my client and it works.

Try indenting the "Score: 10" line, and make sure that there's a line
right above the rule that says something like "[alt.*]".

-- 
Blah blah bleh...

GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++
Re: slrn - filtering on non-ascii
#251163
Author: Shmuel Metz
Date: Fri, 24 Aug 2012 20:53
17 lines
2346 bytes
In <slrnk3efls.tt1.steve@snorky.mixmin.net>, on 08/24/2012
   at 08:43 AM, Steve Crook <steve@mixmin.net> said:

>Is there a way to score on non-ascii headers in slrn?

Do you mean only octets above 127, or do you also want to catch RFC
2047 encoding of non-ASCII charaters? I'm not sure that SLRN supports
the latter.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: slrn - filtering on non-ascii
#251164
Author: Salvatore
Date: Sat, 25 Aug 2012 00:16
15 lines
1774 bytes
On 2012-08-24, Shmuel Metz <spamtrap@library.lspace.org.invalid> wrote:
> Do you mean only octets above 127, or do you also want to catch RFC
> 2047 encoding of non-ASCII charaters? I'm not sure that SLRN supports
> the latter.

slrn decodes the headers on the fly. It doesn't matter whether a header
is encoded in base64, quoted-printable or raw 8-bit.

This is why I'm surprised that the regex "^[ -~]*$" doesn't work.

-- 
Blah blah bleh...

GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++
Re: slrn - filtering on non-ascii
#251165
Author: Mike Easter
Date: Sat, 25 Aug 2012 00:25
25 lines
1770 bytes
Shmuel wrote:
> Steve Crook said:
>
>> Is there a way to score on non-ascii headers in slrn?
>
> Do you mean only octets above 127, or do you also want to catch RFC
> 2047 encoding of non-ASCII charaters? I'm not sure that SLRN supports
> the latter.

The message in question:

  <I3yZr.934$4Z6.613@newsfe07.iad>

http://al.howardknight.net/msgid.cgi?ID=134585365800

... does not use such a RFC 2047 MIME encoded-word^1 syntax/method in 
its use of a non-ascii header field value (actually 2 non-ascii), namely 
the From as described in the OP.


^1 syntax: =?charset?encoding?encoded text?=


-- 
Mike Easter
Re: slrn - filtering on non-ascii
#251166
Author: Steve Crook
Date: Sat, 25 Aug 2012 09:16
35 lines
2141 bytes
On Fri, 24 Aug 2012 19:16:14 +0000 (UTC), Salvatore wrote in
Message-Id: <k18jtu$1vhh$1@yojimbo.hack>:

>> My apologies!
>>
>> I renamed my existing scorefile and created a new one using nothing but
>> that expression:
>>
>> Score: 10
>>     ~From: ^[ -~]*$
>>
>> I'll do some debugging as to why it didn't work in combination with my
>> existing scorefile.
>>
>> Current versions are:
>> slrn pre1.0.0-40
>>         * Note: This version is a developer preview.
>> S-Lang Library Version: 2.2.4
>> Compiled on: May 10 2012 10:58:28
>> Operating System: Linux
>>
>
> The scorefile ought to support that regular expression on your client. I
> tried it on my client and it works.

Sorry, rushed message construction on my part.  I meant to say, "My
apologies, it does work!"

In isolation your proposed expression works fine.  It was something in
my existing scorefile that prevented it.

-- 
What shall we use 
To fill the empty spaces 
Where we used to talk?
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