Chapter 3. Tune sendmail with Compile-Time Macros

For most users, the default sendmail that is produced by running Build will be perfectly suitable. For others, however, support for certain desirable features will have to be added, such as hesiod, ldap, or nis, as a means to validate users and route mail. The open source distribution of sendmail has many such features that you may choose to include or exclude from your compiled binary.

All the features described in this chapter are implemented as compile-time #define macros that are passed to the compiler with appropriate -D switches. Your m4 file is the proper place to put in such definitions. For example, to remove support for wildcard matches in the password(5) file from sendmail, you should:

APPENDDEF(`conf_sendmail_ENVDEF', `-DMATCHGECOS=0')

A new line is added to your Build m4 file that adds the complier flag -DMATCHGECOS=0, which turns off support for wildcard matches.

All the latest available -D compile-time macro values will be listed in the sendmail/README file. Those that we cover are listed in this book in Table 3-2 on page 105.

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.