O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Headers by Category

The sendmail program contains an internal list of header names that are organized conceptually into categories. The names and categories are defined in conf.c (Section 25.6). Each category is defined by one or more H_ flags in that file, the names of which are listed under the Flags column of all the tables that follow.

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:), none is added to any mail message that already has that particular header present.

The Return-Path: header (Return-Path:) is added only if it is not already present and 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.

Sender ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required