[Mimedefang] FOLLOWUP Q - Using a db for subject lines to blo ck

David F. Skoll dfs at roaringpenguin.com
Wed Jun 22 14:19:01 EDT 2005

Cormack, Ken wrote:

> Searching around on the 'Net, I found the following example of  a fast
> search intended to make partial matches to a key.  Does anyone see suppose
> this might be worth trying in my subject-line function?  If my database
> contains "A.B.C.D", and a subject comes in containing "B.C", I'd like to
> flag it as a hit.

You are now converting an O(1) or possibly O(log N) database lookup
into an O(N) or possibly O(N log N) scan through the database (N is
the number of keys in the database table.)

If you're going to do that, you might as well just scan through
a text file of banned subjects rather than using a database.  Or better
yet, just write SpamAssassin rules.



More information about the MIMEDefang mailing list