procmail
[Top] [All Lists]

Re: What am I missing

1999-04-02 00:09:28
"Ron 'The InSaNe One' Rosson" <insane(_at_)oneinsane(_dot_)net> writes:
On Thu, Apr 01, 1999 at 04:04:25PM +0300, era eriksson wrote:

Try this:

    :0h
    TCPREMOTEIP=| origip.pl

    :0
    * TCPREMOTEIP ?? .
    * ? rblcheck -q "$TCPREMOTEIP"
    {
        LOGABSTRACT=all
        LOG="Filter: RBL-filtered address: \"$TPCREMOTEIP\"
"

Umm, you have the check backwards.  rblcheck returns success on okay
addresses, and failure on addresses matched by the RBL.  The above is
therefore the exact opposite of what you want.  Change that last
condition to:

        * ! ? rblcheck -q "$TCPREMOTEIP"


...
      The below log entries shows what happens when an RBL listed IP mail is
recieved. It is being invoked like so on the command line:
        cat rbltest | env - TCPREMOTEIP=127.0.0.2  \
        /usr/local/bin/procmail -m .jfrc

That doesn't do what you think it does: the assignment to TCPREMOTEIP
will not be seen by rblcheck, as a) it's overriden by the assignment
made by the first recipe above, and b) procmail -m strips the
environment anyway, so pulling the first recipe wouldn't even help.

If you want to check the recipes, change your test message to have the
bogus address in it's headers so it'll be extracted by the origip.pl
program.


Philip Guenther

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