Hello, Todd.

On Sun, Apr 23, 2023 at 12:50:18 -0400, Todd Zullinger wrote:
> José María Mateos wrote:
> > On Sun, Apr 23, 2023 at 02:56:35PM +0000, Alan Mackenzie wrote:
> >> Some considerate organisation has been sending me MIME mails with
> >> content in a text/html section and a wholly blank text/plain version.
> >> What I see in mutt is the blank text/plain.  Who on Earth thought a
> >> blank text/plain section was somehow a good idea?

> [I know, I know, I'm answering a rhetorical question.]

> I suspect one likely group would be the companies who depend
> on advertising revenue.  With HTML, they can stuff tracking
> (whether direct like hidden pixels or indirect by changing
> any URLs in the message to go through their servers.  Those
> things aren't very useful in text/plain, so shipping a blank
> part just forces many folks to view the text/html.

> Of course, sending just text/html would work better -- but
> who knows what goes on in the minds of people willing to
> perform shady tracking. :)

Not me.

> > I've seen a worse version of this: the text version and the html version are
> > completely different.
> > 
> > On my side, I have this:
> > 
> > auto_view text/html
> > folder-hook . 'unalternative_order *; alternative_order text/plain 
> > text/html'
> > folder-hook boletines 'unalternative_order *; alternative_order text/html 
> > text/plain'
> > 
> > So normally I look at the plain-text version, except in my folder
> > "boletines" (Spanish for "newsletters"), where I default to HTML.
> > 
> > In those cases where I'm in another folder and I need to look at the HTML
> > content, I use this macro:
> > 
> > macro index,pager ,b "<view-attachments>/html<enter><view-mailcap><exit>" 
> > "View first HTML attachment in browser"
> > 
> > This opens the first available HTML attachmend (typically the message body)
> > in my browser of choice (set up via ~/.mailcap).

> An alternative (or addition) to the above is a message-hook:

> message-hook ~A 'unalternative_order "*"; alternative_order text/enriched 
> text/plain text'
> message-hook '~C "misbehaving-group@example\.com"' 'unalternative_order "*"; 
> alternative_order text/html'

That will be my first ever mutt hook!  It should certainly make sure I
never get confused by this particular organisation again.

> Replace ~C with ~f or other pattern as needed.  You may
> need to add something like:

>     auto_view text/html text/htm message/html message/htm

> to the configuration as well, if you want them to open in
> the mutt pager rather than in a browser.

I think I've already got an auto_view for text/html.

> I only view html via plain text, so I set auto_view as-needed.

I view mail primarily on a Linux console, going into X when I need to
look at things like PDF attachments.

> -- 
> Todd

-- 
Alan Mackenzie (Nuremberg, Germany)

Reply via email to