MailScanner/Sendmail/Solaris Lock Type

René Berber r.berber at computer.org
Fri Dec 8 18:50:47 GMT 2006


Bob Jones wrote:

> Hey all, I know this is a dead horse but I couldn't find anything that
> answered this as completely as I liked.  So, I know in general, with
> MailScanner if you are using Sendmail 8.13 you should use a Lock Type of
> posix, and I've found many a post which mentions this.  However, I have
> a tickle in the back of my head that on Solaris systems (9 in this
> case), the lock type should still be flock.  Is my memory correct or do
> I need to change it to posix?

It should match what sendmail is using, and by default it is using fcntl not
flock.  Ref: sendmail-8.13.8/sendmail/README :

"HASFLOCK	Set this if you prefer to use the flock(2) system call
		rather than using fcntl-based locking.  Fcntl locking
		has some semantic gotchas, but many vendor systems
		also interface it to lockd(8) to do NFS-style locking.
		Unfortunately, may vendors implementations of fcntl locking
		is just plain broken (e.g., locks are never released,
		causing your sendmail to deadlock; when the kernel runs
		out of locks your system crashes).  For this reason, I
		recommend always defining this unless you are absolutely
		certain that your fcntl locking implementation really works."

And there is nothing in sendmail-8.13.8/devtools/OS/SunOS.5.9 that changes this.

I've heard bad things about Solaris' implementation of fcntl, about it being
just a wrapper around flock, but FWIW I'm using it with no problem under Sol9
and low to moderate load; and I used flock under Sol8/Sol9 with an older
MailScanner version also without a problem.
-- 
René Berber



More information about the MailScanner mailing list