Header Option Files
Some special option files may be associated with a channel that describe how to trim the headers on messages queued to that channel. This facility is completely general and may be applied to any channel; it is controlled by the headertrim, noheadertrim, headerread, and noheaderread channel keywords.
An option file can be used in addition to the channel keywords to configure the behavior of a channel. This configuration tool is available for the Solaris /var/mail, the UUCP, the pipe, and the SMTP channels. In addition, any channel can use a header option file in order to create or remove channel-specific headers in messages processed by the channel's master program.
Header option files have a different format than other IMTA option files, and thus a header option file is always a separate file.
Header Option File Location
For header trimming to be applied upon message dequeue, IMTA looks in the config directory (/etc/opt/SUNWmail/imta) for header options files with names of the form channel_headers.opt, where channel is the name of the channel with which the header option file is associated. The headertrim keyword must be specified on the channel to enable the use of such a header option file.
For header trimming to be applied upon message enqueue, IMTA looks in the config directory (/etc/opt/SUNWmail/imta) for header options files with names of the form channel_read_headers.opt, where channel is the name of the channel with which the header option file is associated. The headerread keyword must be specified on the channel to enable the use of such a header option file.
Header option files should be world readable.
Header Option File Format
Simply put, the contents of a header option file are formatted as a set of message header lines. Note, however, that the bodies of the header lines do not conform to RFC 822.
The general structure of a line from a header options file is:
|
|
Header-name: OPTION=VALUE, OPTION=VALUE, OPTION=VALUE, ...
|
|
Header-name is the name of a header line that IMTA recognizes (any of the header lines described in this manual may be specified, plus any of the header lines standardized in RFC 822, RFC 987, RFC 1049, RFC 1421, RFC 1422, RFC 1423, RFC 1424, RFC 1327, and RFC 1521 (MIME).
Header lines not recognized by IMTA are controlled by the special header line name Other:. A set of options to be applied to all header lines not named in the header option file can also be given on a special Defaults: line. Use of Defaults: guards against the inevitable expansion of IMTA's known header line table in future releases.
Various options may then be specified to control the retention of the corresponding header lines. The available options listed in TABLE 3-16.
TABLE 3-16 Header Option File Options
Option
|
Description
|
ADD (Quoted String)
|
The ADD option creates a completely new header line of the given type. The new header line contains the specified string. The header line created by ADD will appear after any existing header lines of the same type. The ADD option cannot be used in conjunction with the header line type; it will be ignored if it is specified as part of an Other: option list.
|
FILL
(Quoted String)
|
The FILL option creates a completely new header line of the given type if and only if there are no existing header lines of the same type. The new header line contains the specified string
The FILL option cannot be used in conjunction with the header line type; it will be ignored if it is specified as part of an Other: option list.
|
GROUP
(Integer 0 or 1)
|
This option controls grouping of header lines of the same type at a particular precedence level. A GROUP value of 0 is the default, and indicates that all header lines of a particular type should appear together. A value of 1 indicates that only one header line of the respective type should be output and the scan over all header lines at the associated level should resume, leaving any header lines of the same type unprocessed. Once the scan is complete it is then repeated in order to pick up any remaining header lines. This header option is primarily intended to accommodate Privacy Enhanced Mail (PEM) header processing.
|
MAXCHARS (Integer)
|
This option controls the maximum number of characters which may appear in a single header line of the specified type. Any header line exceeding that length is truncated to a length of MAXCHARS. This option pays no attention to the syntax of the header line and should never be applied to header lines containing addresses and other sorts of structured information. The length of structured header lines should be controlled with the maxheaderchars and maxheaderaddrs channel keywords.
|
MAXIMUM (Integer)
|
This option controls the maximum number of header lines of this type that may appear. This has no effect on the number of lines; after wrapping, each individual header line might consume. A value of -1 is interpreted as a request to suppress this header line type completely.
|
MAXLINES (Integer)
|
This option controls the maximum number of lines all header lines of a given type may occupy. It complements the MAXIMUM option in that it pays no attention to how many header lines are involved, only to how many lines of text they collectively occupy. As with the MAXIMUM option, headers are trimmed from the bottom to meet the specified requirement.
|
PRECEDENCE (Integer)
|
This option controls the order in which header lines are output. All header lines have a default precedence of zero. The smaller the value, the higher the precedence. Thus, positive PRECEDENCE values will push header lines toward the bottom of the header while negative values will push them toward the top. Equal precedence ties are broken using IMTA's internal rules for header line output ordering.
|
Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.