O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Header Field Contents

The field of the H configuration command can contain any ASCII characters, including whitespace and newlines that result from joining.[2] For most headers, however, those characters must obey the following rules for grouping:[3]

Atom

In the header field, space characters separate one item from another. Each space-delimited item is further subdivided by specials (described next), into atoms:

smtp       an atom
foo@host   atom special atom
Babe Ruth atom atom

An atom is the smallest unit in a header and cannot contain any control characters. When the field is an address, an atom is the same thing as a token (see Chapter 18).

Specials

The special characters are those used to separate one component of an address from another. They are internally defined as:

( ) < > @ , ; : \ " . [ ]

A special character can be made nonspecial by preceding it with a backslash character. For example:

foo;fum    atom special atom
foo\;fum one atom

The space and tab characters (also called linear-whitespace characters) are also used to separate atoms and can be thought of as specials.

Quoted text

Quotation marks can be used to force multiple items to be treated as a single atom. For example:

Babe Ruth    atom atom
"Babe Ruth" a single atom

Quoted text can contain any characters except for the quotation mark (") and the backslash character (\).

Any text

Some headers, such as Subject: (Subject:), impose minimal rules on the text in the header field. For such headers, atoms, specials, and quotes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required