Chapter 17. Pine email client

17.1. Installing pine

Pine is an email client I like to use. Unfortunately it's non-free, and is not a part of the normal package selections available when You install Debian.

To address this, I have found a place where they make debian packages available to the public, and have added that to my package configuration.

I found the packages at a place called Open Source Braincells. They make packages available, and all You have to do is add the following line to the file /etc/apt/sources.list


deb http://src.braincells.com/debian woody/
deb-src http://src.braincells.com/debian woody/

Then it's the normal incantation of:


apt-get install pine

After this incantation You should be able to use Pine.

17.2. Pine configuration

I use pine as an IMAP client, which means that I need to specify that pine is to use an IMAP server. This is done in the configuration section of pine, where we need to specify a server in the folder collection, and an IMAP inbox in the general configuration.

I usually just go for the throat, and edit the $HOME/.pinerc file directly.


inbox-path={imap.abode.dk}inbox
folder-collections=Mail {imap.abode.dk}inbox.[]

And it's pretty much ready to go, except for the fact that it now requires a username and password to read mail.

17.3. Pine passwordless login

It's an annoying fact that most services require You to authenticate Yourself. IMAP is no different, and this is why Pine asks for a password each and every time You start it.

I don't want to live with that, so I make use of the preauthentication feature of most IMAP servers, which just means that local access to IMAP server is regardes as already authenticated. If You run the imap daemon on the command line You should see something like:


* PREAUTH Ready.
INFO: LOGIN, user=user, ip=[127.0.0.1]

We need to get this response from a remote machine.

To achieve this, we need to have the ability to log on to the server as the user without password. For this I use ssh.

When You have achieved a passwordless login, the next thing we need is to fire up the imap server:


ssh -2 imap.abode.dk -l bjoern exec /usr/bin/imapd

And You will see the required response of "* PREAUTH..."

Pine expects only the first line, the second line is the stderr, and makes a mess out of pine. So much so, that pine will revert to a standard authentication which requires entering username and password.

To make pine do things right, I use the following configuration in $HOME/.pinerc:


rsh-timeout=5
rsh-path=/usr/bin/ssh
rsh-command=%s -2 %s -l %s exec /usr/bin/%sd 2>/dev/null Maildir

And all is well - at least on my setup.