procmail
[Top] [All Lists]

Re: help with lockfile and procmailrc

2003-07-09 13:57:40
Stewart Dean wrote:

[snip]
LOCKFILE        #removes preexisting lockfile
LOG='lockfile $DEFAULT$LOCKEXT '
TRAP="rm -f $DEFAULT$LOCKEXT"
       :0
[snip]
1) Would some kind soul explain what the lock stuff is doing

I'll take a stab. It appears to be manually creating a second lockfile
around the file to which mail is delivered to by default. Let me
try to straighten it out. Assume "inbox" is the file mail is delivered
to by default:

lockfile inbox.lock

:0:
inbox

rm -f inbox.lock

2) Is it syntactically correct?  

I think so, though highly obfuscated and semantically worthless.

[...]
3) Is what it's doing real/worthwhile? 

No. My guess is it was a kludge to work around
some error with an older version of procmail, if it 
ever served any function at all.

4) How does procmail (I'm assuming it's only procmail that uses 
lockfile) know where to find the lockfile executable?  Or is it just 
assumed to be in /usr/local/bin?

PATH - see man procmailrc

5) I see these apparent environmental variables $DEFAULT and $LOCKEXT, 
but they don't seem to be set that I can see by  invoking 'set' to see 
the environmental variables

In your shell environment, or procmail? procmail should be running in
a Bourne shell, not csh, hence the set syntax would be incorrect.

6) Where are LOCKFILE and TRAP defined/explained

man procmailrc should work.

G'luck!

TFC

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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