Previous Section Next Section

$q

The default format of the sender's address V8.6 and earlier

Beginning with V8.7 sendmail, the $q macro is no longer used. Instead, sendmail uses the $g and $x macros (see the end of this section).

Prior to V8.7 the $q macro was used to specify the form that the sender's address would take in header definitions. It was most often used in the From: and Resent-From: header lines.

The definition of $q had to adhere to the standard form of addresses as defined by RFC822. It had to contain just an address or an address and a comment. The traditional definitions of $q were:

Dq<$g>     as <george@wash.dc.gov
Dq$g       as george@wash.dc.gov

Dq$x <$g>  as George Washington <george@wash.dc.gov>
Dq$g ($x)  as george@wash.dc.gov (George Washington)

The full name is not always known and so $x can be undefined (empty). As a consequence, when the full name was included in the $q macro definition, it was often wrapped in a conditional test:

Dq$g$?x ($x)$.
Dq$?x$x $.<$g>

Prior to V8.7, $q had to be defined in the configuration file because it was used to define the fields of the Resent-From: and From: headers (From:).

Beginning with V8.7 sendmail, those headers are defined by using the $g and $x macros directly. For example:

H?F?Resent-From: $?x$x <$g>$|$g$.
H?F?From: $?x$x <$g>$|$g$.
    Previous Section Next Section