Pine Lives! Using Alpine with Gmail
If you ever had any reason to interact with Unix systems during the ‘90’s then there’s a good chance you remember Pine Mail. Pine was an easy-to-use, text-based email client developed at the University of Washington. I have many fond memories of toying around on a student-run Unix server in my college days and using Pine rather than Netscape Mail or Outlook as my favorite email client. But once I left college, the life of telnet’ing into a Unix box and reading my email with Pine stopped.
When recently reminiscing with a friend over topic of the good old days of Pine, I had assumed Pine was long dead. And indeed, the software know as Pine did cease to be supported in 2005, but the legacy of Pine carries on in Alpine! Alpine is a freely-available rewrite of the Pine mail client, that retains all the basic features of good old Pine mail, while having the virtue of being adapted for the modern internet era.
Upon learning of Alpine’s existence, I immediately decided I needed to try it out. At first, I tried to set up Alpine on my work computer, but my work’s Outlook Exchange service was not something I was able to readily connect to. I had much better luck, however, setting up my personal computer to connect to my Gmail. Riding high on that success, I thought I’d share the steps I took in case it helps anyone else get started with Alpine.
Now, when I used Pine Mail at school, I didn’t have Pine installed on my local machine. As I mentioned, I would telnet into the host machine that ran both mail server and mail client. However, if you’re not daunted by use of the command line (and you shouldn’t be!) and willing to spend a little bit of time getting the configurations just right, you will be able to use Alpine on your local machine as your very own console-based Gmail client!
I use Homebrew as my go-to Mac package manager, so getting alpine was pretty straightforward. I typed
brew install alpine into a new Terminal window and in a few moments I had alpine 2.20 on my machine.
If you’re not a Homebrew user, Alpine 2.20 is available at http://patches.freeiz.com/alpine/index.html.
Once you have alpine installed, you should be able to start the application by entering
alpine into your Terminal prompt. You’ll see the welcome screen. Go ahead and hit
return and let the creators know you’re using Alpine!
Now to get Alpine configured to work with your Gmail, select
Setup (S) and then
CollectionList (L). You’ll see a screen like the one below:
You can put whatever identifier you want in the
Nickname field. The most important field to configure is the
server information. As you can see, you need to reference the gmail server in a very particular way:
Once you’ve done that, you’ve done the most difficult part of the Alpine configuration process. Really!
I would advise leaving
path blank as otherwise I’ve found that my gmail folders don’t show up properly. Now tell alpine you’re ready to
eXit/Save by hitting
ctl-X and you’ll be prompted for your gmail password. Go ahead and enter it so that Alpine can test the connection. (Later you can change your settings to make Alpine remember your password or you can go with the default and aways be prompted).
When alpine first attemtps to connect to the Gmail server, you are likely to get an error. Gmail is going to give you a security warning saying that it blocks applications which is considers to be “less safe”. Google does not quite define what these categories of “safe” and “less safe” mean, but it’s likely that the reason Alpine is considered “less safe” is because you can change the account password from the application. Whatever the actual reason, you alone, dear reader, will have to make the call about whether to let your google account allow “less secure apps” in order to use alpine.
If you choose to allow it, you will need to go to your Google account settings:
My account >
Device activity and notifications >
allow less secure apps
Once you’ve enabled “less secure apps”, Alpine should be able to connect.
However, if you’re like me and one of the biggest advantages of Alpine to you is that it’s fast to flag a bunch of unimportant email for deletion than by clicking all those little boxes in the Gmail web interface, then there’s one more Gmail setting you will probably want to change.
In your Gmail settings (not your Google Account settings as above!) look for the
Forwarding and POP/IMAP section. Now turn
off and enable
Move the message to the Trash. Lastly, go the
Labels tab in the Gmail settings and chose
hide the All Mail folder from IMAP.
What this does is allow Alpine’s delete function to move emails to the Trash folder where Gmail will eventually expunge them for you. If you don’t do this, every time you
(D) Delete an email in Alpine, all you’ll really be doing is removing all of Gmail’s labels from that message. What this means is that you’ve “archived” it in Gmail-terms by relegating it to only existing in the “All Mail” folder. If you like Gmail to store a copy of every email you’ve ever received, then by all means leave this alone. I, however, like to delete old/unimportant emails but don’t always keep up with purging them. So Gmail’s default behavior in this situation is very annoying to me. You can read a bit more discussion about how this all works at the google product forums
Ok, now you’ve finished with all the unintuitive Gmail settings, there’s just one more bit in Alpine that you have to configure, and that’s the server for outgoing email messages.
In Alpine, select
Setup (S) >
Config (C). Look for the
SMTP Server (for sending) field and hit
C to edit the field, or
Change Value in Alpine lingo. Now, much like before, add your Gmail server path in the following way:
Exit setup to save and there you go! Alpine should be able to see all your Gmail folders. You can now check your Gmail with Alpine, send emails from your Gmail with Alpine, and (most importantly to me) easily flag unwanted messages for deletion and sent them to your trash folder. All from a console-based application. No web-GUI’s need apply!
Spend some time getting to know Alpine and see if you don’t find the simplicity and speed of a text-based email application appealing. Of course, you might still find it easier to view the cat photos your Aunt Edna sends you daily through the web interface. Then again…