SYSLOG_BUFSIZE

Limit syslog(3) buffer size Port, edit sendmail/conf.h

The sendmail program logs errors, information, and debugging messages using the syslog(3) facility. By default, sendmail uses a 1,024-byte buffer to assemble each message before dispatching it, but some systems don’t accept a buffer this big. For such systems, you can reduce the size of that buffer by defining SYSLOG_BUFSIZE with a new size:[58]

APPENDDEF(`confENVDEF', `-DSYSLOG_BUFSIZE=512')
                                          ↑
                                                                  reduce syslog(3)'s
buffer size

First, note that SYSLOG_BUFSIZE is correctly set in sendmail/conf.h (include/sm/conf.h beginning with V8.12) and for all the supported versions of Unix. Second, note that setting the buffer to fewer than 256 bytes causes sendmail to log many more smaller messages (each item of information on a separate syslog(3) line). If SYSLOG_BUFSIZE is less than 89, some logging information will be lost.

SYSLOG_BUFSIZE has an effect only if sendmail was compiled with LOG defined (LOG on page 120). If you are running a precompiled version of sendmail, there is no way to determine the setting of SYSLOG_BUFSIZE.

New ports should be reported to so that they can be folded into future releases.

[58] * Don’t just arbitrarily change the size. You must match it to the buffer size defined by your syslog(3) library routine.

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.