Re: tmda-1.1.8 and hashcash

[email protected] (Jason R. Mastaler)
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
"Todd A. Jacobs" <[email protected]> writes:

> and am still unclear on a few things. For example, using:
>
>     to * tag 
>        x-hashcash shell="/usr/bin/hashcash -q -m -b20 ${TMDA_RECIPIENT}"
>
> will only match when no other rule applies, right?

Right.

> Is there a way to apply outgoing message filters globally? I would
> think there might be some valid uses for doing this with other kinds
> of custom headers, too.

You'd have to add the above x-hashcash line to every one of your tag
rules, which isn't so bad since you can store all that command-line in
a macro.  Using the macro example on the wiki page, you'd add
"HASHCASH" to the end of each tag rule.

> Also, the example for incoming mail is:
>
>     pipe-headers "/usr/bin/hashcash -c -y -X -b16 -r [email protected]" accept
>
> but I'm not clear on how this would work with extension addresses and
> such.

It's been so long since I've used hashcash I'm not sure either, but I
assume it would work with extension addresses.

> Again, if there's no way to stack rules, then some variable along
> the lines of TMDA_RECIPIENT might be needed to ensure that it can match
> any valid TMDA address such as a sender or dated address.

Remember that you can reference any environment variable in your
incoming filter.  In particular, "$RECIPIENT" would probably be what
you are looking for.  Untested, but the following should probably work:

pipe-headers "/usr/bin/hashcash -c -y -X -b16 -r $RECIPIENT" accept

You should also make sure the hashcash command-line options used in
the wiki example are still valid/correct.  It was years ago when I
wrote that howto.
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.