335 points · by job · 6y ago · 158 comments
I'm still using mutt, although Jean-Pierre passed away three years ago.
https://www.legacy.com/obituaries/nytimes/obituary.aspx?n=je...
I believe that at the time he started using mutt, he was still getting some of his e-mail over the declining UUCP network (as he was a tremendous UUCP enthusiast and even provided commercial UUCP connectivity and support at one point).
Davmail handles Outlook’s Modern Authentication, and launches a browser when a 2FA challenge/response is required. The latest version of davmail can cache authentication keys meaning you only have to go through 2FA once.
It’s been a real joy to return to mutt, in my latest job where Outlook is deployed, after years of using Gmail.
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.
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).
Overview is here: https://youtu.be/obY1um6ehDM
[1]: https://git.sr.ht/~gpanders/dotfiles/tree/master/.config/mut...
Setup:
* Mutt (I had slowdowns with NeoMutt)
* Vim with four e-mail specific lines in the `vimrc`
* fdm for retrieval and delivery rules
* Syncthing for synchronisation between machines (it is just files! although ~1,000,000 of them…)
* tmux to give me a single horizontal split so that I can browse and compose at the same time
* Notmuch for search
* Lynx to beat text/html into shape
* a tiny snooze shell script of my own coupled with an equally tiny unsnooze shell script that runs every few minutes on a box that is on 24/7
That is it, although I have to admit that I should clean up my `muttrc` at this point as it is an outright mess. There are always more tweaks one could perform, my next one probably being figuring out tagging and then sending multiple mails to the snooze script. But one has to exercise a bit of self restraint or get less rather than more work done due to “over tweaking”.
Gripes? Well, the configuration is very arcane at times and monolithic; you wish you had a more modern, scriptable, and modular interface. If so, you could probably cut down the time it takes to get something working by more than half. I also suffer occasional CPU spikes, perhaps due to some weird interaction with Syncthing when both monitor directories.
Other than that, it is very smooth and pleasant sailing. HTML e-mails in particular hardly if ever pose a challenge after I got Lynx into the mix.
For my needs it seems quite modular. I have one ~/.mutt directory with separate muttrc files for every email account (10+) and within each account I use folder-hook to have separate (many are shared) config files.
Arcane is more subjective, but I like it.
What usually gets me is how some functionality is just barely out of reach, unless I am mistaken for example there is no way to pipe the path(s) (not the message(s) themselves!) to an external programme. So for my snooze script I instead pipe the messages(s), parse them to extract the Message-ID(s), pass them to Notmuch to turn them into path(s), save to a temporary file, launch another command pointed at the temporary file, query the user for input, create a directory based on the input, and move the file(s) into the directory. It works, but it is awfully roundabout and I do at times wish I had some sort of scripting language that interacted with Mutt primitives rather than a monolithic set of functions which can only be extended by patching the source.
The result was very flexible and customizable for myself:
https://github.com/lumail/lumail/
Unfortunately after 10+ years of self-hosting my email on a virtual machine I've now switched to paying for GSuite, so the project has become orphaned. For a while I thought there was a chance it would become popular and useful, but I guess the userbase for these kind of applications is pretty small - almost everyone still using mutt does so because they love it, and are used to it. Changing isn't an easy thing to do.
I'll be interested to see how Aerc turns out:
I would love to use Notmuch more, but syncing between devices becomes a pain when everything is no longer a file. There is muchsync [1], but I really do not want to go down the rabbit hole of resolving potential conflicts, etc.
I'm subscribed to several mailing lists/forums and sometimes get a 3-figure number of emails per day. Since I can't (nor want to) read all of them, I score them based on the subject field (~s). Unfortunately, the scoring algorithm can't take the body into account (~b). That's why I considered notmuch for creating (virtual) mailboxes with context I'm interested in...
Do you mind sharing how you do this? Browsing plus composing has been the one thing that keeps annoying me for not being streamlined and typically I just open multiple mutts/neomutts.
Anyway, if you email me, it will arrive on my virtual private server, and I will read it with Mutt.
How do you deal with spam?
How do you ensure your emails don’t get junk mailed?
Spam isn't much of a thing, which perpetually surprised me but there it is.
Some background: before I ran my own email server I relied on my ISP for receiving email for my domains and I was getting hundreds (even thousands) of spam messages a day. I used spamprobe to classify the spam away, very effectively. But that ISP must've had a very lenient smtp configuration.
With my own email server I enforce everything postfix supports enforcing at the time of the connection itself. Watching the postfix logs, I get multiple spam attempts per second but all of them are rejected before the connection attempt is accepted by postfix.
Actual spam that gets through that is minimal. About zero to five per week for me. I'm still using spamprobe to classify them just out of inertia, but the volume of spam is so low it isn't necessary.
As to outgoing email getting junked, it's harder to have exact statistics on this but it has never been an issue for me in the sense of not getting a response from someone, so they must've received it. You do need to configure SPF, DKIM, etc but aside from that, it's not a big deal. There are sites which help verify your configuration, use them.
Every time an smtp thread pops up on yc the difficulty of running your own email infrastructure is overstated. Of course I wouldn't recommend it to completely non-technical people, but if you have any interest in internet standards, just do it.
Own your infrastructure, help us all decentralize email and don't be the next victim of "gmail locked me out of my life and I have no one to call for help".
I went by this article, https://www.c0ffee.net/blog/mail-server-guide/ but I only set up Postfix and the various DNS records (MX, DKIM, etc.). I didn't set up Dovecot because I just use Mutt on the same server. And I haven't bothered to set up any kind of spam filter.
- SpamAssassin does a wonderful job after training it about once every 3 years. I get almost no spam.
- I was able to send to most people from my VPS, but not Charter. Charter blanket-blocked my ip block. So I ended up setting up SMTP forwarding via sendgrid free tier (100 emails per day). Now I always get through.
> How do you deal with spam?
You configure filters on your server so that they are flagged
> How do you ensure your emails don’t get junk mailed?
1. Ensure your server is running in a non-blacklisted IP block.
2. Just configure DKIM and SPF, other email servers should accept your emails without problem
- Hosted locally.
- Virtual Windows Server 2012 R2 running on my Hyper-V host.
- Microsoft Exchange 2013
- Self written, internet facing MTA, that filters/rejects email before passing onto Exchange
- The MTA passes all email under X size through Spamassassin (SPAMD) running on a separate Ubuntu based virtual server
- The MTA also has some internal rules to straight up reject bad IPs and emails with 'badwords' in them.
- The MTA has an internal list of email aliases that it accepts email for, then it re-addresses them to the real internal email addresses that are configured in Exchange.
I've been running this setup in one form or another for about 20 years now, upgrading parts as I go along. Due to the version of Hyper-V I'm running, I can't run Windows Server 2016 or higher as virtual servers. Also, I've upgraded through Exchange 5.5, 2000, 2003, 2010 to 2013, but I tend to upgrade when I need to, not when there's a new version, hence still running 2013, which I only migrated to a few years ago.
It's the mail system for my whole family, plus handles the email for the 3 small companies that I run. Stability is more important than anything.
Outlook Anywhere is fully configured correctly - both iOS and Android can 'auto configure' for the mail server with just an email address and password.
I've got SPF and DKIM set-up, but send email through my ISPs smarthost just to be safe. Gmail and Outlook.com happily accept my emails without issue.
Regarding spam... This is the ongoing bugbear. No matter what you do, once you've been using an email address for a long time (in my case over 20 years for some of them) fighting spam is a constant battle. This weeks spam content is all about Air Conditioners and slimming aids.
I would NOT recommend that anyone set-up their own personal email system unless it was a learning exercise. It's just too much hassle these days. Personally, I'm am in the process of moving the whole lot to Office 365, which will cost me a bit more in yearly fees, but will give me some time back not having to admin it, which at this stage in my life is more important.
text/html; elinks -dump %s; nametemplate=%s.html; copiousoutputIf those people had simply sent only text/html and not a useless text/plain that only says that kind of stuff then everything would have worked fine.
Stuff like that makes me want to quit using mutt, and no fault of mutt mind you.
But laziness has kept me to using mutt for reading my self hosted mail for many years now.
That plain text doesn't have the intention of the composer, for instance, the inline image doesn't show inline and the email context says the figure above.
It is not that business form, but some ppl use colorful format to emphasize some text, which basically gives same text in the email, which makes the reader (in plain text) easily miss that part while skimming.
I haven't used much mutt since.
I rank the email experience of gmail on par with /bin/mail. It's that useless.
I use mutt as an IMAP client for gmail when I can, that works mostly ok. At current $DAYJOB they only allow gmail web client which is a complete disaster of unusability.
So I mostly just zoom or slack people since gmail is so useless.
gmail is email written by those who have never used a proper email client and don't really care about email anyway.
(gmail came out in 2004 - got the tshirt from the launch.)
Their official mail policy was after 3 months we delete all your email.(You had to save/archive) it yourself if you wanted to have access to it. Some MSExchange setup.
The 'reason' back then was 'Some semi-high-level-executive lost his tablet somewhere with important mail. I couldn't believe a company this big and enough money to buy common sense and intelligence came up with this 3-month rule as a solution to 'lost executive tablet'. They closed allot of their local I.T/Startups in the last decade in South Africa.
• Mutt
• OfflineIMAP (to be replaced with `mbsync`; OfflineIMAP is not being ported to Python 3, unfortunately)
• Notmuch — for fast indexing, searching, and tagging e-mails
• Postfix — Mail Transfer Agent; offline queuing. Overall, it's one of the most robust pieces of software; Postfix never failed even once on me in nearly six years.
It is such a great email client that I feel lost and walking through treacle using anything else. I don't work in the tech field, but I have a lot of emails to deal with. People come to me now to ask me if I can find specific important emails from a while ago that they are after. Outlook is hilariously bad at searching. I wish I could use mutt instead of outlook for my work.
EDIT: It looks like I'm using msmtp instead of postfix - any advantages to switching over to postfix?
I just deal with a lot of email volume - large portion of it public mailing lists; Postfix has been a trusted comrade.
I have it running in a private serving, filtering the emails for me..
combined with fdm filtering/sorting/archiving the speed has been incredible.
My mentioning of Python 3 was not related to resource usage. It was in context of Python 2 being deprecated.
Does anyone have a good setup with multiple accounts or using both mutt with a mobile email client (iOS)?
I wonder: should I fire up a Linux emulation in my browser and run Mutt inside that? I’m sure things have gotten fast enough that this would actually work.
This never happens with Thunderbird and is even less likely to happen with a TUI client like Mutt.
I love mutt and have used it in the past, but I'm very productive with Gmail in the browser, especially with the vim-like shortcuts it provides and with an inbox-zero-like workflow.
example muttrc =========================================================
set imap_user = '<username>@gmail.com'
set imap_authenticators="oauthbearer"
set imap_oauth_refresh_command="~/.mutt/oauth2.py --quiet --user=<username>@gmail.com --client_id=<id from google>.apps.googleusercontent.com --client_secret=<secret from google> --refresh_token=<token from, you guessed it, google>"
set smtp_authenticators="oauthbearer"
set smtp_oauth_refresh_command="~/.mutt/oauth2.py --quiet --user=<username>@gmail.com --client_id=<id from google>.apps.googleusercontent.com --client_secret=<secret from google> --refresh_token=<token from google>"
set ssl_starttls=yes
set ssl_force_tls=yes
set imap_pass = 'my really hard to guess gmail password'
set from='<username>@gmail.com'
set realname='Fancy pants name'
set folder = imaps://imap.gmail.com/
set spoolfile = +INBOX
set record = "+[Gmail]/Sent Mail"
set postponed = "+[Gmail]/Drafts"
set trash = "+[Gmail]/Trash"
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set smtp_url = 'smtp://<username>@gmail.com:<my really hard to guess password>@smtp.gmail.com:587/'
set smtp_pass = 'my really hard to guess password'
set move = no
set imap_keepalive = 900
#refresh every 10 seconds
set timeout=10
set mail_check=20
# allow mutt to open new imap connection automatically
unset imap_passive
# vim!
set editor=vim
# email sorting
set sort=threads
set sort_browser=reverse-date
set sort_aux=last-date-received
# handy macros
macro index gd "<change-folder>$postponed<enter>" "go to drafts"
macro index gs "<change-folder>$record<enter>" "go to sent"
macro index gi "<change-folder>$spoolfile<Enter>" "go to inbox"
macro index gt "<change-folder>$trash<enter>" "go to trash"""
macro index tb s+[Gmail]/Trash
set noconfirmappend
set quit=ask-yes
=========================================================
POP3 is actually less reliable at keeping messages indefinitely than IMAPv4 is, due to limitations of the protocol. Some clients have defaults which simply delete the remote copy after download (or reading, which is different), but again that's not the protocol's fault.
(I wrote it up a few years ago here: https://blog.randomstring.org/2016/09/26/secrets-of-mutt/ )
In brief, you use the limit command to see only the email you are interested in, then use the tag command to do something to those specific messages. Both limit and tag use the same pattern language to specify From, Subject, date ranges, message numbers, or more esoteric searches.
The only thing mutt is not great at is searching multiple mailboxes, and it's easy to integrate an external tool (notmuch, maildir-utils, mairix...) to do that search and link the results into a temporary maildir that mutt will then work on.
Just for clarity: you can just tag without limiting first
> it's easy to integrate an external tool (notmuch, maildir-utils, mairix...)
grep...
Grepping my 47GB mail folder often takes longer than I'd like.
Notmuch is impressively near instant for the same searches.
Professional I use email for mostly the same and for official trace communication....
I've tried doing my own mail but it's very hard.
"i didn't write mutt, it was me"
i used mutt until a few years ago when i switched to sup.
I am pretty sure mutt would have done it too, I used mh because I had the muscle memory