procmail
[Top] [All Lists]

Re: Procmail vs perl script syntax

2006-08-15 05:27:59
From: "Ruud H.G. van Tol" <rvtol(_at_)isolution(_dot_)nl>
To: "[procmail]" <procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE>
Subject: Re: Procmail vs perl script syntax
Date: Tue, 15 Aug 2006 13:02:38 +0200

Jack Stone schreef:

> I am trying to use a procmail recipe that first runs a perl script
> to get the "remote IP" of a message, but I have a syntax error in
> the perl script. Got the script from SORBS.

This is not a Perl list, and the script is a mess anyway, so best
replace it by a pure procmail recipe, which can be as simple as:


Thanks for all of the replies on and offlist.

I did try to find the author and first sent the questions to the person that gave the script to SORBS. No anwser tho. Plus, I did wonder about the rest of the script and whether there was a more efficient way of doing this same thing.

Here is the recipe provided that calls the perl script (named origip.pl).
Obviously it is *supposed* to get the correct sending IP and check against the SORBS list.

# First, get the originating IP using the origip.pl script
TCPREMOTEIP=`origip.pl || echo 127.0.0.1`

:0
* ! ? if [ -n "$TCPREMOTEIP" ]; then rblcheck -q -s dnsbl.sorbs.net "$TCPREMOTEIP"; fi
{
:0 fhw
| formail -A "X-Suspected-Spam: RBL - BLOCKED - dnsbl.sorbs.net"

:0:
# Choose one of the three following.
$SPAMBOX
# $DEFAULT
# $NULL
}

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>