[hashcash] fix for that now in 0.30 (Re: hashcash doesn't pick the right resource during check?)

Eeek!  That's a nasty over-sight.  I guess no-one ever used that
option in anger up until now.

I put up a 0.30 which fixes that problem.  I tested it, and the
example works for me now.  (I made a new example test-msg.txt in the
distribution which to test you match on the 2nd X-Hashcash header).

We need wildcards and multiple resource names (multiple -r options)
really, but that can be a job for another day...  Have to restructure
some stuff to make that happen.

Adam

On Sun, Mar 07, 2004 at 08:35:52PM -0600, Kyle Hasselbacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> So, I got an email with these headers:
> 
> X-Hashcash: 0:040308:hashcash@xxxxxxxxxxxxx:23b5befdab7293dd
> X-Hashcash: 0:040308:adam@xxxxxxxxxxxxxxx:6a8ed5496f8187d1
> X-Hashcash: 0:040308:kyle@xxxxxxxxxxx:9cbe59c1c81b0d67
> 
> ...which I believe to be correct form.  Someone correct me if I'm wrong
> since although I didn't send the mail, it was my software that formed the
> headers.  8-)

> I have procmail handling this normally, BTW.  This is the recipe I use,
> before my anti-spam measures, so that hashcashed mail can skip all the
> other filters:
> 
> # -c check
> # -q no output
> # -y valid tokens are good even if not fully checked
> # -X look for the X-Hashcash header
> # -e expiration time for tokens (default 28 days)
> # -d use a database to avoid double spending
> # -f where the double spending DB is.
> # -p purge the double spending database if it hasn't been done in that long
> # -b number of bits of work to require
> # -r "resource" to verify (e.g., kyle@xxxxxxxxxxx)
> :0
> * ^X-Hashcash: 
> 0:[0-9]+:[a-zA-Z0-9_+.-]+@(.+\.)?(hasselbacher\.org|toehold\.com):[0-9a-f]+$
> * ^X-Hashcash: 
> 0:[0-9]+:\/[a-zA-Z0-9_+.-]+@(.+\.)?(hasselbacher\.org|toehold\.com)
> * $? $HOME/bin/hashcash -c -q -y -X -e 31d -d -f $HOME/.tmda/hashcash.db -p 
> 10d -b19 -r '$MATCH'
> $DEFAULT
> 
> Thanks for your time and software!
> - -- 
> Kyle Hasselbacher | Disclaimer:  Do not add chemicals or
> kyle@xxxxxxxxxxx  |              detergents to the water.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFAS9wI10sofiqUxIQRAsuvAJ9T3S83EUgQSir8ZILAOFEIvGRehgCeIbvR
> HHxTKHP5W6CFzcwBojw7Qzk=
> =IdRR
> -----END PGP SIGNATURE-----

Other related posts: