'SharedMemoryKey'' ''''


The key to enable shared memory V8.12 and later

Shared memory is used by sendmail to store the amount of available disk space of the queue disks and the total number of messages queued across all queues (Section 11.6.2). For sendmail to do these two tasks, the binary must have been compiled with shared memory support (SM_CONF_SHM), and this SharedMemoryKey option must be declared.

You declare the SharedMemoryKey option like this:

O SharedMemoryKey=key              configuration file (V8.12 and later) 
-OSharedMemoryKey=key              command line (V8.12 and later) 
define(`confSHARED_MEMORY_KEY',key)    mc configuration (V8.12 and later) 

Here, key is of type numeric and can be positive, negative, or zero. A nonnumeric key evaluates to zero. A key of zero causes use of shared memory to be disabled. Otherwise, the value specified becomes the key used by shmget(2).

If you specify the SharedMemoryKey option, and shared memory support was not included in sendmail, the following error is printed and logged:

Option: SharedMemoryKey requires shared memory support (-DSM_CONF_SHM)

If shared memory is used, only the initial daemon will create and destroy it. If you run multiple initial daemons, you must be careful not to specify the same key for each. For example, two lines in a boot-time rc file might look like this:

/usr/sbin/sendmail -OSharedMemoryKey=1001 -C /etc/mail/fast.cf -q10m
/usr/sbin/sendmail -OSharedMemoryKey=1002 -C /etc/mail/slow.cf -q1h

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

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command