procmail
[Top] [All Lists]

Re: procmail: Error while writing to "/_Hg3Ggsdws133"

1996-11-06 17:18:40
There is no action line for the first recipe (see marked line): There
must be an action line after the conditions of a recipe.  A blank line
doesn't work.  See the procmail errors after the "Match on"?

    > Here's my .procmailrc
    > 
    >   ##########################################################
    >   # Let's start filtering out "from"s - I wonder if I have #
    >   # to go from a black list to a white list! :-(           #
    >   ##########################################################
    >   :0 c
    >   {
    >   VERBOSE=yes
    >   :0
--> >   * ? /home/dcw/bin/checklist.pl "$SENDER" $MAILDIR/whitelist
    > 
    >   :0 E:/home/dcw/FILTER.LOCK
    >   * !^(Original-)?(Resent-)?(From|Sender):.*(root|postmaster|abuse)
    >   | (cat $MAILDIR/fromlist;  echo $SENDER) > /tmp/list; sort -u < 
/tmp/list > $MAILDIR/fromlist
    >   VERBOSE=no
    >   }
    > 
    > Here's the logfile:
    > 
    > procmail: [14994] Wed Nov  6 16:53:42 1996
    > procmail: Executing "/home/dcw/bin/checklist.pl,From: 
asp1627(_at_)is(_dot_)nyu(_dot_)edu,/home/dcw/Mail/whitelist"
    > procmail: [14994] Wed Nov  6 16:53:42 1996
    > procmail: Match on "/home/dcw/bin/checklist.pl From: 
asp1627(_at_)is(_dot_)nyu(_dot_)edu /home/dcw/Mail/whitelist"
    > procmail: Error while writing to "/_Hg3Ggsdws133"
    > procmail: Error while writing to "/"
    > procmail: Assigning "VERBOSE=no"
    > >From asp1627(_at_)is(_dot_)nyu(_dot_)edu  Wed Nov  6 16:53:30 1996
    >  Subject: test
    >   Folder: spool/inbox                                                     
    347
    > 
    > 
    > PS Is there an easier way to say "if such-and-such program doesn't
    > return a value"? I tried !? and ?! but neither one seemed to work.

The syntax for testing a zero return valiue is:

    :0
    * ? some-program
    action-if-zero-status

    :0e
    action-if-nonzero-status

To test for a specific value of the return status:

    STATUS=`some-program >/dev/null 2>&1; echo $?`
    :0                  # test for STATUS == 1
    * STATUS ?? ^1$     
    action-if-status==1

    :0E
    * STATUS ?? ^2$     # test for STATUS == 2
    action-if-status==2

    ... # and so on.

___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com>      http://reality.sgi.com/aks

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