Beginning with V8.10,
sendmail uses the
ftruncate(2) system call to truncate NDBM-style
aliases database files before rebuilding them.
This avoids a potential race condition that could yield false results
when one sendmail reads the database at the
precise moment another sendmail starts to
Also, when sendmail delivers mail directly to a
file, an error can occur while writing that can leave the file in an
inconsistent state. Beginning with V8.10,
sendmail truncates the file to its original
length if an error occurs while writing.
Another, less serious, race condition can exist when
sendmail writes one of its Host Status files, as
defined by the HostStatusDirectory option (HostStatusDirectory). If ftruncate(2) is
available, sendmail truncates each file before
writing new information.
Finally, note that when a MILTER program rewrites the message body,
sendmail must truncate the
df file before writing the new text.
For all currently supported systems that lack
ftruncate(2), this NOFTRUNCATE compile-time
macro is correctly defined. You will need only to define it when
porting sendmail to a completely new system.
If you are running a precompiled sendmail
binary, you can use the -d0.10 debugging
command-line switch (-d0.10) to determine if
NOFTRUNCATE support is defined (if it appears in the list, it is
defined). New ports should be reported to
email@example.com so that they can be folded
into future releases.