Alternate html and text plain avoinding message like "your mailreader dont support html-mail"

Cameron Simpson cs at cskk.id.au
Sun Sep 8 22:57:06 UTC 2019


On 08Sep2019 11:18, Marcelo Laia <marcelolaia at gmail.com> wrote:
>However, some messages have html and a single and sort alternate text 
>plain said "your mailreader don't support html message". in this case, I need to hint
>"v" and select alternate html and hint enter to read the message.

Yes, I get this rubbish all the time.

>There are some alternative to tell mutt to read first text plain only 
>if it is
>the full message? Ignoring text plain messages if it is short like "your
>mailreader don't support html message"?

Not really. How is mutt to determine this? (If you figure out a way to 
test this I'd be interested to hear it; then we could use that test).

I address this problem by keeping a list of the offending message 
authors and sources:

  ############################
  # alternative-order criteria
  message-hook . 'unalternative_order *; alternative_order text/plain text/html'
  # Apple Mail embeds attachments in the HTML part instead of outside the multipart/mixed
  message-hook '~h "X-Mailer: Apple Mail" ~X 1-' 'unalternative_order *; alternative_order text/html multipart/mixed text/plain'
  # senders who can't seem to master multipart/mixed, and send empty
  # or useless text/plain sections
  # or just badly badly formatted plain text, such as live.com etc
  message-hook '%f htmlers | ~f @no-reply at cc.yahoo-inc.com | ~f @outlook.com | ~f live.com | ~f @facebookmail.com' 'unalternative_order *; alternative_order text/html text/plain'

These rules rule for each message coutesy of "message-hook". In order:

  Scrub thhe alternative_order and set it to prefer text/plain.

  For Apple mail with attachments, prefer the HTML because it seems to 
  put some attachments in only the html half of the multipart/mixed.

  For authors in the "htmlers" group and authors from a list of known 
  incompetent domains (courtesy of their rubbish web mail systems), 
  prefer the html because the plain is useless.

And I just add people to the "htmlers" group as they are discovered.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list