procmail
[Top] [All Lists]

Re: 775 mail spool and "Bypassed locking"

1997-04-18 14:57:00
Roderick Schertler <roderick(_at_)argon(_dot_)org> writes:
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
...
   procmail: Bypassed locking "/var/mail/roderick.lock"
...

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?


If you put a variable assignment on the command line, procmail will give
 up it's setuid and setgid privileges.  Without those privileges, procmail
can't create the lockfile, so it skips it.  The solution is to put the
"VERBOSE=on" in a .procmailrc.

Has anything broken under 'normal' usage?


Philip Guenther