procmail
[Top] [All Lists]

Re: What am I missing

1999-03-31 23:49:53
For starters, you should set up top:
        LOGFILE=some_filename
and
        VERBOSE=yes
so that you (and we) can see what's happening and what goes wrong.
For example, *is* there a $1 set for you?

At 04:41 PM 3/31/99 -0800, Ron 'The InSaNe One' Rosson wrote:
This is a procmail recipe that I am working on:

TCPREMOTEIP=`cat $1 | origip.pl`

Useless cat wastes a process; use:
 TCPREMOTEIP=`origip.pl < $1`


:0
* ! ? if [ -n "$TCPREMOTEIP" ]; then rblcheck -q "$TCPREMOTEIP"; fi{

Uh, are you trying to see if TCPREMOTEIP is non-zero length as in test -n?
(It would also help if you say what you think you're trying to do).

If so, then try:
        :0
        TCPREMOTEIP ?? .
as your condition.

Anyway, syntactically "{" must start an action line, and be followed
by at least one space, tab or newline (see the man page on procmailrc).

      EXITCODE=0      # Not Sure what to have here

Not sure why you are setting it at all.

      LOGABSTRACT=all
      LOG="Filter: RBL-filtered address: \"$TCPREMOTEIP\"
"
      :0 :
      |formail -i "X-RBL-Filtered-Address: $TCPREMOTEIP" >> $FILTER_FOLDER
}

What happens is rblcheck checks remoteip and then if it is listed I want
to move the message to a Mailfolder specifically for or SUSPECTED SPAM. 

Okay, how about something like just:
        TCPREMOTEIP=`origip.pl < $1`

        :0
        TCPREMOTEIP ?? .
        {
          LOGABSTRACT=all
          LOG="...put whatever you like here...
        "
          :0:
          |formail -i "X-RBL-Filtered-Address: $TCPREMOTEIP" >> $FILTER_FOLDER
        }
(assuming you've set FILTER_FOLDER up top as well).

If it is not listed I want it to remain for normal reading.

When TCPREMOTEIP is empty, the above should fall through, either to
other recipes or $DEFAULT.

What I am 
getting now is either <With Tweaking> either **Bounced** in the log and 
no sign of the message or all messages goto the Folder of SUSPECTED SPAM.

Well, the only times I've gotten **Bounced**, if I remember correctly,
I've had a really messed-up recipe or .procmailrc.  That could be due
to your placement of {}; I'm not really sure of the exact cause though.

Anyone have any ideas or corrections for me. The system is running sendmail.

Hope that helps a bit, anyway.  Posting log output from VERBOSE really
will help people to help you.

Cheers,
Stan

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