$s

The sender host’s name All versions

The $s macro contains the name of the sender’s machine (host). $s is given the name of the local host as its value when sendmail starts, unless the -p command-line switch (-p on page 246) is used, in which case $s is given the value specified by that switch. Thereafter, $s is given a new value by sendmail only if the mail message was received via SMTP. For bounced mail, the $s value is always localhost.

The s macro is intended for use in the Received: header definition:

HReceived: $?sfrom $s $.by $j$?r with $r$. id $i

The phrase from host will be included in this header line if $s has any value. Here, host is the name of the sending machine.

The value in $s is saved to the qf file when the mail message is queued and restored to $s when the queue is later processed.

$s is transient. It can be defined on the command line but should not be defined in the configuration file. Note that a $& prefix is necessary when you reference this macro in rules (that is, use $&s, not $s).

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.