procmail
[Top] [All Lists]

lockfile problem

1999-05-18 01:37:38

Hello!

In contrast to a lot of examples in procmailex.5 I do not
want to store my mail in different files but to add a tag
to the subject and have the mail deliverd to the default mailbox 
/var/spool/mail/$LOGNAME. (i.e. $LOGNAME=kabs)

I use the following "recipe"

SUBJECT=`formail -xSubject:` 
:0 w 
* ^To:(_dot_)*root(_at_)physik(_dot_)uni-kl(_dot_)de
{
  :0 fw
  |formail -I "Subject: [root]$SUBJECT"

  :0 
  /var/spool/mail/kabs
}

(The idea is to put "[root]" into the subject so I can easily
see if the mail was addressed directly to me or to forwarded
to by root.)

I added the "w" flag so procmail doesn't continue concurrently 
and I can more easily understand what it's doing :-)

The problem is, procmail doesn't use the global LOCKFILE!! 

The logfile read something like that:
procmail: Executing "formail -I "Subject: [root]$SUBJECT""
procmail: [19650] Tue May 18 10:05:35 1999
procmail: Assigning "LASTFOLDER=/var/spool/mail/kabs"
procmail: Opening "/var/spool/mail/kabs"
From root(_at_)maitre(_dot_)physik(_dot_)uni-kl(_dot_)de  Tue May 18 10:05:34 
1999
 Subject: [root] test3
  Folder: /var/spool/mail/kabs                                              453


I checked the status of /var/spool/mail/kabs.lock while the 
mail was processed and it was never created.

I do get several messages from system log daemons at the same
time which then happen to vanish... Can anybody explain, why
procmail doen't properly use the global lockfile ??? 



Cheers
Daniel Kabs

PS:
Please mail me if I have to subscribe to any procmail relating
maillinglist to see answers to this mail.



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