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

Cormack, Ken Ken.Cormack at roadway.com
Wed Jun 22 13:57:20 EDT 2005


-----Original Message-----
From: Cormack, Ken 

::snip::
> But if the database contains "multiple.words.together" and an email has
the subject "this.subject.includes.multiple.words.together", it will not
block.

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.  (For example, subjects containing "v i a g r a" would not
be flagged by the same word in my database.

	my key="partial key";
	my $value;

	my $search;
	for(search=$mydb->set($key,$value,R_CURSOR);$search==0;
		search=mydb_>set($key,$value,R_NEXT);
		print("$key -- $value");

Ken



More information about the MIMEDefang mailing list