canlock-mhp -h | -v
canlock-mhp -f fieldname
Message Header Parser (mhp) for RFC5536 conformant Netnews articles.
The name of a single header field must be specified with the -f option.
The message in canonical format (with US-ASCII encoded CRLF line breaks) is read from stdin. If the message is in some local format (e.g. EBCDIC encoded or with LF line breaks), ist must be converted to canonical format before it can be used as input.
The input data may be a naked header without message body, but the emtpy line separater after the header must always be present. The syntax of the extracted header field is not checked beyond the folding. The rest of the message need not be fully RFC 5536 conformant too, as long as all header fields start on new lines (and are correctly folded, so that there is no ambiguity). Common syntax errors (like 8bit characters in the header) are ignored.
If the specified header field is found, it is extracted, unfolded and printed to stdout (without trailing line break).