Manual Page Search Parameters

MHDR(1) General Commands Manual MHDR(1)

print message headers

mhdr [-h hdrs [-p parameter]] [-d] [-H] [-M] [-A | -D] [msgs ...]

mhdr prints the headers of the specified msgs. (See mmsg(7) for the message argument syntax.)

If no msgs are specified, mhdr will default to the current message.

If no hdrs are specified, mhdr will print all headers.

The options are as follows:

Only print the values of headers in the colon-separated list hdrs.
Extract a particular RFC 2045 parameter from the specified hdrs.
Decode the hdrs according to RFC 2047.
Prefix output lines with the filename of the message, followed by a tab.
Search for all occurrences of the hdrs (default: only the first).
Scan for RFC 5322 addresses in the hdrs and print them, one per line.
Assume header contains RFC 5322 date and print as Unix timestamp.

The mhdr utility exits 0 on success, 1 if no header was printed, and >1 if an error occurs.


N. Freed and N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, RFC 2045, November 1996.

N. Freed and N. Borenstein, MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text, RFC 2047, November 1996.

P. Resnick (ed.), Internet Message Format, RFC 5322, October 2008.

Leah Neukirchen <>

mhdr is in the public domain.

To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work.

August 17, 2016 x86_64