Re: Pure Python implementation of hashcash v.1

"David Mertz, Ph.D." <[email protected]>
Newsgroups gmane.mail.spam.hashcash
Message-ID <[email protected]>
On Sep 24, 2004, at 2:36 PM, Eric S. Johansson wrote:
>> I also check and write email on my Powerbook, with OSX and using 
>> Mail.app.  Anyone know if anyone has figured out how to interface 
>> with Mail.app, it would certainly be nice to get hashcash integration 
>> there.

> well, you could take my hacks on smtpd.py and the postfix stamping 
> filter interface code and build yourself a stamping proxy.  On the 
> other hand, I have been intending to create a version of Camram that 
> runs on client side machines and the mac is the most likely candidate.

Yeah, a proxy is a possibility.  But it just seems so *fugly*!  Adding 
a X-Hashcash: header doesn't have anything to do with the 
SMTP/IMAP/sendmail/whatever interface; it's just a text processing task 
on an email message.

Ideally, a mailer should just be able to post-process a message before 
sending it (using all the network interface code already built into the 
mailer.  Many *nix mailer let you specify an arbitrary filter for 
outgoing messages... but MacOSX isn't targeted this way, unfortunately 
(I understand novices don't want to be confused by that, but a buried 
preference wouldn't hurt them).  Likewise, MUAs should be able to 
filter using an arbitrary external utility.

FWIW, I will write a utility 'add_hashcash_stamps.py' that will simply 
take an rfc2822 message on STDIN, and write one with added headers on 
STDOUT.  I reckon this utility will optionally use an external compiled 
minter (e.g. hashcash.exe) for speed, but use my hashcash.py if one is 
not available.  Not sure the best way to configure the name/switches  
of the external tool, but I'll decide on something.

I guess while I'm at it, I might also do 'check_hashcash_stamp.py' that 
takes an rfc2822.  This is a little tricker in a way though.  How do 
you know whether a resource in an X-Hashcash: header is one you want to 
accept?  For example, I use many different email addresses within my 
'gnosis.cx' domain (for various contacts).  In principle, I might 
accept a stamp with any of these resources, since I'll accept email to 
any of the addresses.  But there are actually infinitely many resources 
I might accept inside a stamp (subject to it really having the right 
bits, date, etc).  Then again, I don't want to accept just any 
resource... for example, what if a spammer CC:'s herself, and produces 
a valid stamp only for her own email address?

Yours, David...

P.S. If someone else has -already- written good 'check_hashcash_stamp' 
and 'add_hashcash_stamp' command-line utilities, let me know.  I don't 
necessarily need to duplicate the work, even if those others aren't in 
Python.
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.