[PATCH] experimenting with new parsing rules
Matthias Andree
matthias.andree at gmx.de
Mon Sep 15 12:42:17 CEST 2003
David Relson <relson at osagesoftware.com> writes:
> If you're interested in experimenting with Michael's parsing rules, I
> have attached patch that can enable/disable them using environment
> variable BOGOTEST. Sample uses would be:
>
> BOGOTEST=0 bogolexer -p < message > 0.out
> BOGOTEST=1 bogolexer -p < message > 1.out
>
> where BOGOTEST=0 gives the current results and BOGOTEST=1 uses Michael's
> rules. I often run with redirected stdout (as shown above) so I can run
> "gtkdiff 0.out 1.out" to see what's different.
Looks broken, from bogofilter -vvv:
"List-Help" 34 0.176101 0.024000 0.120026 +
"List-Post" 34 0.176101 0.024000 0.120026 +
"List-Subscribe" 34 0.176101 0.024000 0.120026 +
"List-Unsubscribe" 34 0.176101 0.024000 0.120026 +
These should have been tagged.
"rtrn:ESMTP" 0 0.000000 0.000000 0.415000 -
"rtrn:MET" 0 0.000000 0.000000 0.415000 -
"rtrn:Mon" 0 0.000000 0.000000 0.415000 -
"rtrn:NETSYS.COM" 0 0.000000 0.000000 0.415000 -
"rtrn:POP3" 0 0.000000 0.000000 0.415000 -
This tag is wrong, these are from Received: headers, not from a reverse
path header such as Return-Path:.
Sorry, I don't have the time to investigate this further now.
> Actually, BOGOTEST is bit coded with 1 enabling the modified rules and 2
> enabling the lexer's debug mode (so one can see which rules are being
> applied).
Not quite. Here's a fix, replace this function in lexer_v3.l (mind the
"& 2"):
void lexer_set_debug(int v)
{
#ifndef FLEX_DEBUG
(void) v;
#else
yy_flex_debug = v & 2;
#endif
}
--
Matthias Andree
Encrypt your mail: my GnuPG key ID is 0x052E7D95
More information about the bogofilter-dev
mailing list