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

The cf directory structure - 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).

TABLE OF CONTENTS:
  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
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The m4 source files and libraries used to build the sendmail configuration are located in the cf directory, which contains the following items:

$ ls sendmail-8.12.9/cf cf feature m4 ostype sendmail.schema siteconfig domain hack mailer README sh

The cf directory contains two files, README and sendmail.schema, and nine subdirectories. The sendmail.schema file is an experimental LDAP schema that predefines attribute types and object classes that can be used with LDAP. The sendmail schema is used in most LDAP examples in this book. The README file is a comprehensive reference to the syntax and usage of all of the m4 macros and variables used to configure sendmail. The README file is an invaluable reference, particularly when used with this book.

The directories hack, sh, and siteconfig have very little use for most configurations.

hack directory

The hack directory is intended to hold m4 source files built by the local system administrator to solve temporary sendmail configuration problems. There is only one file in the hack directory, built years ago, which serves as an example of a sendmail hack. The hack directory and the HACK macro are still there, but, with all of the power and flexibility available to configure sendmail, there is simply no good reason to use them.

siteconfig directory

The siteconfig directory is intended to hold files that use sendmail m4 SITE macros to list the locally connected UUCP sites. The siteconfig directory, the SITECONFIG macro, and the SITE macro are maintained for backward compatibility. However, the directory and the macros are obsolete and should no longer be used to define the UUCP connectivity for a UUCP mail server.

sh directory

The sh directory contains only the makeinfo.sh file. Most of the files in the cf subdirectories are m4 macro source files that end with the .m4 extension. This file, however, ends with the .sh extension, indicating that it is a shell script. The script produces three lines of comments for the sendmail.cf file that identify who built the configuration, when they built it, and in what directory.

The remaining six directories are the real heart of sendmail configuration. Four of these directories, domain, feature, ostype, and mailer, have the same names as sendmail m4 macros, and provide the source code used by those macros. The purposes of these four directories are:

domain directory

The domain directory holds m4 source files that define configuration values that are specific to your domain or network. If you need to define such values, create your own file; the six files contained in the domain directory are just examples. The configuration file you create for your environment is then used in the master configuration file via the DOMAIN macro.

ostype directory

The files in the ostype directory define operating system-specific characteristics for the sendmail configuration. Every master configuration file must contain an OSTYPE macro to process the correct macro source file for the sendmail serverís operating system.* The sendmail-8.12.9/ostype directory contains configuration files for more than 40 different operating systems, each one easily identified by name. Select the file that matches your serverís operating system.

mailer directory

In addition to an OSTYPE macro, most master configuration files have at least one MAILER macro. MAILER macros process source files from the mailer directory. Each file in the mailer directory contains the definition of a set of mailers. The current mailer directory contains 12 different files. Many configurations use only the two most basic sets of mailers: local.m4 for local mail delivery and smtp.m4 for SMTP mail delivery.

feature directory

The feature directory contains the m4 source code files that implement various sendmail features. There are more than 40 feature files available in the directory. Features are used to address specific configuration problems.

The other two remaining directories, cf and m4, contain the master configuration files and macro source libraries used by m4. The four directories described above contain files that are invoked inside the sendmail configuration by m4 macros. The cf/cf directory and the cf/m4 directory contain m4 source files that are normally invoked on the m4 command line.



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- 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: