procmail
[Top] [All Lists]

Procmail and rbl.maps.vix.com

1998-01-27 12:14:28
Hi,

I found a wonderful tool called "rblcheck":

(http://www.xnet.com/~emarshal/rblcheck/)

that allows the anti-spam feed from vix.com to be implemented in a
procmail recipe.  This lets you filter your mail based on a real-time
updated list on a user-by-user basis.  The only problem I'm having is
getting it to work with procmail as the local mailer under sendmail 8.8.8.

In the docs, this is the example.  It is assumed you are using mail.local
to deliver and that you call procmail out of a .forward.  Can anyone
rework this for procmail? 

[...]

Currently, in your sendmail.cf file, you'll probably something like:

Mprog,  P=/bin/sh, F=lsDFMoeu, S=10/30, R=20/40, D=$z:/,
       T=X-Unix,
       A=sh -c $u

This is the local delivery rule used to execute .forward scripts.  Your
system might use something like "rsh" or another restricted shell instead
of "sh" for running programs. Don't let that scare you.

Change the above lines to look like:

Mprog,  P=/usr/bin/env, F=lsDFMoeu, S=10/30, R=20/40, D=$z:/,
       T=X-Unix,
       A=env TCPREMOTEIP="${client_addr}" sh -c $u

The procmail recipe:

:0
* ? rblcheck -q $TCPREMOTEIP
{
       EXITCODE=100
       LOGABSTRACT=all
       LOG="Filter: address \"$TCPREMOTEIP\" is RBL-filtered
"
       :0:
       $FILTERFOLDER
}


[...]

I've tried simply setting this up like so under the "Mlocal" definition:

Mlocal, P=/usr/local/bin/procmail, F=SAw5:|/@glDFMPhsfn, S=10/30, R=20/40,
         T=DNS/RFC822/X-Unix,D
         A=env TCPREMOTEIP="${client_addr}" procmail -Y -a $h -d $u

In my procmail log, I see that the $TCPREMOTEIP variable is not being
expanded, and I get the following bounced message:

The original message was received at Tue, 27 Jan 1998 11:24:28 -0500
from super-g.com [207.240.140.161]

  ----- The following addresses had permanent fatal errors -----
<spork(_at_)clifford(_dot_)inch(_dot_)com>

  ----- Transcript of session follows -----
procmail: Unknown user "tcpremoteip=207.240.140.161"
550 <spork(_at_)clifford(_dot_)inch(_dot_)com>... User unknown

Can anyone help?  The procmail man page states that a variable can be
declared as an argument as long as it's of the form VARIABLE=whatever.

Thanks much,

Charles                 (please reply via the list and email)

~~~~~~~~~                                       ~~~~~~~~~~~
Charles Sprickman                               Internet Channel
INCH System Administration Team                 (212)243-5200
spork(_at_)inch(_dot_)com                                       
access(_at_)inch(_dot_)com






<Prev in Thread] Current Thread [Next in Thread>
  • Procmail and rbl.maps.vix.com, Charles Sprickman <=