Sentrion Overview Sentrion Platform Sentrion REAC Sentrion Mimecast Hard Appliances Virtual Appliances
Overview Policy Compliance Secure Content Filtering Cloud Partner Enterprise Community
Overview Download Security Support News Documentation Tips & Tricks DKIM FAQ Misc Milters
Overview Directory Synchronization Messaging Architecture Review High Volume Mail HIPAA Policy QUICKStart Implementation Performance Tuning Training Services Overview Message Routing and
Configuration
Message Policy
Management
Connection Control /
Attack Prevention
Directory Configuration
and Management
Overview Sendmail Partners Milter Community Industry Organizations System Integrators & Distributors
Overview Silver Support Gold Support Platinum Support Open Source Support Security Advisories Contact Support
Overview Customers Events Press Room Board & Investors Management Careers Contact Us
Overview Ask the Experts Security Chalk Talks Collateral Product Reviews & Awards IP Reputation Check Real-time Outbreak Monitor
Sendmail Inc.

HOME | CUSTOMER LOGIN
Follow Sendmail on Twitter
The Sendmail Blog
Sentrion Message Processors
Sentrion Application Store
Services
Partners
Support
Company
Resources
Open Source
 

Useful links

Table of Contents
home
GNU m4

Further Reading

Linux Network Admistrators Guide ch. 18 @ Linuxdoc.org
GNU m4 Manual
sendmail - O’Reilly, Costales and Allman, ISBN1-56592-222-0, chapter 19

App Spotlight

Dirsync

A BRIEF INTRODUCTION TO M4

Sendmail uses the M4 macro processor to ``compile'' the configuration files. The most important thing to know is that M4 is stream-based, that is, it doesn't understand about lines. For this reason, in some places you may see the word ``dnl'', which stands for ``delete through newline''; essentially, it deletes all characters starting at the ``dnl'' up to and including the next newline character. In most cases sendmail uses this only to avoid lots of unnecessary blank lines in the output.

Other important directives are define(A, B) which defines the macro ``A'' to have value ``B''. Macros are expanded as they are read, so one normally quotes both values to prevent expansion. For example,

define(`SMART_HOST', `smart.foo.com')

One word of warning: M4 macros are expanded even in lines that appear to be comments.

For example, if you have

# See FEATURE(`foo') above

it will not do what you expect, because the FEATURE(`foo') will be expanded. This also applies to

# And then define the $X macro to be the return address

because ``define'' is an M4 keyword. If you want to use them, surround them with directed quotes, `like this'.

Since m4 uses single quotes (opening "`" and closing "'") to quote arguments, those quotes can't be used in arguments. For example, it is not possible to define a rejection message containing a single quote. Usually there are simple workarounds by changing those messages; in the worst case it might be ok to change the value directly in the generated .cf file, which however is not advised.

Notice

This package requires a post-V7 version of m4; if you are running the 4.2bsd, SysV.2, or 7th Edition version. SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 or later also works.

Unfortunately, the M4 on BSDI 1.0 doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is available from ftp://ftp.gnu.org/pub/gnu/m4/ (check for the latest version).

EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken (3.x is fine). Use GNU m4 on this platform.

Back to Table Of Contents cf/README for Sendmail 8.12.11 Eric Allman of the Sendmail Consortium Rev: 1.1.1.1, Updated 2006/10/11 Back to Top


Site Map | Privacy Policy | Terms & Conditions | Copyright © 1998-2013 Sendmail, Inc. All Rights Reserved.