Previous Section Next Section

MustQuoteChars

Quote nonaddress characters V8.8 and later

All addresses are composed of address information and nonaddress information. The two most common forms of addresses look like this:

address (nonaddress)
nonaddress <address>

Usually, the nonaddress information is a user's full name or something similar. RFC2822 requires that certain characters be quoted if they appear in the nonaddress part of an address:

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

Note that here we show angle brackets, although they will not be part of this option's setting (they are set internally by sendmail).

Nonaddress information inside parentheses is already quoted by those parentheses. But nonaddress information that is outside parentheses and contains any of these characters needs to be quoted with full quotation marks. To illustrate, consider this address:

From: Bob@home <bob@here.uofa.edu>

Because the nonaddress part Bob@home contains an @ character, sendmail is required to quote the entire phrase, thus forming:

From: "Bob@home" <bob@here.uofa.edu>

Note that the address part contains angle brackets that are not quoted. They are unquoted because they surround the address part, and are not considered part of the nonaddress part.

If you wish to add characters to the mandatory list of characters that will be quoted, you can do so with the MustQuoteChars option, the forms of which are as follows:

O MustQuoteChars=more                  configuration file (V8.8 and later) 
-OMustQuoteChars=more                  command line (V8.8 and later) 
define(`confMUST_QUOTE_CHARS', `more') mc configuration (V8.8 and later) 

Here, more is of type string and is the list of additional characters that you wish to see quoted in the nonaddress part of addresses. Note that the more characters replace the . and ` characters, so if you wish to retain those latter two characters, you must include them in your declaration. If more is missing, the . and ` characters are dropped from the default:

@ , ; : \ ( ) [ ]

The default for the mc configuration technique is to not define this option, in which case the default is:

@ , ; : \ ( ) [ ] . '

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

    Previous Section Next Section