:0
* ^Subject: [IMG_AVAILABLE]
| /usr/local/bin/some_command.pl
What I'm seeing is procmail maxing out my processor indefinitely.
I've been putting this together a little bit at a time, the remote
machine is sending the email as part of a cron job (perl proggy again),
and the contents of the mail look fine (or they did before I put
procmail in the way).
The email is about 20k lines. The sending of the email is working OK,
and the receipt seems fine as procmail is being called, but it doesn't
seem to be calling my perl program. I'm seeing nothing in the procmail
log either.
My perl program has permissions 755, and this is it's contents (not
much, just getting the steps working before I put the real code in
there):
#!/usr/bin/perl
use strict;
use warnings;
open OUT, "+>", '/home/user/out.txt'
or die "Cannot open out : $!";
for my $line (<STDIN>) {
print OUT $line;
}
Any suggestions as to what the problem might be?
Justin.
--
Justin C, by the sea.
Found the problem. The previous procmail recipe was badly formed, that
was what was causing the problem. Sorry to waste anyone's time.
Anyway: change the ugly for loop
while(<STDIN>) {
print OUT $_;
}
--
[pl>en Andrew] Andrzej A. Filip : an...@onet.eu : Andrze...@gmail.com
When I came back to Dublin I was courtmartialed in my absence and sentenced
to death in my absence, so I said they could shoot me in my absence.
-- Brendan Behan
You should have seen what it was before! That's just there to test that
procmail is calling the script, it is going to be replaced by what I
really want... won't necessarily be any more elegant than what I have,
but I am open to suggestions to improve my perl coding, so I'll bear
this in mind, thanks.