-h

Initial hop count Deprecated

A hop is the transmittal of a mail message from one machine to another. Many such hops can be required to deliver a message. The number of hops (the hop count) is determined by counting the number of Received:[113] header lines in the header portion of an email message. The maximum number of allowable hops is compiled in for most versions of sendmail but is set by the MaxHopCount option with V8. When the hop count for a message exceeds the limit set by the MaxHopCount option (MaxHopCount on page 1046), the message is bounced. Ordinarily, the count begins at zero. The -h command-line switch is used to specify a beginning hop count.

The forms for the -h command-line switch are:

-hnum
-h num

Space between the -h and num is optional. If num is missing, sendmail prints the following error message and ignores that switch:

sendmail: option requires an argument -- h

If num begins with a character other than a digit, the offending text is printed:

Bad hop count (bad text)

The previous failure illustrates that the minimum hop count must be positive.

The -h switch was originally used by BerkNet to carry the hop count in the envelope. It currently has no application.

[113] * Actually, all headers marked with the H_TRACE flag in conf.c (H_TRACE Header Flag (V5 and Later) on page 1142) are counted.

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.