Hashcash and ColdFusion

Anders Green <[email protected]>
Newsgroups gmane.mail.spam.hashcash
Message-ID <[email protected]>
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

Cheers all,
Anders
+===========================================================+
|Anders Green                 Email: [email protected]       |
|                              Home: 919.303.0218           |
|        Off Road Rally Racing Team: http://linaracing.com/ |
+===========================================================+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.