I'd recommend creating a 2nd table to hold subject strings and using it for comparison 
instead of the chain of or's... 

SELECT   distinct  spam.Subject
FROM       Spam, spam_headers 
WHERE     spam.DomainChecked = 0 
AND spam.subject like '%' + spam_headers.subject + '%'

other than that not a bad idea. :) 

------ Original Message ------ 
From: [EMAIL PROTECTED] (Michael Dinowitz)
To: CF-Community <[EMAIL PROTECTED]>
Sent: Aug 20, 2003 11:21 AM
Subject: Re: Clean off

>I'm assuming everyone is covered by spam at the moment can can't post. If so,
>how about using CF to do your cleanup for you. Use CFPOP to get all the headers
>from your mail box (or maybe the first 20-50 at a time) and then run this
>against the returned query:
>SELECT     Subject
>FROM         Spam
>WHERE     (DomainChecked = 0) AND (Subject LIKE '%Thank you%' OR
>                      Subject LIKE '%Approved%' OR
>                      Subject LIKE '%Details%' OR
>                      Subject LIKE '%Wicked screensaver%' OR
>                      Subject LIKE '%movie%' OR
>                      Subject LIKE '%your application%' OR
>                      Subject LIKE '%attachment%' OR
>                      Subject LIKE '%failure%' OR
>                      Subject LIKE '%failed%' OR
>                      Subject LIKE '%returned%' OR
>                      Subject LIKE '%virus%')
>ORDER BY Subject
>Anything that comes back can be routed to the screen so you can view the subject
>and other info. If its spam, just tell CFPOP to delete it. Saves on the
>downloading and can even be automated more.
>If you have access to your mail server, I've got an additional script suggestion
>that'll do the job automatically by detecting any mail files with viruses in
>them. Just needs CF, CFDIRECTORY, a CFX and a CFIF.
>
>Michael Dinowitz
>Finding technical solutions to the problems you didn't know you had yet
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:5
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to