Omar Polo <o...@omarpolo.com> writes: > On 2024/10/17 11:56:31 -0500, "Robert B. Carleton" <r...@rbcarleton.net> > wrote: >> I've been hunting around for some kind of utility that I can use from >> mail(1) that can be fed emails on the stdin and convert MIME, TNEF, >> HTML, and the like into text. I haven't had much luck finding that kind >> of thing. I'm familiar with mpack from packages, but I'm looking for >> something that can handle a wider range of input. Any suggestions? > > There's (was?) someone on tech@ trying to fiddle with mail(1) to handle > MIME and whatnot, not sure if they got to the part of decoding too. > There are also some thirdy part version of mail(1) that I *believe* > handle MIME (both in composing and when reading.) > > Otherwise, I can suggest mshow(1) from the mblaze package. It can read > a mail from standard input and render it nicely, as well as allowing you > to extract one of its parts (either the attachments or inline). You > could run it as > > $ mail > [...select a mail...] > & !rm mail > & s mail > & !mshow ./mail > [...contents of the mail nicely formatted...] > & !mshow -t ./mail > [...list MIME parts...] > & !mshow -x ./mail N > [extracted part N from ./mail] > > (I'm not an heavy user of mail(1) so probably there's a better way to do > this.) > > At this point however switching away from mail(1) and embracing mblaze > is probably easier ;-) > > HTH
Using "| mshow -" works for most things I've tried so far. Using mail(1) is mostly a backup to using Emacs Rmail. I'm not sure why, but the TUI for Rmail can be a little slow when I ssh in and run it. Sometimes I use mail(1) to take a quicker look at mail when I'm on the road.