Re: white-black-ignore list entry syntax

"Sergio P. Cesar" <[email protected]> Sat, 5 Mar 2005 05:30:54 -0600 (CST)
Newsgroups gmane.mail.spam.active-spam-killer.general
Message-ID <[email protected]>
> On Tue, 1 Mar 2005, Sergio Cesar wrote:
>
>> Can someone tell me what was the idea in checking "from" "to" "subject"
>> in
>> the __infile block of askmessage.py?
>
>> Under what circunstance will ASK look at anything besides "from",
>
> Don't know/remember about "subject" but the  "to" field is critical
> to receive mailing-lists.
The mailing lists are checked by the "is_mailing_list_message" block based
on header match:
 re.match(".*(majordomo|listserv|listproc|netserv|owner|bounce|mmgr|autoanswer|request|noreply|nobody).*@",
self.msg.getheader("From",''), re.IGNORECASE)):

>
>> so I can properly build my database query(s)?
>
> I am afraid I don't see the point of using a database to store regex
> patterns.  Don't you have to match any incoming message against all
> patterns anyway ?
Not really, If we properly build a set of queries to check the
possibilities, I think the database could be faster in an setup with LOTS
of entries in the list (ie: global company white/black list), regex would
have to check all entries and a db query should return a single response.
(yes || no)
At the moment I can think of 3 queries only in this order:
1- an exact match on a wildcard domain, *.domain.name
2- word or frase match anywhere in the subject line.
3- Exact macth on an email address

With a database we only need a single indexed entry for an address for all
users and all domains hosted. The individual user list will have a single
index hopefully smaller in lenght and faster to search.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click