[hashcash] Re: hashcash integration on MTA level for postfix

  • From: decoder <decoder@xxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Fri, 18 Aug 2006 21:05:19 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dr Adam Back wrote:
> Hi
>
> I took a look at your hashcash postfix filter.  And I looked again
> at hc-sendmail http://www.hashcash.org/mail/mua/hc-sendmail/
>
> after looking at how they work, hashcash-sendmail seems quite
> similar in some ways to your postfix filter.
>

There seems a big difference though, hc-sendmail is not implemented in
the MTA itself (in sendmail called "milter"). My plugin runs
completely invisible for the user and every outgoing mail that passes
through the mail server gets a stamp. The Bcc: problem was solved by
modifying the plugin to only add stamps for To: and Cc: receipients.

> hc-sendmail delivers by invoking sendmail when its finished adding
> stamps.  (However it creates stamps as a background task, and
> delivers them back to sendmail later; in the mean time it'll return
>  immediately).  I see you also invoke sendmail, but do it in the
> foreground if I read it right.  (Actually hc-sendmail manages a
> queue of tasks, to avoid more than one hashcash minter running at
> once, if one is already running it queues the rest).

I do not invoke sendmail. The sendmail command is used to requeue the
mail in postfix (it is part of postfix), it has nothing to do with the
'real' sendmail and this is the common use of a content_filter. The
mail gets to the filter, and you have to reinject it into the queue.
That is being done with the sendmail command.

>
> The difference is in the logic used to decide whether to mint a
> stamp or not -- in hc-sendmail case it always makes a stamp, in
> your case you have to avoid making stamps for other people which
> you by examining the Received headers.

Yea, I am examining sender and received headers, but you can as well
avoid that by using a seperate smtp port in postfix for stamping.

>
> What about the calling api I guess teh filter api is a little bit
> different to sendmail invocation, but not that much I think?
>
> There is also Tom Ruddicks hashcash-filter which does foreground
> hashcash minting.  Maybe that has even closer similarities -- there
>  the difference would be just the command line API (sendmail-like
> vs postfix-filter api) and also lacking the exclusion of creating
> stamps for remote mail.
>
> All 3 are written in perl.
>
> Adam
>


Best regards

Chris :)


> On Wed, Aug 16, 2006 at 08:59:53PM +0200, decoder wrote: Hello
> there,
>
> I'm new to hashcash and noticed that there isn't much MTA support
> for it. From my point of view, starting this at MUA level is
> pointless so I wrote a content_filter for postfix which stamps all
> outgoing mails. I've put a first (alpha) version online at
>
> http://users.own-hero.net/~decoder/hashcash/
>
> The script is integrated into the master cf like every other
> content_filter, for example with these 2 lines:
>
> smtp      inet  n       -       n       -       -       smtpd -o
> content_filter=hashcash:dummy
>
> hashcash  unix  -       n       n       -       -       pipe
> flags=Rq user=hashcashuser argv=/usr/local/bin/hashcash.pl -f
> ${sender} -- ${recipient}
>
>
> It checks if the mail it currently processes is an outgoing mail
> (from field contains specified domain(s) and last Received: line
> contains an SMTP from a given list), then it stamps it and requeues
> the mail for sending.
>
> The only thing that doesn't work yet is Bcc: (All mails are
> delivered but every mail contains all hashcash headers). I am
> currently working on this, together with a major restructuring as
> this version is really ugly (proof of concept only).
>
> Hope someone has use for this :)
>
> Chris
>>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE5g9uJQIKXnJyDxURArFXAJwI3hGIefosfKp1N5YtH3PCd1ZZ1gCgv5ct
nkyx4RwYyn1E1RtF9jjlJ/g=
=hzbp
-----END PGP SIGNATURE-----


Other related posts: