3 ms·
I went all-in on this https://stevelosh.com/blog/2012/10/the-homely-mutt/ https://stevelosh.com/blog/2012/10/the-homely-mutt/ at some point but was eventually f
by user3939382 4y ago
I went all-in on this https://stevelosh.com/blog/2012/10/the-homely-mutt/ https://stevelosh.com/blog/2012/10/the-homely-mutt/ at some point but was eventually forced to give up due to the problem of HTML emails. A lot of the emails I receive are HTML-only, and the step of launching a browser tab to make them legible was too big a PITA/slow. If I could find a tool kind of like Firefox's "reader view" that could convert HTML emails by default to something plaintext I'd be in business. Until then I'm on horrendously slow Thunderbird, but at least the lag pain is upfront launching the program and not per email.
- layer8 4y agoYou can set up Mutt to display HTML mails with w3m or the like. That works very well.
- surteen 4y agoInstall lynx (or links or w3m). Add this to your ~/.muttrc: auto_view text/html alternative_order text/plain text/html Add this to ~/.mailcap: text/html; lynx -dump -localhost -force_html %s | sed 's/^ *//'; copiousoutput
- user3939382 4y agoThanks! I'll give that a shot.
- 5e92cb50239222b 4y agoAnother option is piping email body into pandoc: pandoc -f html -t plain you have to try all three and see what works best. In my experience, pandoc tries to reproduce the page faithfully using ascii art, while lynx output is the easiest to read. If you're going to use w3m, it's wise to wrap it with socksify to prevent email spam from tracking you: export SOCKS_SERVER="127.0.0.1:1" exec socksify w3m -dump
- eqvinox 4y agoOn Linux, you can also use "unshare" in your mailcap, e.g. text/html; unshare -U -n lynx -assume_charset=%{charset} -stdin -dump; copiousoutput; This creates a new user namespace (-U) and then network namespace (-n), meaning there is no way for the lynx process to communicate with the outside world. (requires unprivileged userns, which is default enabled on recent distros. "sysctl -w kernel.unprivileged_userns_clone=1" if not.)
- cbracken 4y agoI know someone mentioned Lynx, another option is to set up your mailcap to view using w3m. For reference, see .config/mutt/{muttrc,mailcap} here: https://git.bracken.jp/dotfiles/files.html https://git.bracken.jp/dotfiles/files.html