Sam Trenholme's webpage
Support this website

Alpine in CentOS

 

April 23 2014

This blog is about how I set up Alpine, an easy-to-use text-based mail client, in CentOS 6. I also discuss accessing my Gmail with Alpine.

==Why Alpine?==

Alpine is an open-source reimplementation of Pine, a classic text-based email client that was very popular in the 1990s, by the same development team.

I am not using Alpine because of a sudden nostalgia for the 1990s. I use Alpine because I need to sometimes check my email while I am out on the road with my metered-bandwidth G3 internet connection. By using a text-only interface, I can read and send email using 1% of the bandwidth of a webmail interface.

==Getting Alpine==

Alpine does not come with CentOS 6 (the only included email client is Mutt, which I never cared for), but I have made an RPM of Alpine 2.00 which can be downloaded here:

http://samiam.org/software/alpine/
To install this RPM in a 32-bit setup, download alpine-2.00-1.i686.rpm, then:

rpm -i alpine-2.00-1.i686.rpm

To install this RPM on a 64-bit system, download alpine-2.00-1.src.rpm, then:

rpm -i alpine-2.00-1.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -ba alpine-2.00.spec

This might take a couple of minutes while Alpine is compiled. Once done:

cd ~/rpmbuild/RPMS/x86_64/
rpm -i alpine-2.00-1.x86_64.rpm

To verify Alpine has been installed, type in "alpine".

==Using Alpine with Gmail==

Most of these directions are adapted from these HOWTOs:

http://people.virginia.edu/~ll2bf/docs/nix/alpine.html
http://www.wijeyesakere.com/tech/alpine/
First, I had to set up Gmail so Alpine can access my Gmail inbox. To do this: Tools (gear icon) -> Settings -> Forwarding and POP/IMAP -> IMAP access -> Enable IMAP.

After doing that, since IMAP does not support two-factor authentication, I had to set up an application specific password, as described here:

https://support.google.com/mail/answer/1173270?hl=en
Once I did that, I then had to set up Alpine to read my Gmail via IMAP. I went in to Alpine, then went to Main menu -> Setup -> collection List -> Add (I just typed in 'MSLA' after opening Alpine). The nickname is how the mailbox will appear under "folder List"; the server line looks like this:

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

Replace "username" with the actual Gmail account user name.

At this point, I could read, but not send email in Alpine. To set up the SMTP server so I could send email, I did the following:

I went to Main menu -> Setup -> Rules -> Roles ('MSRR'), added a role, which I gave the nickname 'Gmail' to. I then scrolled down to "Actions begin here", put in my Gmail name and email in the Set From field, so it looked like "My name <username@gmail.com>" (Replacing "my name" with my name and "username" with my Gmail username).

For "Use SMTP server", I put in a value like this:

smtp.gmail.com/novalidate-cert/user=username@gmail.com/ssl

Again, replacing "username" with my Gmail username.

I then went to the bottom, where it says "Compose Use", and put in the value "With confirmation".

For security reasons, I have set up things so I need to enter a password to read or send email; to change this requires recompiling Alpine.

To post a comment about this blog entry, go to the forum (self-signed https). New accounts may post once I approve the account.