Macro Names

Prior to V8.7 sendmail, macros could have only single characters as names. Beginning with V8.7, macros can be single-character or multicharacter.

Single-Character Names

Prior to V8.7 sendmail the name of a macro was required to be a single character.[5] Any character can be used except the { character. However, sendmail uses many characters internally and requires that they serve specific purposes. In general, only uppercase letters should be employed as user-defined macro names. Arbitrary use of other characters can lead to unexpected results.

The character that is the macro’s name must be a single-byte character. Multibyte international characters have only the first byte (or last, depending on the machine architecture) used for the macro’s name, and what remains is joined to the text.

The high (most significant) bit of the character is always cleared (set to zero) by sendmail.

Multicharacter Names

Beginning with V8.7, macro names can be multicharacter. A multicharacter macro name must always appear inside a curly brace pair.[6] For example:

D{name}text

Here, name is one or more characters that form the macro name. If there are no characters between the curly braces, sendmail prints the following error and names the macro "{ }“:

configfile: line num: Name required for macro/class

A multicharacter macro name can contain only letters, digits, and the underscore character. Each bad character between the curly braces (including spaces) will produce the following error and ...

Get Sendmail, 3rd 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.