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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
.Dd July 22, 2016
.Dt MSHOW 1
.Os
.Sh NAME
.Nm mshow
.Nd render mail and extract MIME parts
.Sh SYNOPSIS
.Nm
.Op Fl h Ar headers
.Op Fl A Ar mimetypes
.Op Fl nqrFHLN
.Op Ar msgs\ ...
.Nm
.Fl x Ar msg
.Ar parts\ ...
.Nm
.Fl O Ar msg
.Ar parts\ ...
.Nm
.Fl t
.Ar msgs\ ...
.Nm
.Fl R
.Ar msg
.Sh DESCRIPTION
By default,
.Nm
renders the specified messages to the standard output.
See
.Xr mmsg 7
for the message argument syntax.
If used interactively, and no messages are specified,
.Nm
displays the current message using colorization and a pager.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl h Ar headers
Display the headers in the colon-separated list
.Ar headers ,
instead of the default headers
.Sq Li from\&:subject\&:to\&:cc\&:date\&:reply\&-to\&: .
.It Fl A Ar mimetypes
Define
.Sq Li "mixed/alternative"
preference.
.Ar mimetypes
is a colon-separated list of
MIME types which will be preferred,
in the order given,
when rendering
.Sq Li "mixed/alternative"
parts.
If no MIME type matches, the first MIME part will be rendered.
.Pp
Defaults to
.Sq Li "text/plain:text/html" .
.It Fl n
Don't update the current message link.
.It Fl q
Don't render the body, stop after header output.
.It Fl r
Don't render the body, print raw body.
This may be dangerous to use on a tty.
.It Fl F
Don't apply filters to MIME parts.
.It Fl H
Don't decode the headers, print all raw headers.
This may be dangerous to use on a tty.
.It Fl L
Don't filter the headers, print all decoded headers.
.It Fl N
Don't show MIME structure markers.
.It Fl x Ar msg
Switch to extraction mode: extract
.Ar parts
from the message
.Ar msg
into files.
.Ar parts
can be specified by number, filename or
.Xr fnmatch 3
pattern.
.It Fl O Ar msg
Like
.Fl x
but write to standard output.
This may be dangerous to use on a tty.
When used together with
.Fl r ,
the whole part is raw,
that is,
un-decoded and including MIME part headers.
.It Fl t
Switch to list mode: list all MIME parts
of each
.Ar msg .
.It Fl R Ar msg
Render the text parts from
.Ar msg ,
suitable for use in a reply.
.El
.Sh FILTERS
.Nm ,
by default, decodes all
.Sq Li text/* ,
.Sq Li message/rfc822
and
.Sq Li multipart/*
parts,
and re-encodes them into UTF-8 if necessary.
.Pp
Other filters can be specified in the file
.Pa ${MBLAZE:-$HOME/.mblaze}/filter
in the format
.D1 Ar type/subtype Ns Li \&: Ar command
or
.D1 Ar type Ns Li \&: Ar command
.Nm
will then spawn a pipe to
.Ar command ,
write the MIME part
and display the output.
The environment variable
.Ev PIPE_CHARSET
will be set to the charset declared in the MIME part,
if known.
.Pp
Filters can communicate with
.Nm
using their exit status:
.Bl -tag -compact -width 8n
.It 0
The output is printed as plain text.
.It 62
The output is printed raw, without escaping.
.It 63
Behave as if the filter never ran.
.It 64
The output is a RFC5322 message that should be rendered again.
.It 65 to 80
Render the
.Va n Ns \&- Ns 64th
part of this text/multipart part.
.El
All other exit statuses are regarded as errors.
.Sh ENVIRONMENT
.Bl -tag -width MBLAZE_NOCOLOR
.It Ev MBLAZE_PAGER
Any non-empty value of the environment variable
.Ev MBLAZE_PAGER
is used instead of the standard pagination program, specified in
.Ev PAGER .
When empty or set to
.Sq Ic cat ,
no pager is spawned.
.It Ev MBLAZE_NOCOLOR
If non-empty,
.Nm
will not spawn a colorization filter.
.El
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr mmsg 7
.Sh AUTHORS
.An Leah Neukirchen Aq Mt leah@vuxu.org
.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/
|