Recommended Headers

Every sendmail.cf file should have a minimal complement of header definitions. Here we present a recommendation. Don’t use this as is. The details are not generic to all versions of sendmail, nor are they appropriate for all sites:

H?P?Return-Path: $g
HReceived: $?sfrom $s $.by $j ($v/$V) id $i; $b       ← mandatory
H?D?Date: $a                                          ← mandatory
H?F?From: $q                                          ← mandatory
H?x?Full-Name: $x
H?M?Message-Id: <$t.$i@$j>                      ← mandatory
H?D?Resent-Date: $a                                   ← mandatory
H?F?Resent-From: $q                                   ← mandatory
H?M?Resent-Message-Id: <$t.$i@$j>                     ← mandatory

Each of these is described individually at the end of this chapter. Except for Received: (Received: on page 1162), none is added to any mail message that already has that particular header present.

The Return-Path: header (Return-Path: on page 1165) is removed if present, and is added only if the delivery agent for the recipient has the F=P flag present. Similarly, the Date: relies on F=D, the From: relies on F=F, the Full-Name: relies on F=x, and the Message=Id: relies on F=M.

Of those shown, only the seven indicated are truly mandatory and must be declared in every configuration file. The others are highly recommended.

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.