Re: Hashcash and ColdFusion
Adam Back <[email protected]> Tue, 19 Oct 2004 06:10:17 -0400
| Newsgroups | gmane.mail.spam.hashcash |
|---|---|
| Message-ID | <[email protected]> |
Thanks for that. I put a copy of this info up here: http://www.hashcash.org/mail/web/coldfusion/ Adam On Thu, Oct 14, 2004 at 09:11:09AM -0400, Anders Green wrote: > For anyone that wants to send out mail from ColdFusion > with hashcash, it's not hard. Here's some example code: > > Didn't take much to get this working. There is > a command line executable at hashcash.org that > you can download. So, (after removing buncha > dynamic stuff for clarity here) it looks like this: > > > <CFTRY> > <CFEXECUTE > name="c:\hashcash.exe" > arguments="-mb22 [email protected]" > variable="hashCashResult" > timeout="5"> > </CFEXECUTE> > > <CFCATCH type="Any"> > <CFSET hashCashResult=""> > </CFCATCH> > </CFTRY> > > > <CFMAIL > TO="[email protected]" > FROM="[email protected]" > SUBJECT="Password Reminder" > > Hello user, > The password for your account is: some_password > > Cheers, > The Database > <CFIF Len(hashCashResult) NEQ 0> > <cfmailparam > name = "X-HashCash" > value = "#hashCashResult#" > > </CFIF> > </CFMAIL> > > Here is how much SpamAssasin adjusts the spam score based > on the number of bits used (22 in the above example) > Hashcash 20 bits -0.500 > Hashcash 21 bits -0.700 > Hashcash 22 bits -1.000 > Hashcash 23 bits -2.000 > Hashcash 24 bits -3.000 > Hashcash 25 bits -4.000 > Hashcash >25 bits -5.000