RequiresDirFsync

Turn off directory fsync(2) during runtime V8.13 and later

Some versions of Unix (or implementations of disk I/O) do not support immediate updates of directories when the data in them changes. For these Unix versions, the REQUIRES_DIR_FSYNC compile-time macro (REQUIRES_DIR_FSYNC on page 136) must set to true, causing sendmail to fsync(2) the directory every time it is updated.

If your operating system is one of these, and if you need to avoid the overhead of this forced directory updating,[415] you may do so by defining the RequiresDirfsync option. It is declared like this:

O RequiresDirfsync=bool                       ← configuration file (V8.13 and later)
-O RequiresDirfsync=bool                      ← command-line (V8.13 and later)
define(`confREQUIRES_DIR_FSYNC',  `bool')     ← mc configuration (V8.13 and later)

Here, bool is of type Boolean. If this option is omitted, the default is true (that is, directory fsync(2) is required if REQUIRES_DIR_FSYNC was defined at compile time). If this option is defined as false, however, directory fsync(2) is disabled even if REQUIRES_DIR_FSYNC was defined at compile-time.

The RequiresDirfsync option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

[415] * You risk lost mail should the machine crash without this updating.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.