Thanks for the info but I don't use ColdFusion.  I tried using the VB script
and then copying the file to a different name, but it's still formatted
incorrectly.

I really like William's list and will try and find some reasonable way to
automate the download on a weekly basis that results in a usable file.

If it was FTP it would be easy, but I don't know how to do it via HTTP.

-Joe
----- Original Message ----- 
From: "Matt Robertson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 07, 2004 7:27 PM
Subject: Re: [IMail Forum] Ipswitch's URL Blacklist


> I had the same problem and, if you're using ColdFusion, the code right
> after my sig will fix it.
>
> The file is, at a guess, not in Windows format.  What I did was read
> it, the put it into server memory and write it all over again.  The
> way CF writes the file makes Imail happy.  The whole routine takes
> about 5 seconds to run and I'm certain with only a little more effort
> I can build it differently so the lines aren't written one at a time
> like this.  Still, it runs fast enough that I'm happy for now.
>
> This routine also adds in my own blacklist entries, which, since I
> rely on an external system, is a mighty short list.  Still if you use
> CF you can use this as the basis to build your own supplementer.  It
> doesn't bother with a dupe check as, again, I only have a few entries.
>
> -- 
> --Matt Robertson--
> MSB Designs, Inc.
> mysecretbase.com
>
> <cfset destinationPath="d:\foo\imail\">
> <cfhttp
> url="http://www.vantekcommunications.com/spam/url-domain-bl.txt";
> method="GET"
> path="#destinationPath#"
> file="url-domain-bl.txt"
> resolveurl="false"
> useragent="mysecretbase.com Imail AntiSpam"
> timeout="45"
> port="80">
> <cfscript>
> /*
>  since my blacklist is pretty short, I can just build it
>  into an array right here.  Make the first element in the
>  array a newline.  In the future I can just add elements
>  to this array to build my own blacklist.
> */
> myBlackList=ArrayNew(1);
> myBlackList[1]="chtah.com";
> myBlackList[2]="dailyinbox.com";
> myBlackList[3]="fsonline.com";
> myBlackList[4]="top-sites.com";
> myBlackList[5]="sheck-buy.com";
> myBlackList[6]="hotproductoutlet.com";
> myBlackList[7]="fbnsvr.com";
> myBlackList[8]="funbenefits.com";
> myBlackList[9]="tamsmtp.net";
> myBlackList[10]="tam10.com";
> myBlackList[11]="nj45.com";
> myBlackList[12]="erationalnews.com";
> myBlackList[13]="host59.erationalnews.com";
> myBlackList[14]="mail.erationalnews.com";
> </cfscript>
> <!--- 
> insert a wait of 1 second to make sure the file has time
> to write itself to disk.
> --->
> <cfset createObject('java','java.lang.Thread').sleep(1000)>
> <!--- 
> read the blacklist file back so we can loop over it
> --->
> <cffile
> action="read"
> file="#destinationPath#url-domain-bl.txt"
> variable="theBlackList">
> <!--- 
> wipe the original file (!)
> --->
> <cffile
> action="write"
> file="#destinationPath#url-domain-bl.txt"
> output=""
> addNewLine="no">
> <!--- 
> loop over the imported file, one line at a time
> --->
> <cfloop
> list="#theBlackList#"
> index="FileItem"
> delimiters="#chr(13)##chr(10)#">
> <!--- 
> Write it to disk all over again, one line at a time
> I should probably try just writing it in one shot.
> --->
> <cffile
> action="append"
> file="#destinationPath#url-domain-bl.txt"
> output="#FileItem#"
> addNewLine="Yes">
>
> </cfloop>
> <!--- 
> loop over the list and append it to the blacklist
> --->
> <cfloop
> from="1"
> to="#ArrayLen(myBlackList)#"
> index="TheEntry">
> <cffile
> action="append"
> file="#destinationPath#url-domain-bl.txt"
> output="#MyBlackList[TheEntry]#"
> addNewLine="Yes">
> </cfloop>
> <html><head><title></title></head>
> <body>Done</body></html>
>
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to