'BlankSub'' ''''


Set unquoted space replacement character All versions

Some mailer programs have difficulty handling addresses that contain spaces. Such addresses are both illegal under RFC2821 and RFC2822 and subject to gross misinterpretation. For example, the address:

John Q Public@wash.dc.gov     decidedly not kosher

is viewed by some MUA programs as being composed of three separate addresses: John, Q, and Public@wash.dc.gov. To prevent this misinterpretation, such MUAs usually either quote the user portion or escape each space with a backslash:

"John Q Public"@wash.dc.gov     quoted
John\ Q\ Public@wash.dc.gov     escaped

The BlankSub option is intended to handle an address that contains internal spaces, and is neither quoted nor escaped. For sendmail a space is any character defined by the C-language library routine isspace(3).

Most sites use a . (dot or period) or an _ (underscore) character to replace unquoted space characters. That is, they declare the BlankSub option as one of the following:

O BlankSub=.
O BlankSub=_

Feeding the address:

John Q Public@wash.dc.gov

through sendmail with the option BlankSub set to a dot yields:


The forms of the BlankSub option are as follows:

O BlankSub=char             configuration file (V8.7 and later) 
-OBlankSub=char             command line (V8.7 and later) 
define(`confBLANK_SUB',char)    mc configuration (V8.7 and later) 
OBchar                      configuration file (deprecated) 
-oBchar                     command line (deprecated) 

The argument char is of type character and is a single character. The default, if this option is omitted or if the char argument is omitted, is that an unquoted space character is replaced with a space character (which does nothing to correct the problem). The default for the mc technique is the dot (.) character.

Note that old-style addresses are delimited from each other with spaces rather than commas. Such addresses can be wrongly joined into a single address if the char is other than a space. Acceptance of such old-style addresses is determined by the setting of the OldStyleHeaders option (OldStyleHeaders).

Also note that this BlankSub option can also be used when tokenized addresses are reassembled (see Section 18.3.3).

The BlankSub option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command