summary refs log tree commit diff
path: root/man/mhdr.1
blob: efd4fbf5f8d5827f7c3c1970605c6d1892c2e35d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.Dd August 17, 2016
.Dt MHDR 1
.Os
.Sh NAME
.Nm mhdr
.Nd show mail headers
.Sh SYNOPSIS
.Nm
.Op Fl h Ar header
.Op Fl d
.Op Fl H
.Op Fl M
.Op Fl A | Fl D
.Op Ar msgs\ ...
.Sh DESCRIPTION
.Nm
prints the mail headers of the given
.Ar msgs .
See
.Xr mmsg 7
for the message argument syntax.
.Pp
If no
.Ar msgs
are passed,
.Nm
will default to the current message.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl h Ar header
Only print the values of the headers in the colon-separated list
.Ar header .
.It Fl d
Decode the headers according to RFC 2047.
.It Fl H
Prefix all output lines with the file name of the message, separated
by a tab.
.It Fl M
Search for all occurrences of the headers
(default: only the first).
.It Fl A
Scan for RFC 5322 addresses in the headers and print them line by line.
.It Fl D
Assume header contains RFC 5322 date and print as Unix timestamp.
.El
.Sh EXIT STATUS
The
.Nm
utility exits 0 on success,
1 when no header was printed,
and >1 if an error occurs.
.Sh SEE ALSO
.Xr mmsg 7
.Rs
.%A N. Freed
.%A N. Borenstein
.%B MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text
.%R RFC 2047
.%D November 1996
.Re
.Rs
.%A P. Resnick (ed.)
.%B Internet Message Format
.%R RFC 5322
.%D October 2008
.Re
.Sh AUTHORS
.An Christian Neukirchen Aq Mt chneukirchen@gmail.com
.Sh LICENSE
.Nm
is in the public domain.
.Pp
To the extent possible under law,
the creator of this work
has waived all copyright and related or
neighboring rights to this work.
.Pp
.Lk http://creativecommons.org/publicdomain/zero/1.0/