Configuring Alpine for Gmail

For e-mail, I use Alpine, the successor to Pine. I find that it’s easy to use and fast when it’s up and running – the configuration process, however, can seem a bit complicated at first glance. This article explains how to set up Alpine for use with a Gmail account, but the broad strokes are applicable to any mail account you wish to use. Better still, configuring Alpine this way will make it easy to add more accounts later – I use my install with four different accounts, Gmail being one of them.

Get it

I’m assuming you already have Alpine installed on your machine. If not, it can be downloaded from the University of Washington website. I used Homebrew to install Alpine on OS X.

Configure it

There are essentially two parts to the configuration process: receiving mail and sending mail. To receive mail, Alpine uses something called collection lists. To send mail, roles are used. For a Gmail account, or any another account for that matter, we will create and configure one of each of these.

Creating the collection list

At the Alpine main menu, press ‘S’ to enter setup and then ‘L’ to get to the collection lists screen. Press ‘A’ to create a new collection. Edit the nickname to whatever you like, and then enter the following in the Server field:

imap.gmail.com/ssl/user=your_name@gmail.com

Remember to change the address at the end to your Gmail address. Leave the Path and View fields empty, and save your changes.

Creating the role

Now that you’ve configured your collection list, Alpine will now be able to fetch email from your Gmail account. To send mail, you need to create a role. From the main menu, press ‘S’ to enter the setup screen. Press ‘R’ and then ‘R’ again to get to the role rules screen. Press ‘A’ to create a rule. Give it nickname, and then set “Current Folder Type” to Specific. Highlight “Folder List”, press ‘T’ and then navigate to your Gmail inbox. Press return/enter to add it to the folder list.

That’s the most complicated part. Now, scroll down to the “Actions begin here” section. Change the Set From field to something like this:

'John Doe' <your_name@gmail.com>

Change the name to your name and the email address to your Gmail address. Once that’s done, edit the Use SMTP Server field:

smtp.gmail.com:587/tls/user=your_name@gmail.com

Again, change the email address to your Gmail address. Before saving and quitting the screen, make sure that all the options in the “Uses begin here” section are marked “With confirmation”.

Use it

The basic configuration is now done, and your can start using Alpine to send and receive email from your Gmail account. If you wish to add more email accounts, just create a collection list and an accompanying role like you did with the Gmail account.

Other settings

Alpine has some default settings that I changed in my installation. At the setup->configuration screen, under [Advanced User Preferences], I turned on “Save Will Not Delete”. I also changed the Pruning Rule to “don’t rename, don’t delete” so as to not have Alpine ask me to rename my sent-mail folder every month.