[hashcash] Hashcash and ColdFusion
- From: Anders Green <anders@xxxxxxxxx>
- To: hashcash@xxxxxxxxxxxxx
- Date: Thu, 14 Oct 2004 09:11:09 -0400
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 user@xxxxxxxxx"
variable="hashCashResult"
timeout="5">
</CFEXECUTE>
<CFCATCH type="Any">
<CFSET hashCashResult="">
</CFCATCH>
</CFTRY>
<CFMAIL
TO="user@xxxxxxxxx"
FROM="me@xxxxxxxxxx"
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
Cheers all,
Anders
+===========================================================+
|Anders Green Email: anders@xxxxxxxxx |
| Home: 919.303.0218 |
| Off Road Rally Racing Team: http://linaracing.com/ |
+===========================================================+
- Follow-Ups:
- [hashcash] Re: Hashcash and ColdFusion
- From: Adam Back
- References:
- [hashcash] Eudora (Win) integration?
- From: Anders Green
Other related posts:
- » [hashcash] Hashcash and ColdFusion
- » [hashcash] Re: Hashcash and ColdFusion
<CFTRY> <CFEXECUTE name="c:\hashcash.exe" arguments="-mb22 user@xxxxxxxxx" variable="hashCashResult" timeout="5"> </CFEXECUTE>
<CFMAIL TO="user@xxxxxxxxx" FROM="me@xxxxxxxxxx" SUBJECT="Password Reminder" > Hello user, The password for your account is: some_password
- [hashcash] Re: Hashcash and ColdFusion
- From: Adam Back
- [hashcash] Eudora (Win) integration?
- From: Anders Green