${envid}

The original DSN envelope ID V8.8 and later

RFC1891 specifies that the keyword ENVID can be given to the MAIL From: command:

MAIL From:<address> ENVID=envelopeID

ENVID is used to propagate a consistent envelope identifier (distinct from the Message-ID: header; see Message-ID: on page 1159) that will be permanently associated with the message. The envelopeID can contain any ASCII characters between ! and ~, except + and =. Any characters outside that range must be encoded by prefixing an uppercase, two-digit, hexadecimal representation of it with a plus sign. For example, an envelopeID composed of the letter X followed by a delete character would be encoded like this:

X+7F

When mail is received over an SMTP channel and an ENVID identifier is specified, that identifier is saved as part of the envelope information. The value of the ENVID identifier is saved in and restored from the qf file’s Z line (Z line on page 458). For bounced mail, the ENVID identifier is printed with the Original-Envelope-Id: DSN header (see RFC1894) as part of the DSN MIME body. Beginning with V8.8 sendmail, an ENVID identifier can also be assigned to a message with the -V command-line switch (-V on page 249).

The ${envid} macro is set only during delivery. By contrast, the ${dsn_envid} macro (${dsn_envid} on page 820) is set when mail is received via SMTP and when the -V command-line switch (-V on page 249) is used to set the envelope identifier.

When mail is delivered, the value of the envelope’s ENVID ...

Get sendmail, 4th 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.