[hashcash] Re: procmail stuff (Re: hashcash doesn't pick the right resource during check?)
- From: Adam Back <adam@xxxxxxxxxxxxxxx>
- To: hashcash@xxxxxxxxxxxxx
- Date: Mon, 8 Mar 2004 09:02:51 -0500
OK, anyone have comments on this procmail recipe copied from Kyle's
example:
http://www.hashcash.org/procmail/
I did not test because I don't want to deliver to $DEFAULT, I just
want to not junk stuff with valid hashcash, but let the rest get to my
normal filters (mailing-lists etc).
eg I have:
:0
* ^Content-Type: text/html
junk-html
:0
* ^From: .*@(hermes.com.cn|163.net|263.net|192.com|china.com|21cn.com)
junk
# then mailing lists:
:0
* ^X-list: hashcash
hashcash
# then stuff to me:
:0
*
^TO.*(adam@xxxxxxxxxxxxxxx|adam@xxxxxxxxxxxxxxx|adam@xxxxxxxxxxxxxx|@hashcash.org|adam@xxxxxxx|@chamness.org)
mbox
and the rest (not matching lists and not to me) goes in junk the
DEFAULT mail file.
btw This means I am trashing Bcc's. But I've found trashing Bcc's and
Content-type: html (any html content) works suprisingly well ;-)
So probably what I want to do is make the junk processing stuff only
get executed if there is no hashcash. How would I do that?
Adam
On Mon, Mar 08, 2004 at 12:53:26AM -0500, Adam Back wrote:
> We should make a procmail howto / example from this. Would marginally
> simpler if -r took multiples and/or wildcards.
>
> btw your match for the target string is wrong. you have [0-9a-f]+
>
> The reference implementation uses that lowercase hex, but basically
> according to the internet-draft it can be any 7-bit printable,
> non-whitespace and non : symbol. There are other implementations for
> example that use base64.
>
> I'll use this too as I use procmail also with mutt, cool!
>
> Adam
>
> On Sun, Mar 07, 2004 at 08:35:52PM -0600, Kyle Hasselbacher wrote:
> > 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
- Follow-Ups:
- [hashcash] Re: procmail stuff
- From: Kyle Hasselbacher
- References:
- [hashcash] hashcash doesn't pick the right resource during check?
- From: Kyle Hasselbacher
- [hashcash] procmail stuff (Re: hashcash doesn't pick the right resource during check?)
- From: Adam Back
Other related posts:
- » [hashcash] procmail stuff (Re: hashcash doesn't pick the right resource during check?)
- » [hashcash] Re: procmail stuff (Re: hashcash doesn't pick the right resource during check?)
- [hashcash] Re: procmail stuff
- From: Kyle Hasselbacher
- [hashcash] hashcash doesn't pick the right resource during check?
- From: Kyle Hasselbacher
- [hashcash] procmail stuff (Re: hashcash doesn't pick the right resource during check?)
- From: Adam Back