procmail
[Top] [All Lists]

Re: Piping mail to perl via procmail

1997-04-28 18:07:00
On Mon, 28 Apr 1997 22:28:35 GMT, revjack(_at_)Radix(_dot_)Net 
(revjack(_at_)radix(_dot_)net) said:

#!/usr/bin/perl
read(STDIN, $buffer, 655350);
[...]
mymail: syntax error at line 2: `read' unexpected

That error message is coming from /bin/sh, not perl.  For some reason sh
is interpreting your perl script instead of perl.  Is bash not the shell
you have listed in the password file, or do you have a SHELL assignment
in your procmailrc?  What happens when you run "sh -c mymail < test-message"?

As a workaround you could change the invocation in the recipe to

    | perl /path/to/mymail
    
but of course that's nasty.

-- 
Roderick Schertler
roderick(_at_)argon(_dot_)org

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