Introduction

An addressbook, serves an analogous purpose than a bookmark file serves for a web browser, it is a place where you store the addresses of people that you usually correspond with, or important information about other people that is relevant to you and needs to be stored.

As we will see Pine contains an excellent support for its addressbook.

The Basics that You Did Not Want to Know

When you start Pine for the first time, Pine creates a file called .addressbook in your home directory. This file serves the same purpose that a bookmark file serves for a browser. It is used for quick references and search of addresses, so that they can quickly be used by Pine.

In order to speed up the process of looking for addresses in the addressbook, Pine needs to create a look up file. This file is called .addressbook.lu (lu stands for look up). You can erase the look up file, but if Pine does not find it, then it will recreate it.

You should never edit the .addressbook file, although by curiosity you may want to do it sometime. If you do so, you should read this before you make any changes by hand.

Every entry in the addressbook file starts with a non space character, which is located in the first character of a line. Pine does not like long lines in the addressbook and tends to cut lines even for just one entry, when this is done, subsequent lines of the same entry begin with three blank spaces.

A typical entry in the addressbook file looks like this:

Nick<TAB>Name<TAB>Address<TAB>Fcc<TAB>Comment

Here Nick is a word used to distinguish the person, examples of nicks are "Boss", "John", "verylongnick". Notice that "bad nick" is not a good nick, because of the blank space. Nicks are case insensitive, so "VeryLongNick" and "verylongnick" represent the same nick.

Name can be any string, in principle of any length, this is useful if you need to use names that use non English characters like , , etc. The proper form to do it would be using a mime encoding of the character (something like =?ISO-8859-1?Q?=EA), which is a very long string for just one character.

Address is just the e-mail address of the person entered in the nick, it has the form address@domain.com.

Fcc is the folder that you will use in order save messages that you send to this person, if you do not wish to save messages sent to this person, there should be an empty string in this field. An empty string is specified by the writing two consecutive double quotes, like this "". You can only specify at most one Fcc.

Comment, useful to save what kind of relation has this person with you (e.g. Lawyer, Bicycle repair, etc) or any other information, like phone number, home address, etc.

The last two fields are completely optional, if they are empty or not defined they are not written, in particular you should not write the <TAB> character, unless the next field is present,

The following are examples of valid entries in the addressbook

Sometimes a person, or the list that you are trying to create, has more than one address, in this case the addresses are separated by commas ",". In order to identify this fact, Pine encloses the list of addresses between parenthesis, so the Address field looks like

(address@domain.com,e-mail@foo.net,address@bar.org)

In the case of a list, like above, you can make each entry to have associated a name, so e-mail@foo.net can be replaced by "My friend's name" <e-mail@foo.net>. The list not only can contain addresses, it can also contain other nicks of your addressbook.

Storing your Information in a Remote Place

A remote addressbook is one which is located in an IMAP server. The idea of having a remote addressbook is that it does not matter which client you use to read that addressbook, you will access the same information. In other words, you should be able to access the same addressbook, using Outlook, Eudora, Mutt or Pine. Notice that all of these clients use different formats for their local addressbook, the idea of IMAP is to set a standard so that not matter which client you use, only the interface, but not the results are different.

The way a remote addressbook looks is like any other folder, the difference is that its messages are the states of the addressbook; each message is a whole addressbook. Different messages contain different versions of the addressbook. You add another version of your addressbook by deleting or adding entries to it.

Another advantage of having an addressbook in an IMAP server is that you can access the same addressbook from anywhere in the world, but most importantly with any client, as long as that client supports remote addressbooks.

There is a problem however in Pine that does not currently have a solution, which is, that there is no easy way to synchronize your local and remote addressbooks. By an easy way I mean, either automatic synchronization or a one key push that will allow you to do so.

Some Handy Tips

  1. You can usually access your addressbook by pressing ^T in any prompt that is asking you to enter an address. This allows you to navigate through your addressbook before you enter any addresses to the prompt. Notice that once you enter to the addressbook, you will have a "L"ist command, which allows you to select the addresses that you want to input in the prompt. These two commands make entering large input in the addressbook, very easy.

OOps, I Deleted an Entry

Sure, we all do this. The delete button, no matter where is placed, it is placed in a place where you'll find it it to delete entries that you did not want to delete. Don't worry, Pine saves deleted entries for 100 days, which is a lot of time to recover it. You can change this limit time by editing the file adrbklib.h and changing the value of the #define constant ONE_HUNDRED_DAYS.

If you delete an entry in your addressbook, through pine, then Pine will move this entry to the top of the addressbook, prefix the string "#DELETED-yy/mm/dd#", where yy/mm/dd is the date that the entry was deleted. If you want to recover this entry delete everything before the nick.