Locktype: posix vs. flock

Julian Field MailScanner at ecs.soton.ac.uk
Thu May 22 22:26:39 IST 2008

Henry Kwan wrote:
> Hi,
> I've been experimenting with MailScanner and either sendmail or postfix as the
> MTA.  I notice that MailScanner uses "flock" locktype with postfix and "posix"
> with sendmail.  I also saw in the spam.assassin.prefs.conf file that it said
> that "flock", while non-NFS-safe, was more efficient.
> Should I tell MailScanner to use "flock" instead of "posix" with sendmail since
> I don't have any NFS mounted volumes?
> I'm running sendmail-8.13.8-2.
No, you shouldn't. MailScanner's lock type must match that used by 
sendmail, or else they will tread on each other's toes. This is very 
bad. Just leave the setting blank in MailScanner.conf and it will do the 
right thing for you.

SpamAssassin's locking it totally separate, and is just used by 
SpamAssassin and nothing else. You should use flock for SpamAssassin, 
which I believe you will find I have already set for you in 

> Thanks.


Julian Field MEng CITP CEng
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list