Question regarding FLOCK or POSIX with Sendmail 8.13.x and MailScanner.

Alex Neuman van der Hans alex at nkpanama.com
Thu Nov 2 17:35:31 GMT 2006


Scott Silva wrote:
> Duncan, Brian M. spake the following on 11/2/2006 6:05 AM:
>>> Earlier this year, there was an internal inconsistency within
>>> MS which I spotted at 4.54.6 .
>>>
>>> In "MailScanner.conf" the comments describing the default "Lock Type"
>>> (i.e. left blank) behaviour said 'it defaults to "posix"',
>>> but the actual behaviour (when left blank) was to set it to "flock".
>>>
>>> That is, the comments said MS would behave one way but its
>>> actual behaviour was the opposite.
>>>
>>> See threads starting at:
>>>   
>>> http://lists.mailscanner.info/pipermail/mailscanner/2006-June/
>>> 061887.html
>>> and Julian's acknowledgement and fix at:
>>>   
>>> http://lists.mailscanner.info/pipermail/mailscanner/2006-June/
>>> 061974.html
>>>
>>
>>> So either upgrade to a more recent version (than 4.54.6) or
>>> if you need to stay back at 4.54.6 then explicitly state
>>> which lock type you want.
>>>
>>> Hope that helps.
>> Thank you for the information.  I found those this morning when doing
>> further searches.
>>
>> I am hesitant to turn posix on, on my main server that has been using
>> Sendmail 8.13.x and flock for months now without issue.
>>
>> I am starting with a lower load box first.  I am afraid that it will
>> cause a duplication issue.  It seems to with some sendmail 8.12.x users,
>> and when they show their compiled options I don't see flock listed.
>>
>> Here is one posting from a recent person with the duplicating message
>> issue that was using Sendmail 8.12.11:
>>
>>> Yes I'm using sendmail.
>>>
>>> 8.12.11-4.6
>>>
>>> # sendmail -d0.1
>>> Version 8.12.11
>>> Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
>> MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET
>>> NETINET6 NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
>> USERDB USE_LDAP_INIT
>>> Duncan
>>
>> Since he does not have FLOCK shown in his compiled options, shouldn't of
>> Posix worked for him? (Everything was ok when he switched to flock) - I
>> looked at an older box I have here with sendmail 8.12 on it and I don't
>> have flock shown as a compiled option.  I thought it was supposed to
>> show you if flock support is compiled into sendmail.
>>
>> Can someone please explain to me how it is determined that with Sendmail
>> 8.13.x + versions you have to use posix? Is there any way to determine
>> 100% that your sendmail compile is already using Posix and NOT flock?
>> Looking for flock in the compiled options does not look to be accurate
>> based on the above post I included. (He had to switch to flock to make
>> his work, yet flock does NOT show up in his compiled options)
>>
>> Thanks
> This note was posted with sendmail 8.12.5 in the announce;
> 		NOTE: Linux appears to have broken flock() again.  Unless
> 			the bug is fixed before sendmail 8.13 is shipped,
> 			8.13 will change the default locking method to
> 			fcntl() for Linux kernel 2.4 and later.  You may
> 			want to do this in 8.12 by compiling with
> 			-DHASFLOCK=0.  Be sure to update other sendmail
> 			related programs to match locking techniques.
> ( see http://www.sendmail.org/releases/8.12.5.html)
> 
> I can't tell you why your version is different, maybe a custom compiled
> version to get around the Flock exploit that was posted about the time 8.12.11
> came out. The consensus so far has been ;
> Linux and sendmail 8.12 = flock
> Linux and sendmail 8.13 = posix
> Also note that there have been some problems with dovecot if it is set to a
> different locking.
Can dovecot use posix?

> 
> I am still curious as to how you have been so lucky with no problems!
> Are you running on a filesystem other than ext2/ext3?
> Maybe Core 4 has a kernel that doesn't have the locking problem that the
> enterprise distros lack because of the conservative patching that is done.
> 
> 
> 



More information about the MailScanner mailing list