procmail
[Top] [All Lists]

Re: Procmail and perl revisited

1999-05-06 05:08:36
On Thu, 6 May 1999 07:16:41 -0400 (EDT), Duncan Hill
<dhill(_at_)sunbeach(_dot_)net> wrote:
script was looking for an argument at ARGV[0], and nothing was
appearing there.  So, with a bit of modification, I made the procmail
create data.$DATE (where date is %d%m%y%H%M%S), fed that file name as

Ugh -- you should definitely change the script so it can accept stuff
on standard input. (Coincidentally, Perl will always read from stdin
if you pass it the file name "-".)

However, I have just realised that if I get 2 mails in the same
second, I'm up a creek.  Can anyone suggest a better method of what
I'm trying to do?

Pipes solve that too. Otherwise, you'd have to use a local lock file.
But chaning the script invocation so it reads data from stdin is much
better, and more elegant.

I suppose I should actually have the error messages dump to a file at
the very least, in case I run out of disk.

stderr messages from Perl will end up in Procmail's log file (but you
should have a w flag on the recipe before this will work).

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

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