procmail
[Top] [All Lists]

Re: procmail testing return codes

1997-05-26 18:17:00
Antonomasia <ant(_at_)notatla(_dot_)demon(_dot_)co(_dot_)uk> wrote:
I'm trying to build a .procmailrc file where return codes
decide delivery addresses.  I have read the man pages, and
experimented a bit, and not really got anywhere.

Two ways to do it. I'm not sure which you would prefer.

## Method one: for codes returned by the executible to the executor
# W: wait for completion, do not give program failed errors
# i: do not give errors for pipe closed early
:0Wi
* ? the-program-here
{
        # Do something with successful results
}
:0E
{
        # Do something with UNsuccessful results
}

## Method two: for codes returned by writing to stdout
:0
* $ `the-program-here`^0
{
        # If greator than zero
}
:0E
{
        # If less than or equal zero
}

For both you may want the B flag to process the body, but I think default
is header plus body for external filters.

You can add a rule like "* -1^0" or "* +1^0" to adjust the zero point for
method two.

The particular program I want to run is called 'hashcash'
and it is intended to hinder spammers by making them perform
a computation for each mail they send to a given address.
(The computation is based on SHA-1, and is much easier to
check than to make.)
...
Hashcash is available from   http://www.dcs.ex.ac.uk/~aba/hashcash .

I fail to understand how this system will be effective. You cannot
reasonably expect all people sending you mail to hash stuff out, nor
do I see a method blocking a hash from being used for multiple
recipients. For both consider the case of a mailing list such as this.

Elijah
------
Please do not CC me when replying to the list.  It is not my responsibility to
prove to you my mail is not spam, if mail to you bounces it will not be resent.

<Prev in Thread] Current Thread [Next in Thread>