$b

The current date in RFC2822 format All versions

The $b macro contains the current date in ARPAnet format, as defined in RFC822, Support SMTP AUTH, and amended by RFC2822, Pitfalls.

Because $b holds the current date and time, sendmail frequently updates the value in that macro. When sendmail first starts to run, it places the current date and time into $b. Thereafter, each time an SMTP connection is made and each time the queue is processed, the value of the date and time in that macro is updated.

If the system call to time(3) should fail, the value stored in $b becomes Wed Dec 31 15:59:59 1969,[314] and no other indication of an error is given.

$b is chiefly intended for use in configuration-file header definitions that require ARPAnet format (such as Received:, Received: on page 1162).

$b is transient. If it is defined in the configuration file or in the command line, that definition can be ignored by sendmail. Note that a $& prefix is necessary when you reference this macro in rules (that is, use $&b, not $b).

[314] * The actual time depends on the local time zone.

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.