Thread View: news.software.readers
4 messages
4 total messages
Started by VanguardLH
Sun, 15 Mar 2009 21:59
[Dialog] Testing on From fails but Header (for From) works?
Author: VanguardLH
Date: Sun, 15 Mar 2009 21:59
Date: Sun, 15 Mar 2009 21:59
56 lines
3125 bytes
3125 bytes
Say there is a post where the From header is:
From: "name" <username at userdomain>
I have a filter to flag those posts as ignored, which is:
!ignore From {\b<username\b}
Doesn't work. Even when I run the filters manually, this poster's
article is not flagged. I tried removing the first \b, as in:
!ignore From {<username\b}
but that didn't help. So I changed the filter to:
!ignore Header {^From:.*\b<username\b}
but that doesn't work. So I removed the first \b and used:
!ignore Header {^From:.*<username\b}
and that worked. Huh? Doesn't testing on the From header also include
the checking on address field in that header, or does it only test on
the comment field (i.e., From: "comment" <address>)? And why would
including the leading whitespace (which is there in the header) not
work? It's there in the header.
- Testing on the From header doesn't work when checking against the
address field in that header? I have to use Header for that?
- Why would including the leading whitespace character (which is there)
result in no match?
UPDATE:
While writing this and continuing to test, I realized that the leading
\b won't work because < is included in the character set used to check
for the word boundary transition. I have to use \B, so my filter
became:
!ignore Header {^From:.*\B<username\b}
and that worked. So I'm down to why testing on From doesn't work
regarding not testing against the address field. The following still
doesn't work:
!ignore From {\B<username\b}
Does testing on the From field only test:
From: "comment" <address>
|_______|
on this ____|
|_______|
and not on this? _____|
Re: [Dialog] Testing on From fails but Header (for From) works?
Author: Paul B
Date: Mon, 16 Mar 2009 00:11
Date: Mon, 16 Mar 2009 00:11
19 lines
1697 bytes
1697 bytes
On Sun, 15 Mar 2009 16:59:00 -0500, VanguardLH wrote:
> Say there is a post where the From header is:
>
> From: "name" <username at userdomain>
>
> I have a filter to flag those posts as ignored, which is:
>
> !ignore From {\b<username\b}
>
> Doesn't work.
I think the <> brackets around "username" are interfering with
the boundary flag.
p.
--
using T-Bird 3.0b2 for mail, Dialog 2.0.15.84/38 for news, on
WinXPh.
Re: [Dialog] Testing on From fails but Header (for From) works?
Author: VanguardLH
Date: Mon, 16 Mar 2009 00:40
Date: Mon, 16 Mar 2009 00:40
32 lines
2434 bytes
2434 bytes
Paul B wrote:
> On Sun, 15 Mar 2009 16:59:00 -0500, VanguardLH wrote:
>
>> Say there is a post where the From header is:
>>
>> From: "name" <username at userdomain>
>>
>> I have a filter to flag those posts as ignored, which is:
>>
>> !ignore From {\b<username\b}
>>
>> Doesn't work.
>
> I think the <> brackets around "username" are interfering with
> the boundary flag.
>
> p.
That's why (under the Update section of my post) I mentioned changing
from \b to \B to detect the word boundary at the address field. So:
!ignore Header {^From:.*\B<username\b
works to find the username only in the address field of the From header.
However, I still don't see why:
!ignore From {\B<username\b}
doesn't work. The same regex that works when Header is used is the same
one used when From is used. So it appears to be a problem with the From
test not parsing into the address field of that entire header.
Re: [Dialog] Testing on From fails but Header (for From) works?
Author: Rom
Date: Mon, 16 Mar 2009 06:12
Date: Mon, 16 Mar 2009 06:12
58 lines
2647 bytes
2647 bytes
On Sun, 15 Mar 2009 16:59:00 -0500, VanguardLH wrote:
> Say there is a post where the From header is:
>
> From: "name" <username at userdomain>
Posting a MID might help.
[...]
> UPDATE:
>
> While writing this and continuing to test, I realized that the leading
> \b won't work because < is included in the character set used to check
> for the word boundary transition. I have to use \B, so my filter
<http://www.regular-expressions.info/wordboundaries.html>
> became:
>
> !ignore Header {^From:.*\B<username\b}
Using a MID of a post or the regex (sans braces) you should find the
scoring where that worked in the <date>.log files in Dialog's logs
subdirectory. I think it's useful to look at the Scoring lines.
> and that worked. So I'm down to why testing on From doesn't work
> regarding not testing against the address field. The following still
> doesn't work:
>
> !ignore From {\B<username\b}
>
> Does testing on the From field only test:
>
> From: "comment" <address>
> |_______|
> on this ____|
> |_______|
> and not on this? _____|
No. You can see what's tested by successfully scored lines in the
logs, or "Settings > Show status window" for the current session.
If the From header is as per your above example (obtained from the raw
message or Shift+Ctrl Settings menu > Selected group/article info:
From: "name" <username at userdomain>
then I'd guess what's tested/what the log would show
(and says the From field or Header near the far right):
""\"name\"" <username at userdomain>"
or perhaps this (" and spaces between <>):
""\"name\"" <"username "at userdomain>"
--
Rom
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