News for hackers. Stuff that matters.
Re:Mutt email client 25 years old by zadwang on Saturday August 15, 2020 @11:46PM (#24174863)
I use mutt, mbsync, maildrop, and mblaze, mairix, msmtp, oauth2 with gmail. I have local speed, two way sync, customized email filtering, fast searching, vim editing, and multiple machine freedom. I am happy.
Re:Mutt email client 25 years old by res0nat0r on Sunday August 16, 2020 @02:13AM (#24175654)
I would love absolutely Mutt if it weren't for everyone in the world using html email. I know you can view or strip html emails down to their essentials, but it doesn't render properly enough where I can reply to everything at work and not look like a fool because I'm missing some context. Too bad because Mutt is amazing.
Re:Mutt email client 25 years old by dmitriid on Sunday August 16, 2020 @04:29AM (#24176193)
It's going to get worse with Google's AMP Email: https://amp.dev/about/email/
Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @03:16AM (#24175903)
You can just set up Mutt to open HTML mail in Firefox.
Re:Mutt email client 25 years old by dancek on Sunday August 16, 2020 @04:27AM (#24176181)
A great example of the HN use of the word "just".
Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @04:35AM (#24176222)
I'm not sure what you are implying. That it is hard? It is only a single line added to the `mailcap` file:

    text/html; firefox '%s' &; test=test -n "$DISPLAY"; needsterminal;
After that's in place, you simply open attachments (via `view-attachments`) and call `view-attach` (usually via a key binding) on the HTML attachment.
Re:Mutt email client 25 years old by bravura on Sunday August 16, 2020 @09:21AM (#24177539)
You just used the word “simply” in the same was as you used the word “just”.

The argument GP was making is that what is obvious to one reader may not be obvious to another. So using the words “simply” or “just” or “obviously” does not add information, except to signal that you feel the reader is ignorant if they are not aware of what you’re explaining.

My PhD advisor always crossed these words out of my scientific writing, and I think it was a good change to make.

Re:Mutt email client 25 years old by sameerds on Sunday August 16, 2020 @11:34PM (#24183634)
Strangely, that's entirely the opposite of what I understood from the original comment. To me, "you can just use XXX" sounds like someone just told me that "all you need is XXX; don't worry it's simple". The assumption is that the HN'er saying it and the HN'er being said to share an implicit level of expertise since we are all talking about mutt here.
Re:Mutt email client 25 years old by feanaro on Monday August 17, 2020 @07:58AM (#24186369)
That's exactly how I meant it, FWIW.
Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @09:55AM (#24177783)
Fair point. It does probably make sense to just strip the words out in this case as well.

I do want to point out that I didn't use those words fully consciously and I most certainly did not mean to imply the reader was ignorant. The only thing those words were signalling is that the action in question does not take much effort (once you know it).

Re:Mutt email client 25 years old by Cyykratahk on Sunday August 16, 2020 @10:03AM (#24177853)
To add to what you are saying, here is a short article highlighting which words should be avoided: https://css-tricks.com/words-avoid-educational-writing/
Re:Mutt email client 25 years old by u801e on Sunday August 16, 2020 @11:52AM (#24178754)
> The argument GP was making is that what is obvious to one reader may not be obvious to another.

Regardless of the argument, it's not obvious to anyone unless they've taken the time to read the documentation and possibly read through some examples. While there are those who may feel that it's simple and/or obvious after they have gained that knowledge, it shouldn't relieve anyone of the responsibility to read documentation and figure these things out for any tool that they use.

Re:Mutt email client 25 years old by hvdijk on Sunday August 16, 2020 @05:16AM (#24176380)
For anyone currently using a GUI mail client where HTML mail works out of the box, this is not something they will spend time figuring out before concluding that HTML mails just don't work. And this is a complete non-starter for those who like Mutt on the basis of having something that also works in non-graphical environments.
Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @05:39AM (#24176467)
That's fair enough, but this is why I'm not recommending this to someone who is not willing to spend half a minute searching for this one-liner. I'd also wager that the intersection of such people with the people who would even consider using Mutt in the first place is basically empty.

My point is that if you don't have those two constraints, it's trivial to do and it works perfectly.

Re:Mutt email client 25 years old by roel_v on Sunday August 16, 2020 @06:14AM (#24176625)
That's fine when you run mutt on your local machine, but the whole reason to use mutt is so that you have a dedicated email machine that you can ssh into and use screen to access email from anywhere. And then things like this become 10x harder (I never found a way, although last I tried was 15+ years ago). Attachments, too.
Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @06:27AM (#24176688)
That's certainly a valid reason to use mutt, but this is not at all why I use. I use because I prefer keyboard control, customizability and a simple, clean UI. Also because it's actually the least sucky (IMO) of local email clients.
Re:Mutt email client 25 years old by Smylers on Monday August 17, 2020 @12:10PM (#24188581)
One of my main reasons for using Mutt is precisely the opposite: with mbsync I have copies of all emails on my laptop, so I can read, search, and compose emails when I don't have an internet connection.
Re:Mutt email client 25 years old by Legogris on Sunday August 16, 2020 @09:03AM (#24177420)
While requiring X11 forwarding, maybe https://www.netsurf-browser.org/ with a framebuffer would fit the bill?
Re:Mutt email client 25 years old by u801e on Sunday August 16, 2020 @11:54AM (#24178774)
If mutt is accessing email via IMAP, why would you need a dedicated machine for accessing email?
Re:Mutt email client 25 years old by roel_v on Sunday August 16, 2020 @12:51PM (#24179256)
Why would anyone use mutt when you can have 'local' (ie on a machine you ssh into) Maildirs? That's one of the selling points for using mutt. Imap sucks, it's just something we have to put up with for lack of something better, but I've never searched mail as fast as when I could just grep for what I needed.
Re:Mutt email client 25 years old by u801e on Sunday August 16, 2020 @02:57PM (#24180213)
I use Thunderbird and it's installed on multiple machines where I have it configured to access the same email account via IMAP. I never really had a problem with out of sync mail and searches are done locally on the machine rather than on the server. I don't have it configured to use Maildir, but the files that store messages are in plain text and I could use grep on them if I wanted to.
Re:Mutt email client 25 years old by upofadown on Sunday August 16, 2020 @09:39AM (#24177677)
You probably don't want to risk the attack surface of a full browser by default. You can use something like this: text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput

And then map a separate key when you are sure...

Re:Mutt email client 25 years old by pbhjpbhj on Sunday August 16, 2020 @06:28AM (#24176693)
Presumably you could use Links (or some other console friendly web client).
Re:Mutt email client 25 years old by layer8 on Sunday August 16, 2020 @11:16AM (#24178464)
The real problem though is not preserving the rich-text-ness of the quoted message when replying, and the inability to have inline images. I use Outlook at work and mutt for private email. Using mutt at work just wouldn’t be practical, as the text markup and inline images are often critical to the exchange.

On a related note, while I love the UX of mutt, I do find proportional fonts to be significantly more readable than fixed-width fonts for paragraphs of natural-language text.

Re:Mutt email client 25 years old by u801e on Sunday August 16, 2020 @11:48AM (#24178713)
> The real problem though is not preserving the rich-text-ness of the quoted message when replying,

Given the near ubiquitous use of top-posting and quoting the entire message that's being replied to, it stands to reason that others are not really reading the quoted material and are just reading the response on top.

> and the inability to have inline images

I wonder when email clients like Outlook would start rendering images based on a URL included in the message, similar to what Slack does. That could allow one to effectively include an inline image, which would be seen as a URL in other clients.

Re:Mutt email client 25 years old by layer8 on Sunday August 16, 2020 @12:22PM (#24179026)
The quoted material is important, because people expect to be able to retrace the conversation within the single message. Technical (and also nontechnical) exchanges often consist of a dozen messages about a particular topic spread over weeks or sometimes months, where at almost each step you want to go back in the conversation to look at details of the previous discussion or to refresh your memory. Outlook users are used to doing so by scrolling through the message. They are generally not used to having to bring up the correct previous message -- Outlook also doesn't have a great UX for that.
Re:Mutt email client 25 years old by u801e on Monday August 17, 2020 @01:03AM (#24184165)
> The quoted material is important, because people expect to be able to retrace the conversation within the single message.

Given the proliferation of rendering a thread of messages and showing them as a conversation (i.e., conversation view), reading the quoted material within the same message is not really necessary.

> Technical (and also nontechnical) exchanges often consist of a dozen messages about a particular topic spread over weeks or sometimes months, where at almost each step you want to go back in the conversation to look at details of the previous discussion or to refresh your memory.

While I have seen this done in threads where people follow the conventions of a typical mailing list or usenet newsgroup by replying inline and quoting only parts of the text they're responding to, I have not seen the equivalent in a threaded conversation in outlook. And, as you note:

> Outlook also doesn't have a great UX for that.

While they have addressed the UX issue to some extent with the conversation view, it still doesn't really lend itself to easily following the discussion amongst multiple people due to the fact that they don't typically use different subthreads under the same email chain.

Re:Mutt email client 25 years old by Smylers on Monday August 17, 2020 @12:19PM (#24188668)
I avoid that by replying inline, discarding the history of multiple-quoted emails from top-repliers. Everybody else uses Outlook, but nobody has yet complained.

For sending emails with formatting (italics, headings), I use Markdown in Vim then press H in Mutt before sending, which pipes it through an appropriate filter:

set send_multipart_alternative_filter=html_alternative send-hook . 'set send_multipart_alternative=no' macro compose H ':set send_multipart_alternative=yes<Enter><view-alt-mailcap>' 'add HTML alternative'

Re:Mutt email client 25 years old by stjohnswarts on Sunday August 16, 2020 @06:46PM (#24182028)
I do the same, mutt for personal email and web browser based for others (usually work provided email). I always keep work and private emails separate and correct people when they try to intermingle them (know me in RL as well as at work)
Re:Mutt email client 25 years old by dm319 on Sunday August 16, 2020 @06:33AM (#24176710)
It isn't hard. I don't often come across emails that won't show up in text, but if I do I hit 'v' and 'enter' and it opens up in my web browser.
Re:Mutt email client 25 years old by simias on Sunday August 16, 2020 @07:16AM (#24176870)
I use mutt a lot, and that's what I do when some HTML content is not viewable in the terminal but unless I'm missing something it's one of the areas where HTML-aware clients actually fare better, both in convenience and privacy/security.

For instance if I open some marketing email I got in the ProtonMail web client I get a warning that "This message contains remote content" with the option to allow it. Before that my browser makes no query to any third-party website so nobody can track it.

If I open the same email in firefox from mutt, firefox immediately fetches the remote content normally and unconditionally.

You could probably script something to start a browser in offline mode but I haven't seen most people do it (see the replies in this thread that just tell people to "open HTML with Firefox"). So paradoxically mutt users might be easier to track than ProtonMail, GMail and other HTML-aware webmail users.

Re:Mutt email client 25 years old by feanaro on Sunday August 16, 2020 @07:43AM (#24177008)
That's true, though I avoid this problem by only opening HTML email from known, trusted senders where I consider it acceptable to signal that I opened the email.
Re:Mutt email client 25 years old by simias on Sunday August 16, 2020 @09:17AM (#24177514)
Unfortunately even "trusted" senders I know often like to use third-parties to handle tracking and analytics and from there you don't really know where it's going to end up.

Of course you might argue that I shouldn't trust people using these services but then I might as well stop using the internet altogether.

Re:Mutt email client 25 years old by Legogris on Sunday August 16, 2020 @09:05AM (#24177427)
Or https://www.netsurf-browser.org/, reducing the attack surfer for remote content to compromise you.
Re:Mutt email client 25 years old by Fnoord on Sunday August 16, 2020 @09:26AM (#24177579)
On top of that, you can use Browsh [1] to browse from CLI.

[1] https://www.brow.sh/

Re:Mutt email client 25 years old by anthk_ on Monday August 17, 2020 @07:10AM (#24186077)
Bloat.
Re:Mutt email client 25 years old by throwaway_pdp09 on Sunday August 16, 2020 @03:44AM (#24176026)
I rarely have a problem. I just let the sender know I want plain text and they do it.
Re:Mutt email client 25 years old by type0 on Sunday August 16, 2020 @04:31AM (#24176206)
People sending html mail are often those who don't know and don't want to know what plain text is.
Re:Mutt email client 25 years old by zadwang on Sunday August 16, 2020 @07:35AM (#24176959)
I render such emails in browser and it is rarely lossy. It is based on munpack and some hacky scripts. Basically construct a html page with all the info and attachments and open it in browser.
Re:Mutt email client 25 years old by bravura on Sunday August 16, 2020 @09:18AM (#24177520)
Could you share your scripts?
Re:Mutt email client 25 years old by peteretep on Sunday August 16, 2020 @05:58AM (#24176547)
Headless browser + OCR ... how hard can it be?!
Re:Mutt email client 25 years old by philjackson on Sunday August 16, 2020 @06:20AM (#24176657)
Are you being sarcastic? Very hard probably.
Re:Mutt email client 25 years old by peteretep on Sunday August 16, 2020 @10:09AM (#24177919)
I’m ... not sure. There’s a limit to how complicated emails are in 99% of non-spam HTML emails, right? You’re working with a limited subset of HTML meant to be reflowed to small screens pretty easily, and the task here is to extract text content into a form that can then be shown in a terminal.

I would — at the very least — think it was worth giving a go

Re:Mutt email client 25 years old by alpaca128 on Sunday August 16, 2020 @07:56AM (#24177069)
You might as well just use any other email client then and it'll be more efficient.
Re:Mutt email client 25 years old by leephillips on Sunday August 16, 2020 @02:40AM (#24175761)
I don’t find this to be a problem. Do you have it set up so it uses lynx or w3m to render the html in the terminal?
Re:Mutt email client 25 years old by ori_b on Sunday August 16, 2020 @07:49AM (#24177036)
I can't think of a single instance where that happened. Do you have some apps generating broken messages?
Re:Mutt email client 25 years old by kleiba on Sunday August 16, 2020 @09:13AM (#24177486)
I'm amazed that you haven't had that experience yet.

Years ago, when the web was less commonly used, it was pretty much frowned upon to send HTML emails. These days, it's almost the opposite: people asks "what's wrong with you" when you use a text-only email client (setting).

Re:Mutt email client 25 years old by wazoox on Sunday August 16, 2020 @11:02AM (#24178364)
I use Claws, never ever sent an HTML email, and nobody complained so far.
Re:Mutt email client 25 years old by stjohnswarts on Sunday August 16, 2020 @06:41PM (#24181987)
Nobody really cares at any of the places I've worked either. I'm usually using company computers and one of the first things I do in the email client is set it to text
Re:Mutt email client 25 years old by leephillips on Sunday August 16, 2020 @09:45AM (#24177713)
I use mutt, never send html emails; nobody has ever commented on this, in over 20 years.
Re:Mutt email client 25 years old by jlokier on Sunday August 16, 2020 @09:15PM (#24182856)
I use Mutt too.

Although nobody has commented on my mails, I know some people read them on mobile, and because plain text is formatted for an 80-column terminal, it doesn't reflow nicely on their mobile devices so they have to scroll side-to-side to read my message.

I think people don't know that's because I use Mutt, but a hard-to-read mail is not an impression I want to convey sometimes.

Also, sometimes my mails render in Courier font for some people when regular HTML mails show up in Arial, just because of the content type.

So if possible I'd like to write Markdown or similar and have that auto-formatted to HTML mail before sending. Not sure if there's a good way to do that in Mutt.

Re:Mutt email client 25 years old by toothbrush on Sunday August 16, 2020 @09:47PM (#24183072)
It's funny this should come up on HN today, because just this week out of nowhere i thought i'd try Mutt again (after having been a Mutt user since mid-2000s, but switching to mu4e for the last ±5 years).

What i used to do back in the day, and appeared to work fine when i tested this weekend, is so-called flowed mode. [1] I think it's a controversial feature, because it's a brittle hack, but anecdotally an email i sent this weekend as a test displayed fine on an iPhone.

And indeed, i'm totally with you on wanting to use/send text email but not look like a freak with weirdly broken 80-char lines in paragraphs.

1. https://rinzewind.org/blog-en/2017/a-small-trick-for-sending...

Re:Mutt email client 25 years old by leephillips on Sunday August 16, 2020 @10:43PM (#24183378)
Interesting point. I can only do very limited testing, but I just sent an email with one very long line from mutt on my laptop to my gmail address. The long line was not broken, and the display flowed perfectly on the gmail client on Android.

I think you should be able to use a hook in Mutt to process the markdown to HTML (using Pandoc) before sending. I've never tried anything like this—it has interesting possibilities.

Re:Mutt email client 25 years old by DNied on Monday August 17, 2020 @04:23AM (#24185181)
It's entirely possible to send mail as format=flowed plain text, so that messages will rewrap nicely on any screen. I do it all the time with Mutt, it's actually very easy.
Re:Mutt email client 25 years old by jlokier on Monday August 17, 2020 @02:14PM (#24190036)
I know about format=flowed. But does that actually solve the problem?

https://news.ycombinator.com/item?id=20514314

> The suggestion to use `format=flowed` doesn’t help, as the standard is ill-supported: https://fastmail.blog/2016/12/17/format-flowed/ I’ve researched the issue far and wide and the only way to have responsive, nicely wrapped emails is using HTML.

https://cpbotha.net/2016/09/27/thunderbird-support-of-rfc-36...

> Update on 2019-07-16 The current GMail web-ui ignores format=flowed and renders such emails with hard linebreaks everywhere. Thank you Google for violating yet more email standards.

Most people I correspond with where I care about my mail looking "normal" to them seem to use Gmail (about 30-50%), then Apple Mail, Outlook or Thunderbird.

Re:Mutt email client 25 years old by leephillips on Monday August 17, 2020 @03:57PM (#24191280)
format=flowed does not solve the problem, but you don’t have to resort to HTML. This guy¹ has the right idea: just make each paragraph in your email a single long line (but no more than 998 characters). The idea that we need to break lines at 78 characters, or whatever, is false. Long lines will be wrapped responsively in any sane client, so the reader will have a good experience.

[1]https://www.arp242.net/email-wrapping.html

Re:Mutt email client 25 years old by jlokier on Wednesday August 19, 2020 @09:23AM (#24210086)
One of the complaints I've had is that my mail had to be horizontally scrolled to be read.

One long line sounds likely to make the problem for that person worse not better!

That was a while ago though. Clients may have changed.

I'd love to know if someone has put the time into cross-platform tests for this sort of thing.

The only thing I'm completely confident of at the moment is that multipart/mixed text+HTML works for every client.

Re:Mutt email client 25 years old by upofadown on Sunday August 16, 2020 @09:34AM (#24177642)
I had a case where someone crossed out a word in the HTML version but the client just left the word in for the text version. Slight hilarity ensued.
Re:Mutt email client 25 years old by leephillips on Sunday August 16, 2020 @09:54AM (#24177781)
This will happen for some text-based html renderers if the cross-out was done with CSS. But if it was done with <del>, it should work.
Re:Mutt email client 25 years old by marcthe12 on Sunday August 16, 2020 @07:09AM (#24176837)
Sometime I wish there was a terminal markup language. So It can do formatting but terminal compatible
Re:Mutt email client 25 years old by jan6 on Sunday August 16, 2020 @09:21AM (#24177535)
I mean... have you heard of ansi escapes and utf8? you can underline, bold, italic, color, and some other stuff with escape codes, and use box drawing characters to make nicer UI like <hr> equivalent lines or, well, boxes, there's also hacky ways to use utf8 characters as alternate fonts, such as fraktur characters (you can search up fancy text generators for the hacky character sets)
Re:Mutt email client 25 years old by zadwang on Friday August 28, 2020 @05:36PM (#24310263)
As promised, I have created a document sharing my setup. Please check the following link:

https://adorablefilthyorder--five-nine.repl.co/

Re:Mutt email client 25 years old by wyclif on Sunday August 16, 2020 @12:11AM (#24175013)
I'd love to read a write up of your current setup outlined above, it sounds intriguing.
Re:Mutt email client 25 years old by wincent on Sunday August 16, 2020 @07:54AM (#24177063)
I had a similar set-up and did some screencasts on it a few years back (link below). It worked well, and was the least-sucky thing out there for plain-text email, but in the end I just got fatigued at continuously having to switch to another viewer (a browser) in order to properly see HTML email, which was ubiquitous. I ran back into Gmail's loving embrace, not happily, but reluctantly.

Overview is here: https://youtu.be/obY1um6ehDM

Re:Mutt email client 25 years old by gpanders on Sunday August 16, 2020 @10:15AM (#24177996)
I use a similar setup. I'm curious what you use for msmtp for though: most Mutt setup guides I've read recommend using msmtp as well, but I've always just used Mutt's native SMTP client and it works fine, so I've never understood the need for a separate SMTP program.
Re:Mutt email client 25 years old by lytedev on Saturday August 15, 2020 @11:55PM (#24174919)
would love to know more about this setup! do you have all your mail stored on disk? attachments?
Re:Mutt email client 25 years old by pw6hv on Sunday August 16, 2020 @02:28AM (#24175724)
Not parent but I have a similar setup. Yes, absolutely. I think storing our owns emails/attachments locally is part of best practices. That is our data and having a safe backup of it is a must.
Re:Mutt email client 25 years old by uaas on Sunday August 16, 2020 @05:45AM (#24176492)
Care to elaborate on the safety of backup? You mean it’s safe at your hard drive from availability or from privacy perspective?
Re:Mutt email client 25 years old by pw6hv on Sunday August 16, 2020 @08:05AM (#24177115)
Safe as in: "{random_provider} locked me out from my email account and I lost all my emails and attachments."
Re:Mutt email client 25 years old by toadi on Sunday August 16, 2020 @01:05AM (#24175316)
Want to see those configs...
Re:Mutt email client 25 years old by TheRealHairyHar on Sunday August 16, 2020 @04:05AM (#24176107)
ditto
Re:Mutt email client 25 years old by gpanders on Sunday August 16, 2020 @10:18AM (#24178018)
I'm not the OP but I have a similar setup. I keep my mutt [1] config in git, which is viewable publicly.

[1]: https://git.sr.ht/~gpanders/dotfiles/tree/master/.config/mut...

Re:Mutt email client 25 years old by zadwang on Sunday August 16, 2020 @07:43AM (#24177009)
I store all mails local. I can share my setup. I will take a while for me to find time and collect things in the same place. I will report back to this comment.
Re:Mutt email client 25 years old by dumb1224 on Sunday August 16, 2020 @10:08AM (#24177912)
+1 for local mails. I love it when I can open it offline and fast to read / write some long emails.