procmail
[Top] [All Lists]

Re: Weird message in lockfile

1996-09-24 13:14:38
"Z.B." <zachb(_at_)netcom(_dot_)com> writes:
I set up several autoresponder recipes last night, and while they seem to 
be working just fine,  I've noticed several weird messages in my 
logfile.  When a message comes in requesting one of the files, I get the 
following:

procmail: Couldn't determine implicit lockfile from " ($FORMAIL -rt -I"Subject
: Stopping Emailbombs" -I"From: $MDAEMON" \
 -I"X-Loop: $MYADDRESS"; cat $HOME/antibomb) | $SENDMAIL -oi -t"
From -  Thu Sep 19 03:11:59 1996
Subject: get anti-emailbomb-faq
 Folder:  ($FORMAIL -rt -I"Subject: Stopping Emailbombs" -I"From: $MDA
            822

It's working all right, but I'm just curious why Procmail has a problem 
with that one and not another, which is identical except for the 
filename.  

Please include the recipe causing problems as it appears in your
.procmailrc.  That helps everyone understand what's going on.

The problem is that you've asked procmail to use a locallockfile by
ending the ':0' line that starts the recipe with a colon.  Since you
apparently didn't specify a filename to use, procmail looked at the
action line to determine it.  Since it's a pipe action, procmail
looked for a ">>", but there wasn't one, so it emitted the warning.

Since you aren't writing to any files in the action you show, you don't
need the locallockfile, and can just remove the second colon from the
start of the recipe.


On a related subject, how would I configure it so that it puts 
the autoreply messages into a seperate logfile (like auto.log) and wipes 
this when it gets to be a certain size?

The first part is easy, just temporarily set LOGFILE to a different
value before the recipe, and reset it afterwards.  As for wiping it
when it gets to a certain size, there are a dozen ways to do this with
varying speed and clarity.

(I think that if you keep the logfile to a reasonable size, the fastest
method involves reading the logfile into procmail, and then using the
regexp scoring to count lines (or you could just use the "> number"
condition to count bytes), but this is far from clear for most people.
The clearest method is probably to use wc to get the size of the file
and score from there.)


Philip Guenther

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