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 can choose to include or to 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:


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.

    Part I: Build and Install
    Chapter 2. Build and Install sendmail
    Chapter 4. Configure with m4
    Part II: Administration
    Part III: The Configuration File