Terminal Email


I like this little cute message:

Although… in my case, it’s not actually a real indicator that I have email at any of my main inboxes. If I type mail, I can see the messages.

Since I’m on macOS I figured it would be whatever Mail.app is seeing, but that’s doesn’t seem to be the case. 🤷‍♀️

There is a good StackOverflow answer on going through them. They do appear to have been legit emails at some point for me, but they are very old. I ended up just nuking them all.

It’s a little intriguing though! I know from a few “interview” responses I got that some of you do indeed check your email through the command line. I was kinda hoping if I set my Mail.app on macOS the mail command would automatically show me the inbox from there, but it doesn’t seem to. I’m not sure if I care enough to set up a command line email tool just now. Maybe a rainy Sunday thing.


One response to “Terminal Email”

  1. Forgive me if I’m telling you something you already know, but the way operating systems reflect their history is fascinating to me.

    What you’re seeing here in the mail command is a relic of a bygone era of computing, a sort of appendix.

    macOS, at its core, is UNIX, so you have to think back to the timesharing environment and culture of the in which UNIX was designed and began to flourish: ca. 1970 to oh, 1993 or 1994. A university or other UNIX site might have just one machine, or maybe a few, which users literally dialed into from terminals to timeshare. Every machine had perhaps dozens, maybe hundreds, of users. So user alice might send mail to user bob, and it would never leave the system.

    Of course, you might want to email somebody at another university, but at the time the Internet was more obviously peer-to-peer, so it was obvious that if alice@foo wanted to send mail to bob@bar, foo and bar would be actual, physical machines (virtual machines had been invented, but only on mainframes).

    Today, we usually think of email as user@domain, but in fact even now under the hood it’s actually user@MACHINE, though we elide this with MX records in DNS so we don’t have to worry about it.

    So these emails are not to “your email address” as we’d understand it today, but to chriscoyier@localhost; entirely local to your machine, never intended to go anywhere else, and working as designed.

    All this functionality still works, by the way: if you have a system which multiple people use, they can all email each other locally.

Leave a Reply

%d