Not all header semantics are defined in the configuration file.
Header lines that should only be included by certain mailers
(as well as other more obscure semantics)
must be specified in the
HdrInfo table in
conf.c. This table contains the header name
(which should be in all lower case)
and a set of header control flags (described below),
The flags are:
- Normally when the check is made to see if a header line is compatible
with a mailer,
sendmail will not delete an existing line.
If this flag is set,
sendmail will delete
even existing header lines.
if this bit is set and the mailer does not have flag bits set
that intersect with the required mailer flags
in the header definition in
the header line is
- If this header field is set,
treat it like a blank line,
it will signal the end of the header
and the beginning of the message text.
- Add this header entry
even if one existed in the message before.
If a header entry does not have this bit set,
sendmail will not add another header line if a header line
of this name already existed.
This would normally be used to stamp the message
by everyone who handled it.
- If set,
this is a timestamp
If the number of trace fields in a message
exceeds a preset amount
the message is returned
on the assumption that it has an aliasing loop.
- If set,
this field contains recipient addresses.
This is used by the
-t flag to determine who to send to
when it is collecting recipients from the message.
- This flag indicates that this field
specifies a sender.
The order of these fields in the
HdrInfo table specifies
for which field to return error messages to.
- Addresses in this header should receive error messages.
- This header is a Content-Transfer-Encoding header.
- This header is a Content-Type header.
- Strip the value from the header (for Bcc:).
Let's look at a sample
This structure indicates that the
all specify recipient addresses.
Full-Name: field will be deleted unless the required mailer flag
(indicated in the configuration file)
Text: fields will terminate the header;
these are used by random dissenters around the network world.
Received: field will always be added,
and can be used to trace messages.
struct hdrinfo HdrInfo =
/* originator fields, most to least significant */
/* destination fields */
/* message identification and control */
/* trace fields */
/* miscellaneous fields */
There are a number of important points here.
header fields are not added automatically just because they are in the
they must be specified in the configuration file
in order to be added to the message.
Any header fields mentioned in the configuration file but not
mentioned in the
HdrInfo structure have default processing performed;
they are added unless they were in the message already.
HdrInfo structure only specifies cliched processing;
certain headers are processed specially by ad hoc code
regardless of the status specified in
HdrInfo. For example,
From: fields are always scanned on ARPANET mail
to determine the sender;
this is used to perform the
return to sender function.
Full-Name: fields are used to determine the full name of the sender
this is stored in the macro
$x and used in a number of ways.
[Contents] [Previous] [Next]
Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright © 1999 www.cotse.com. All rights reserved.
Last modified: Friday April 02, 1999.