How to set up Alpine with a Gmail account

From Salix OS
Jump to: navigation, search

Alpine is basically the same application as Pine, which used to be widely used on university computer sytems around the world. It is a text-based console email client which is very easy to learn and use, and many people prefer it to webmail or graphical email clients. There must be hundreds of quick guides to using Alpine with Gmail. This is simply one way of doing it, with the merit that it actually works for Salix.

First, make sure your Gmail account is set to use IMAP. Almost certainly, it is already.

Alpine's configuration file is ~/.pinerc. You can use Alpine's menus to change the configuration, but it may be easier to edit the file directly. Back it up first.

Assuming your account is, change these settings from their defaults as follows:


Many guides tell you to specify the ports:


but this doesn't seem to be necessary. There is a problem with certificate authentication, and if 'novalidate-cert' isn't there, Alpine keeps asking you whether you mind. If you do mind, maybe a solution can be developed along these lines: [1]

Make sure the feature-list includes the following items as set:



... and that's basically it. Alpine is highly configurable. Here are a few more features I use:

continue-tab-without-confirm # the next few eliminate tedious confirmation requests






This last one means you get the editor of your choice instead of Alpine's default, but you must also specify it:

editor=pyroom #substitute your favourite text editor



url-viewers=/usr/bin/firefox #substitute your favorite browser

to enable spawning these applications when needed. One annoyance is that you can't get back to your email client until you close the window and possibly the application. A way round this is to create a script in /usr/local, e.g. vimbrobable2-launch:


/usr/bin/vimprobable2 "$@" 2> /dev/null &

and make it executable. Then put this in .pinerc:


Depending on the specific application, focus may move to the new window or not. With Vimprobable, it does.

The .pinerc file is long and extensively commented. If necessary, use search to find the lines you need to change. Everything in bold comes from the file.

Finally, note that deleting an email has the same effect as archiving it when using the web interface. There's probably a fix for this, but it is actually in line with the way many people use their Gmail accounts anyway.