Re: Perl scripts not recognized as such?

At 11:06 2008-12-04 -0700, Bill Oakley wrote:

>Thank you for your reply.
>
>The script is really pretty simple, I've included it below.  (This is
>to get started; when I have it working I'll be adding "exit 0 if ..."
>statements.)

Q: If it is so simple, how come you're not doing these checks within 
procmail itself, which would be less costly?

Here is what should be an equivalent all-procmail solution:

# Your match string is presumably case sensitive, based on your Perl code,
# so I specify the D flag here.
:0D:
* ^(From:.*(Jeremiah Builds|builds|Polly Prerel|prerel)|\
         Subject:.*\[Qt-interest\])
$HOME/Mail/billo2

# Note that explicitly delivering to default, if it is the last action of
# your rcfile, isn't really necessary.  If you were doing this prior to the
# end of the rcfile, it'd be different.
:0:
$DEFAULT

As to your perl problems:

         What version of perl?  Use 'perl -v'

         What is your shell set to (as procmail sees it)?

         Is mail processed on the SAME host that you shell to?

This is a not uncommon issue with large ISPs - your procmail script may be 
invoked by a host other than the one you shell into, and thus settings (and 
tool versions) are not consistent with where you shell.

         From your post, there's a syntax error at line 10 - which shows a
         closing PARENTHESIS, not brace.  Your posted code has a closing brace
         on line 10 though.  Do you have more than one copy of this script?

         Out of habit, you should add -wT to the perl commandline.  Doesn't 
have
         an effect in this particular case, but is a good practice.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.

Gmane