procmail
[Top] [All Lists]

Re: Q on procmail piped to perl

1999-03-28 14:07:31
At 01:20 PM 3/28/99 -0500, Walter wrote:
( This is sent to both the procmail and the perl list, incase someone on
either side has done this before.)


OK, update time...

I tried both of these receipts...

Ugh, please, they're "recipes" not "receipts".

       :0
       * ^TO()perl(_at_)tscinternet(_dot_)com
       * HB ?? ? $HOME/vmail/perl/test.pl
       | true

What are you trying to do with "HB ?? ?" ?

       :0
       * ^TO()perl(_at_)tscinternet\(_dot_)com
       | $HOME/vmail/perl/test.pl

The procmail.log file says...

^@

That's it.

That looks suspiciously like the control-carat representation of 
a NUL byte... what does "od -c" on your logfile show you?

Also, what's in the rest of your .procmailrc?  Do you set VERBOSE on?
If not, do so (at the top of it, right after SHELL=/bin/sh -- you do
have that, right?) until things work.  And of course, you have
LOGFILE=$MAILDIR/procmail.log and aren't just assuming that name?

Each time, each receipt, nothing else.

I know the Perl works, because...
  - it creates the .out from the prompt
  - it creates the .out file with: cat my.txt | test.pl

At least, I think that it means the script works, and is executable.
  -rwxrwxr-x   1 walter        393 Mar 25 22:07 test.pl

(The scripts are below)

I even have a shell script that will work...

       :0
       * ^TO()demo(_at_)tscinternet(_dot_)com
       * HB ?? ? $HOME/vmail/perl/demo "`date`"
       | true

This works just fine. The shell script creates a .out file containing the
past message.

Works fine how?  Command line invocation of procmail or by sending mail?
I notice you're ALSO using TO()demo instead of TO()perl here, so you have
more differences than just using a shell script; does the perl@
account have .forward set up to run procmail correctly?

You can usually check if *something* reads your .procmailrc by doing "ls -lu"
on it; then send yourself mail, and see if the timestamp updates.
(Not valid on certain filesystems where the read time is "turned off"
for performance reasons.)

Anyone have any ideas?

Note that in many configurations, mailed is delivered by a different
machine than you'd be testing from the command line on.

Is /usr/local/bin/perl5 on your mail delivery machine?

Does your mail delivery machine understand "#! /usr/local/bin/perl5 -w"
syntax?

That's all I can think of.  If it's a perl problem, or might be,
I can't help... try gawk  :-)  But you should be seeing text
in your logfile (at least with verbose), so I would chase that first.

Cheers,
Stan

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