O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Buffered File I/O

For safety sake, and to ensure that no email messages are ever lost, sendmail queues all messages prior to the first delivery attempt. The SuperSafe option (SuperSafe) controls this behavior. When sending huge amounts of mail to lists of subscriber recipients, however, the safety of any single message can be less important than the overall speed of delivery.

Although we do not recommend turning off the SuperSafe option, you can do so when you can tolerate the loss of messages should a mail-sending machine crash:

define(`confSAFE_QUEUE',`False')           all versions, see later

The SuperSafe option causes every message not only to be queued, but also to be flushed to that queue and the file synced to disk. In a situation where most email is delivered on the first try, a benefit derived from turning off SuperSafe is that most messages will never be saved to disk. They will instead be delivered out of the disk cache in memory, greatly increasing throughput.

Note that, at sites that mix subscription and internal email, simply turning off the SuperSafe option might not be the best solution. While it might be acceptable to lose subscription mail, losing internal company email probably isn’t.

An alternative to queueing or not queueing everything is to use buffered file I/O to queue portions of messages or messages over a certain size. Buffered I/O was introduced in V8.10 sendmail but was usable only with BSD-derived flavors of Unix. Beginning with V8.12 sendmail, buffered I/O ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required