Home arrow Site Administration arrow Page 3 - Getting Started with Sendmail

The cf/m4 directory - Administration

If you want to build or customize a sendmail configuration, you need to know your way around the sendmail distribution. This article will help you find your way around the cf directory, which contains the configuration files. It was excerpted from chapter one of The Sendmail Cookbook, written by Craig Hunt (O'Reilly Media, 2004; ISBN: 0596004710).

  1. Getting Started with Sendmail
  2. The cf directory structure
  3. The cf/m4 directory
  4. 1.1 Downloading the Latest Release
  5. 1.2 Installing sendmail
  6. 1.3 Compiling sendmail to Use LDAP
  7. 1.4 Adding the regex Map Type to sendmail
  8. 1.5 Compiling sendmail with SASL Support
  9. 1.6 Compiling sendmail with STARTTLS Support
  10. 1.7 Compiling in STARTTLS File Paths
  11. 1.8 Building a sendmail Configuration
  12. 1.9 Testing a New Configuration
  13. 1.10 Logging sendmail
By: O'Reilly Media
Rating: starstarstarstarstar / 26
July 07, 2005

print this article



The cf/m4 directory contains the m4 macro definitions and the sendmail.cf skeleton code needed to build a sendmail.cf configuration file. Remember that m4 is a general purpose macro language; it is not a language specifically designed to build sendmail configurations. sendmail configurations are built using macros defined by the sendmail developers. The cf/m4 directory contains the four files that define those macro commands.


The version.m4 file defines the sendmail.cf Z variable, which is assigned the sendmail version number. Because this value changes with each sendmail release, it is defined in a separate file for easy maintenance.*


The cf.m4 file is specified on the m4 command line to incorporate the library of sendmail m4 macro commands into the m4 process. The cf.m4 file includes, by reference, the cfhead.m4 file that contains the macro definitions.


The cfhead.m4 file defines the m4 macros used to configure sendmail. This file includes lots of stuff, most importantly the definition of many of the commands used to build a configuration.


The proto.m4 file is the source of most of the content found in the sendmail.cf file.

The cf subdirectory

The cf/cf directory is the working directory of sendmail configuration. It contains all of the master configuration files, and it is where you will put your own master configuration file when you build a custom configuration. The directory contains more than 40 files.

$ ls sendmail-8.12.9/cf/cf

clientproto.mcgeneric-hpux9.cfgeneric-sunos4.1.cf s2k-osf1.mc
cs-hpux10.mcgeneric-hpux9.mcgeneric-sunos4.1.mc s2k-ultrix4.mc
cs-ultrix4.mcgeneric-nextstep3.3.cf mail.cs.mcucbvax.mc


cyrusproto.mcgeneric-nextstep3.3.mc mail.eecs.mcuucpproto.mc
generic-bsd4.4.cf generic-osf1.cfmailspool.cs.mcvangogh.cs.mc
generic-bsd4.4.mc generic-osf1.mcMakefile

Most of these files—more than 30 of them—are sample master configuration files. You can identify a master configuration file by the .mc extension. Some are examples meant as educational tools, but most are prototypes or generic files meant to be used as the basis of your own configuration. The generic files designed for specific operating systems are particularly interesting, such as Solaris, HPUX, BSD, Linux, and several others. We use the generic-linux.mc file in Recipe 1.8.

Several of the files are identified by the .cf extension. These files are the result of processing master configuration files through m4; they are already in the proper format to be used as the sendmail.cf file. It is unlikely, however, that you will use one of these files directly. Unless the generic master configuration file is exactly to your liking, the sendmail configuration file produced from that .mc file will not be what you want. We start with a generic configuration in Recipe 1.8, but the subsequent recipes in this book modify that generic configuration to create the custom configurations we need.

>>> More Site Administration Articles          >>> More By O'Reilly Media

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: