![]() ![]() |
25.1 OverviewThe H header configuration file command tells sendmail which headers are required for inclusion in the header portion of mail messages. Some headers, such as Date:, are added only if one is not already present. Others, such as Received: (Received:), are added even if one or more are already present. The form for the header command is: H?flags?name:field
The H must begin the line. The optional ?flags? (the question marks are literal), if present, must immediately follow the H with no intervening space. We will discuss header ?flags? after the name and field are explained. The name is the name of the header, such as From. The name must immediately follow the ?flags?, if present, or the H if there are no flags. A colon then follows, which can be surrounded by optional space characters. The field is last and constitutes everything from the first nonspace character following the colon to the end of the line: Hname : field The colon must be present. If it is absent, sendmail prints the following error message and ignores that H command: header syntax error, line "offending H command here" The "offending H command here" is the full text of the H command in the configuration file that caused the error. Prior to V8.10 sendmail, the field could only be the text of an ordinary header. Beginning with V8.10, the field can also be a $ > or $+> operator (Section 25.5) followed by the name or number of a rule set through which the header's value is to be passed: Hname : $>rule set As with all configuration commands, a line that begins with a space or a tab is joined to the line above it. In this way, header commands can be split over one or more lines: HReceived: $?sfrom $s $.by $j ($v/$V) id $i; $b When sendmail reads these two lines from the configuration file, they are internally joined to form the single line: HReceived: $?sfrom $s $.by $j ($v/$V)\n id $i; $b The \n illustrates that when lines are joined, the newline and tab character are retained. This results in the header looking the same as it did in the configuration file (minus the leading H) when it is later emitted by sendmail. |
![]() ![]() |