I'm installing procmail (3.11pre4) for the first time. The system uses
a mode 775 mail spool, setgid mail agents and sentinel file locking
(foo.lock). I'm running procmail setuid root and setgid mail. procmail
also detected that fcntl() locking works so I left that in place.
I don't have a ~/.procmailrc. When I run this test:
$ ./procmail -f- VERBOSE=on < t
screenmailbox(/var/mail/roderick, .lock, 5, 0)
buf = /var/mail/
stat okay
wwsdir = 0, accspooldir = 0
goto keepgid, uid 360 st_uid 0 egid 5 st_gid 5
procmail: [10170] Wed Apr 16 15:22:34 1997
procmail: Bypassed locking "/var/mail/roderick.lock"
procmail: Assigning "LASTFOLDER=/var/mail/roderick"
procmail: Opening "/var/mail/roderick"
procmail: Acquiring kernel-lock
From roderick Wed Apr 16 15:22:34 1997
Subject: test
Folder: /var/mail/roderick 78
procmail: Notified comsat: "roderick(_at_)624:/var/mail/roderick"
procmail decides not to create the lock file roderick.lock. (The 5
initial lines are print statements I put in the code.) I also verified
this by creating roderick.lock file before running procmail, procmail
ignored it and delivered the message anyway.
The problem looks to be that lockit() doesn't even try to create
roderick.lock if accspooldir isn't true, but accspooldir is only true if
you use a world-writable spool dir (or you own the spooldir yourself).
I don't see how this setup is supposed to work with a mail spool
directory that looks like
drwxrwxr-x 6 root mail 512 Apr 16 14:46 /var/mail
and uses .lock file locking, what am I missing?
--
Roderick Schertler
roderick(_at_)argon(_dot_)org