[hashcash] Re: Procmail Problem

  • From: Adam Back <adam@xxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Tue, 8 Feb 2005 18:37:44 -0500

It appears to be hashcash itself, there is something wrong with the -p
1d when checking at the same time.  It basically purges and then exits
succcess! without even looking at the stamp.

As a work around you could do: 

hashcash -p 1d -f hashcash.db && hashcash -cqXd -b24 -f 
$HOME/hashcash/hashcash.db -r testing

the fix is simple add this:

    } else { 
        ret = 1; 
    }

to hashcash.c 1199 instead of

    }

I'll put this fix into the next release plus Jonathan's fix for PPC
bug Hal reported.

Adam

On Tue, Feb 08, 2005 at 09:20:46PM +0000, Steve Crook wrote:
> Since upgrading to hashcash-1.16, I've become aware of an issue with
> hashcash not validating the token when executed through procmail.
> Unfortunately I upgraded from v1.13 so I'm not exactly sure when the
> problem was introduced, or even if it is a hashcash problem or something
> else.
> 
> Procmail Recipe:
> :0
> * ^X-Hashcash:
> * $? hashcash -cqXdp 1d -b24 -f $HOME/hashcash/hashcash.db -r testing
> | ~mail2news/bin/multipost
> 
> When I fire an Email through this recipe, I get the following log:
> procmail: Match on "^X-Hashcash:"
> procmail: Executing 
> "hashcash,-cqXdp,1d,-b24,-f,/home/mail2news/hashcash/hashcash.db,-r,testing"
> procmail: Match on "hashcash -cqXdp 1d -b24 -f 
> /home/mail2news/hashcash/hashcash.db -r testing"
> procmail: Executing " ~mail2news/bin/multipost"
> 
> The Hashcash header on the Email is:
> X-Hashcash: foobar
> 
> Nothing is logged in the hashcash.db for this message, which suggests
> that hashcash rejects the invalid header, but the procmail action is
> executed.  Any suggestions what might be causing this?

Other related posts: