hashcash.org
home
faq
documentation
mailing-list
news
media articles
bitcoin
mail plugins 
  mua hooks 
  mfa hooks 
    procmail
  mta hooks 
  anti-spam 
  web 
blog plugins 
binaries 
source 
benchmarks
biggest stamp
developers
java applet
papers
 
web hashcash.org

hits since nov 03

using hashcash in procmail

First you will need to install the hashcash tool if it is not included with your distribution.

This came from Kyle Hasselbacher's example:

:0 * ^X-Hashcash: * $? hashcash -cqXdp 1d -b20 -f $HOME/hashcash.db -r adam@cypherspace.org $DEFAULT

which should deliver to DEFAULT anything with a valid X-Hashcash: header addressed to adam@cypherspace.org.

More advanced stuff (multiple addresses):

:0 * ^X-Hashcash: 0:[0-9]+:\/[a-zA-Z0-9_+\.-]+@(.+\.)?(hasselbacher\.org|toehold\.com) * $? hashcash -cqXdp 1d -b20 -f $HOME/hashcash.db -r '$MATCH' $DEFAULT

which should deliver to DEFAULT anything *@*.hasselbacher.org or *@*.toehold.com. The $MATCH is the stuff after the / so you can use procmail regexps to specify what email addresses are valid for you.