s/qmail:

NAME
DESCRIPTION
SEE ALSO

NAME

tcp-environ - TCP-related environment variables

DESCRIPTION

The following environment variables describe a TCP connection. They are set up by tcpclient and tcpserver as well as sslclient and sslserver.

Note that TCPLOCALHOST, TCP6LOCALHOST, TCPREMOTEHOST, TCP6REMOTEHOST, and TCPREMOTEINFO, TCP6REMOTEINFO, can contain arbitrary characters.
PROTO

The string TCP, or TCP6.

TCPLOCALHOST/TCP6LOCALHOST

The domain name of the local host, with uppercase letters converted to lowercase. If there is no currently available domain name for the local IP address, TCPLOCALHOST, TCP6LOCALHOST is not set.

TCPLOCALIP

The IPv4 address of the local host, in dotted-decimal form.

TCP6LOCALIP

The compactified IPv6 address of the local host.

TCPLOCALPORT/TCP6LOCALPORT

The local TCP port number, in decimal.

TCPREMOTEHOST/TCP6RMOTEHOST

The domain name of the remote host, with uppercase letters converted to lowercase. If there is no currently available domain name for the remote IP address, TCPREMOTEHOST or TCP6REMOTEHOST is not set.

TCPREMOTEINFO/TCP6REMOTEINFO

A connection-specific string, perhaps a username, supplied by the remote host via 931/1413/IDENT/TAP. If the remote host did not supply connection information, TCPREMOTEINFO, TCP6REMOTEINFO is not set.

TCPREMOTEIP

The IPv4 address of the remote host.

TCP6REMOTEIP

The IPv6 address of the remote host.

TCPREMOTEPORT/TCP6REMOTEPORT

The remote TCP port number.

TCP6INTERFACE

contains the interface name for IPv6 connections.

SEE ALSO

tcpclient(1), tcpserver(1), sslclient(1), sslserver(1), tcp(4)