The MTA provides per-channel facilities for trimming or removing selected message header lines from messages. This is done through a combination of a channel keyword and an associated header option file or two. Header option file format is described in Header Option Files in Sun Java System Messaging Server 6.3 Administration Reference.
The headertrim keyword instructs the MTA to consult a header option file associated with the channel and to trim the headers on messages queued to that destination channel accordingly, after the original message headers are processed. The noheadertrim keyword bypasses header trimming. The keyword noheadertrim is the default.
The innertrim keyword instructs the MTA to perform header trimming on inner message parts, that is, embedded MESSAGE/RFC822 parts, as well. The noinnertrim keyword, which is the default, tells the MTA not to perform any header trimming on inner message parts.
The headerread keyword instructs the MTA to consult a header option file associated with the channel and to trim the headers on messages enqueued by that source channel accordingly, before the original message headers are processed. Note that headertrim header trimming, on the other hand, is applied after the messages have been processed and is the destination channel, rather than the source channel. The noheaderread keyword bypasses message enqueue header trimming. noheaderread is the default.
Unlike the headeromit and headerbottom keywords, the headertrim and headerread keywords may be applied to any channel whatsoever. Note, however, that stripping away vital header information from messages may cause improper operation of the MTA. Be extremely careful when selecting headers to remove or limit. This facility exists because there are occasional situations where selected header lines must be removed or otherwise limited.
Stripping away header information from messages may cause improper operation of the MTA. Be careful when selecting headers to remove or limit. These keywords are provided for the rare situations where selected header lines must be removed or limited. Before trimming or removing any header line, you must understand the usage of that header line and have considered the possible implications of its removal.
Header options files for the headertrim and innertrim keywords have names of the form channel_headers.opt with channel, the name of the channel with which the header option file is associated. Similarly, header options files for the headerread keyword have names of the form channel_read_headers.opt. These files are stored in the MTA configuration directory, instance_root/config/.