You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by al...@equant.com on 2004/09/02 12:05:24 UTC

baysian filter - tokens signification

Hi all

I search the signification of the Baysian tokens eg. U* , N:HContent-type:
, 8: etc etc
Where can i find this information ?

Thanks for your help





Re: baysian filter - tokens signification

Posted by Matt Kettler <mk...@evi-inc.com>.
At 06:05 AM 9/2/2004, alain.guittot@equant.com wrote:
>I search the signification of the Baysian tokens eg. U* , N:HContent-type:
>, 8: etc etc
>Where can i find this information ?

Look at Bayes.pm, it's a strange kind of short-hand used for headers and URLs.

Disclaimer: I don't fully understand this code, but here's my best 
understanding of it. (I'm sure I've got some details wrong)

H indicates the token is a message header.
U and D are the user and domain parts of an email address.
UD is to be the domain part of a URL

: is used as a separator.

N: indicates that N is used as a wildcard for numbers in the token.
sk: stands for "skip" to indicate a long token has been truncated to a 
short one.


ie: N:HContent-type:NNNgktorpNNN

indicates it's looking for a header named Content-type, and it contains 
gktorp framed by any 3 numbers on a side

several common header names get compressed too (on a case-sensitive basis)

%HEADER_NAME_COMPRESSION = (
   'Message-Id'          => '*m',
   'Message-ID'          => '*M',
   'Received'            => '*r',
   'User-Agent'          => '*u',
   'References'          => '*f',
   'In-Reply-To'         => '*i',
   'From'                => '*F',
   'Reply-To'            => '*R',
   'Return-Path'         => '*p',
   'X-Mailer'            => '*x',
   'X-Authentication-Warning' => '*a',
   'Organization'        => '*o',
   'Organisation'        => '*o',
   'Content-Type'        => '*c',
);

So, if the above header was Content-Type, instead of Content-type it would 
have been encoded as:

N:H*c:NNNgktorpNNN