Name

SM_CONF_SHM

Synopsis

Beginning with V8.12, sendmail includes limited support for the use of shared memory. Shared memory is a region of memory maintained by the operating system so that an arbitrary number of programs can have common access to that memory.

The sendmail program forks a copy of itself every time it processes a queue. Because V8.9 and above sendmail supports multiple queues, it is likely that a separate sendmail invocation will be processing each queue. Each queue processor knows the contents of each queue—specifically, the number of messages that are in its queue at any given time. A convenient place to store that information is in shared memory.

When you run V8.12 and above sendmail with the -bP command-line switch (Section 11.6.2), sendmail reads shared memory to gather a count of the number of messages in each queue.

Shared memory is turned on by default for some operating systems and off for others. If you run sendmail with the -bP command-line switch and get the following error, you might need to define this SM_CONF_SHM compile-time macro:

Data unavailable without shared memory support

If you need to enable shared memory, you can do so by placing a line such as the following in your Build m4 file:

APPENDDEF(`conf_sendmail_ENVDEF', `-DSM_CONF_SHM=1')
                                                  to turn on shared memory support

Note that just turning on SM_CONF_SHM is not enough. To actually use that shared memory you also need to set a value for the SharedMemoryKey option. To set this option in your configuration ...

Get Sendmail, 3rd 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.