Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"
On 08Sep2019 11:18, Marcelo Laia 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-re...@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
Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"
On Sun, Sep 08, 2019 at 11:18:08AM -0300, Marcelo Laia wrote: > 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"? I have seen this happen occasionally (even sometimes with a completely empty text/plain part). But I don't think it's a reasonable idea to expect mutt to be able to solve this kind of problem. Something like "if the size delta between the two parts of the multipart/mixed message is > N" would be pretty hard logic, and this would probably be the wrong place to write such logic. You could probably write some kind of custom helper program if you really needed to, but my guess is that simply viewing the text/html part manually (as you mentioned) is going to be the easier thing to do in these rare cases. You could write the sender and suggest that they implement the multipart/alternative messages correctly, or else just send text/html only. w
Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"
On Sun, Sep 08, 2019 at 11:18:08AM -0300, Marcelo Laia 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. I have seen messages like the one you mention. They are typically newsletters and such (anything composed with an e-mail client is unlikely to yield that, in my experience, or at least I can't recall if I have ever seen one of those). What I do is to filter all newsletters to their proper folder, and then I have this in my muttrc: auto_view text/html folder-hook . 'unalternative_order *; alternative_order text/plain text/html' folder-hook newsletters 'unalternative_order *; alternative_order text/html text/plain' So my folder "newsletters" will see HTML before text, but for the rest of the folders, text comes first. I don't know if this solution is OK for your current workflow / setup, but at least it's working quite well for me. Cheers, -- José María (Chema) Mateos || https://rinzewind.org/
Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"
On 08/09/19 at 10:47, Patrick Shanahan wrote: > * Marcelo Laia [09-08-19 10:22]: > > I have following for quite some years and do not recall ever seeing "don't > support html": > > mailcap: > text/html; w3m -dump -v -F -T text/html %s; nametemplate=%s.html; > needsterminal > text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput > .muttrc: > alternative_order text/plain text/enriched text/html text > application/postscript image/* > auto_view text/richtext text/html text/x-sgml text/x-vcard text/x-sh \ I try yours and I see: "your mailread don't support html e-mails". If I change alternative_order text/plain text/enriched text/html (...) to alternative_order text/html text/plain text/enriched (...) I see the html mails. But, all html text is read first, instead the text plain message. -- Marcelo
Re: Alternate html and text plain avoinding message like "your mailreader dont support html-mail"
* Marcelo Laia [09-08-19 10:22]: > Hi, > > I would like to read multpart (html and alternative text together) text/plain > first. > > So, I set muttrc as follow: > > .mutt/muttrc > auto_view text/html > alternative_order text/plain text/html > > and mailcap as: > .mutt/mailcap > text/html; lynx -force_html -assume_charset=gbk -assume_local_charset=gbk / > -assume_unrec_charset=gbk -display_charset=utf8 -dump -force_html '%s'; / > description="HTML Text"; nametemplate=%s.html; copiousoutput > > This is ok and mutt read text plain first when message have only text plain or > both, html end text plain. > > 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. > > If I change muttrc to: > > .mutt/muttrc > auto_view text/html > alternative_order text/html text/plain > > mutt will display html text for all multpart mail, ignoring text plain. > > 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"? I have following for quite some years and do not recall ever seeing "don't support html": mailcap: text/html; w3m -dump -v -F -T text/html %s; nametemplate=%s.html; needsterminal text/html; w3m -dump %s; nametemplate=%s.html; copiousoutput .muttrc: alternative_order text/plain text/enriched text/html text application/postscript image/* auto_view text/richtext text/html text/x-sgml text/x-vcard text/x-sh \ text/x-csrc application/x-tex \ application/x-dvi applicatoin/x-gzip-dvi application/x-gzip \ application/x-gunzip application/x-cpio application/x-gtar \ application/x-tar application/x-tar-gz application/x-rar-compressed \ application/x-zip-compressed application/zip application/x-csh \ application/x-sh application/x-script application/x-shellscript \ application/x-latex application/x-tex application/x-shar \ application/x-troff application/x-troff-man application/x-troff-me \ application/x-pgp-message application/msword \ application/ms-tnef application/ms-word application/rtf \ application/octet-stream application/x-tcl application/x-perl \ application/x-debian-package message/partial \ application/pdf application/jpeg -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode