Skip to Content
sendmail, 4th Edition
book

sendmail, 4th Edition

by Bryan Costales, Claus Assmann, George Jansen, Gregory Neil Shapiro
October 2007
Intermediate to advanced
1308 pages
161h 13m
English
O'Reilly Media, Inc.
Content preview from sendmail, 4th Edition

SM_CONF_SHM

Use shared memory (V8.12 and above) Port with confENVDEF

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 support 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 (Print the Number of Messages in the Queue on page 425), 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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Sendmail, 3rd Edition

Sendmail, 3rd Edition

Bryan Costales
Linux Email

Linux Email

Ian Haycox, Ralf Hildebrandt, David Rusenko, Alistair McDonald, Patrick Ben Koetter, Carl Taylor, Magnus Back

Publisher Resources

ISBN: 9780596510299Errata Page