''$_'' '''


RFC1413 validation and IP source route V8.1 and above

RFC1413, Identification Protocol, describes a method for identifying the user and host that initiate network connections.[13] It relies on the originating host, which must be running the identd(8) daemon.

[13] Bugs in Ultrix and OSF/1 (and maybe others) break the ident protocol.

When the V8 sendmail daemon receives a network connection request (and if Timeout.ident option, See this section, is nonzero), it attempts to connect to the originating host's identd service. If the originating host properly supports identification, sendmail reads the login name of the user who initiated the connection (although sendmail will read whatever the other side sends, including garbage). The sendmail program then appends an @ and the originating hostname to what it interprets as the username. If the originating hostname is an IP number in square brackets, sendmail attempts to convert the number to a hostname. The final result, in the form user@host, is assigned to $_.

When sendmail is run on the local machine, it sets $_ to be the name of the user that corresponds to the user-id of the process that ran sendmail. It gets that name by calling getpwuid(3). If the call fails, the name is set to the string:

Unknown UID: num

Here, num is the user-id for which a login name could not be found.

Next, an @ and the name of the local machine are appended to the name, and the result is assigned to $_.

Beginning with V8.7 sendmail, attempts at IP source routing can also be stored in this macro. If sendmail was compiled with IP_SRCROUTE defined, that IP source routing information will be added to $_ after the user and host described earlier. The format of this additional information is described in IP_SRCROUTE.

The $_ macro is used in the standard Received: header like this:

HReceived: $?sfrom $s $.$?_($?s$|from $.$_)$.

Note that the $& prefix is necessary when you reference this macro in rules (that is, use $&_, not $_).

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command