help with conditionals in recipe

Richard Reina <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
I have a short recipe below that seems to work except for that the last line
in curly braces is not executing causing the perl subroutine rip_attachment
to not get called.
I was wondering if someone might me able to tell me what I am doing wrong?

Thanks,

Richard

:0 W # send to test_subject.pl to check for PO no.
* ? /usr/bin/perl -e 'require "/home/richard/.pmdir/test_subject.pl";
test_subject($ENV{SUBJECT});'
    # failed subject test
|( formail -rI"From: Replys automatically discarded <[email protected]>";
\
   echo "Your mail has been returned."; \
   echo "It was NOT received because it does not contain a valid PO in the
subject"; \
   echo "Please resubmit with a valid PO number in the subject line."; \
 ) | /usr/sbin/ssmtp -oi -t

:0:  #2nd colon means use locking so we don't get 2 files at once in friends
{ # passed subject tes. It has a valid PO no
  :0 c     # copy to freinds and invoices
  friends

  :0
  invoices

  :0 W #rip the attachments
  * ? /usr/bin/perl -e 'require "/home/richard/.pmdir/test_subject.pl";
rip_attachments($ENV{SUBJECT});'

}


This is what my log file says:

procmail: Assigning "INCLUDERC=/home/richard/.pmdir/recipes"
procmail: Assigning "SUBJECT="
procmail: Match on "^FROM:.*"
procmail: Assigning "MATCH="
procmail: Matched "load 24011"
procmail: Match on "^Subject:[    ]*\/[^  ].*"
procmail: Assigning "SUBJECT=load 24011"
procmail: Executing " /usr/bin/perl -e 'require "/home/richard/.pmdir/
test_subject.pl"; test_subject($ENV{SUBJECT});'"
procmail: Non-zero exitcode (1) from " /usr/bin/perl -e 'require
"/home/richard/.pmdir/test_subject.pl"; test_subject($ENV{SUBJECT});'"
procmail: No match on " /usr/bin/perl -e 'require "/home/richard/.pmdir/
test_subject.pl"; test_subject($ENV{SUBJECT});'"
procmail: Extraneous locallockfile ignored
procmail: Locking ".lock"
procmail: Unlocking ".lock"
procmail: Assigning "LASTFOLDER=friends"
procmail: Opening "friends"
procmail: Acquiring kernel-lock
procmail: Assigning "LASTFOLDER=invoices"
procmail: Opening "invoices"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "richard@252707
:/home/richard/mail/.inboxes/invoices"
 Subject: load 24011
  Folder: invoices                              50541

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.