2021-01-17 22:09:55 +00:00
|
|
|
.Dd January 17, 2021
|
2016-07-22 19:36:46 +00:00
|
|
|
.Dt MSHOW 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mshow
|
2018-02-04 22:19:00 +00:00
|
|
|
.Nd render messages and extract MIME parts
|
2016-07-22 19:36:46 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl h Ar headers
|
2016-07-29 15:07:25 +00:00
|
|
|
.Op Fl A Ar mimetypes
|
2018-04-17 13:26:19 +00:00
|
|
|
.Op Fl nqrBFHLN
|
2016-07-22 19:36:46 +00:00
|
|
|
.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
|
|
|
|
.Nm
|
2018-02-04 22:19:00 +00:00
|
|
|
renders the specified
|
|
|
|
.Ar msgs
|
|
|
|
to the standard output, by default.
|
|
|
|
.Po
|
2016-07-22 19:36:46 +00:00
|
|
|
See
|
2016-07-22 19:43:03 +00:00
|
|
|
.Xr mmsg 7
|
2016-07-22 19:36:46 +00:00
|
|
|
for the message argument syntax.
|
2018-02-04 22:19:00 +00:00
|
|
|
.Pc
|
|
|
|
If used interactively and no
|
|
|
|
.Ar msgs
|
|
|
|
are specified,
|
2017-07-10 18:56:42 +00:00
|
|
|
.Nm
|
2017-05-23 13:16:27 +00:00
|
|
|
displays the current message using colorization and a pager.
|
2016-07-22 19:36:46 +00:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl h Ar headers
|
|
|
|
Display the headers in the colon-separated list
|
2017-07-10 18:56:42 +00:00
|
|
|
.Ar headers ,
|
2016-07-22 19:36:46 +00:00
|
|
|
instead of the default headers
|
2017-08-20 15:11:22 +00:00
|
|
|
.Sq Li from\&:subject\&:to\&:cc\&:date\&:reply\&-to\&: .
|
2016-07-29 15:07:25 +00:00
|
|
|
.It Fl A Ar mimetypes
|
|
|
|
Define
|
2021-01-17 22:09:55 +00:00
|
|
|
.Sq Li "multipart/alternative"
|
2016-07-29 15:07:25 +00:00
|
|
|
preference.
|
|
|
|
.Ar mimetypes
|
|
|
|
is a colon-separated list of
|
2017-07-10 18:56:42 +00:00
|
|
|
MIME types which will be preferred,
|
|
|
|
in the order given,
|
|
|
|
when rendering
|
2021-01-17 22:09:55 +00:00
|
|
|
.Sq Li "multipart/alternative"
|
2016-07-29 15:07:25 +00:00
|
|
|
parts.
|
2021-01-17 22:23:15 +00:00
|
|
|
If no MIME type matches, the last MIME part will be rendered.
|
2016-07-29 15:07:25 +00:00
|
|
|
.Pp
|
2021-01-17 22:09:55 +00:00
|
|
|
When
|
|
|
|
.Ar mimetypes
|
|
|
|
is
|
|
|
|
.Sq Li all ,
|
|
|
|
.Nm
|
|
|
|
will render all parts of a
|
|
|
|
.Sq Li "multipart/alternative"
|
|
|
|
part.
|
|
|
|
.Pp
|
2016-07-29 15:07:25 +00:00
|
|
|
Defaults to
|
|
|
|
.Sq Li "text/plain:text/html" .
|
2017-05-23 13:05:33 +00:00
|
|
|
.It Fl n
|
|
|
|
Don't update the current message link.
|
2016-07-22 19:36:46 +00:00
|
|
|
.It Fl q
|
|
|
|
Don't render the body, stop after header output.
|
|
|
|
.It Fl r
|
|
|
|
Don't render the body, print raw body.
|
2017-03-13 14:55:29 +00:00
|
|
|
This may be dangerous to use on a tty.
|
2018-04-17 13:26:19 +00:00
|
|
|
.It Fl B
|
|
|
|
Decode encoded-words also in MIME parameters in direct violation
|
|
|
|
of RFC 2047.
|
|
|
|
This is useful if the attachment names look like
|
|
|
|
.Sq Li =?UTF-8?Q?stuff?= .
|
2017-09-22 13:37:36 +00:00
|
|
|
.It Fl F
|
|
|
|
Don't apply filters to MIME parts.
|
2016-07-22 19:36:46 +00:00
|
|
|
.It Fl H
|
|
|
|
Don't decode the headers, print all raw headers.
|
2017-03-13 14:55:29 +00:00
|
|
|
This may be dangerous to use on a tty.
|
2016-07-22 19:36:46 +00:00
|
|
|
.It Fl L
|
|
|
|
Don't filter the headers, print all decoded headers.
|
2017-06-18 15:31:19 +00:00
|
|
|
.It Fl N
|
|
|
|
Don't show MIME structure markers.
|
2016-07-22 19:36:46 +00:00
|
|
|
.It Fl x Ar msg
|
|
|
|
Switch to extraction mode: extract
|
|
|
|
.Ar parts
|
|
|
|
from the message
|
|
|
|
.Ar msg
|
|
|
|
into files.
|
|
|
|
.Ar parts
|
2017-07-02 16:22:51 +00:00
|
|
|
can be specified by number, filename or
|
2016-07-22 22:46:48 +00:00
|
|
|
.Xr fnmatch 3
|
|
|
|
pattern.
|
2018-08-27 08:28:45 +00:00
|
|
|
If no
|
|
|
|
.Ar parts
|
|
|
|
are specified, extracts all attachments with a filename.
|
2016-07-22 19:36:46 +00:00
|
|
|
.It Fl O Ar msg
|
2016-07-22 22:46:48 +00:00
|
|
|
Like
|
|
|
|
.Fl x
|
2016-08-06 17:30:45 +00:00
|
|
|
but write to standard output.
|
2017-03-13 14:55:29 +00:00
|
|
|
This may be dangerous to use on a tty.
|
2016-08-06 17:30:45 +00:00
|
|
|
When used together with
|
2016-08-06 18:10:33 +00:00
|
|
|
.Fl r ,
|
|
|
|
the whole part is raw,
|
|
|
|
that is,
|
|
|
|
un-decoded and including MIME part headers.
|
2016-07-22 19:36:46 +00:00
|
|
|
.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
|
2017-07-10 18:56:42 +00:00
|
|
|
.Nm ,
|
|
|
|
by default, decodes all
|
2016-07-22 19:36:46 +00:00
|
|
|
.Sq Li text/* ,
|
2017-07-10 18:56:42 +00:00
|
|
|
.Sq Li message/rfc822
|
|
|
|
and
|
2016-07-22 19:36:46 +00:00
|
|
|
.Sq Li multipart/*
|
|
|
|
parts,
|
|
|
|
and re-encodes them into UTF-8 if necessary.
|
|
|
|
.Pp
|
|
|
|
Other filters can be specified in the file
|
2018-08-24 17:11:22 +00:00
|
|
|
.Pa ${MBLAZE:-$HOME/.mblaze}/filter
|
|
|
|
.Po
|
|
|
|
or via
|
|
|
|
.Ev MAILFILTER
|
|
|
|
.Pc ,
|
2018-02-04 22:19:00 +00:00
|
|
|
in the format:
|
|
|
|
.Pp
|
2016-07-22 19:36:46 +00:00
|
|
|
.D1 Ar type/subtype Ns Li \&: Ar command
|
|
|
|
or
|
|
|
|
.D1 Ar type Ns Li \&: Ar command
|
2018-02-04 22:19:00 +00:00
|
|
|
.Pp
|
2016-07-22 19:36:46 +00:00
|
|
|
.Nm
|
|
|
|
will then spawn a pipe to
|
|
|
|
.Ar command ,
|
|
|
|
write the MIME part
|
2018-08-24 17:11:22 +00:00
|
|
|
to standard input
|
2016-07-22 19:36:46 +00:00
|
|
|
and display the output.
|
|
|
|
The environment variable
|
|
|
|
.Ev PIPE_CHARSET
|
|
|
|
will be set to the charset declared in the MIME part,
|
|
|
|
if known.
|
2018-01-07 22:00:06 +00:00
|
|
|
.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
|
2018-02-04 22:19:00 +00:00
|
|
|
The output is an RFC 5322 message that should be rendered again.
|
2018-01-07 22:00:06 +00:00
|
|
|
.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.
|
2017-05-23 13:16:27 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width MBLAZE_NOCOLOR
|
2018-08-24 17:11:22 +00:00
|
|
|
.It Ev MAILFILTER
|
|
|
|
Path to an alternative
|
|
|
|
.Pa filter
|
|
|
|
file.
|
|
|
|
.It Ev MBLAZE_NOCOLOR
|
|
|
|
If non-empty,
|
|
|
|
.Nm
|
|
|
|
will not spawn a colorization filter.
|
2017-05-23 13:16:27 +00:00
|
|
|
.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.
|
|
|
|
.El
|
2016-07-22 19:36:46 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Ex -std
|
|
|
|
.Sh SEE ALSO
|
2016-07-22 19:43:03 +00:00
|
|
|
.Xr mmsg 7
|
2016-07-22 19:36:46 +00:00
|
|
|
.Sh AUTHORS
|
2017-01-21 16:17:12 +00:00
|
|
|
.An Leah Neukirchen Aq Mt leah@vuxu.org
|
2016-07-22 19:36:46 +00:00
|
|
|
.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/
|