Using the Alpine email reader
Modern Reader
The newest incarnation of the Pine email reader is fast, easy to use, and offers a thoroughly modern feature set.
Alpine [1] is the latest incarnation of Pine [2], an email reader developed by the University of Washington. If you first got on the Internet in the mid-1990s at a university or college, chances are good that you used Pine to connect. However, despite its age, Alpine is a thoroughly modern email reader, with support for UTF-8 characters and most of the other features found in desktop readers like KMail or Evolution.
In fact, a case could made for making Alpine your default email reader on the desktop. It's fast and easy to navigate, reduces repetitive stress injuries by keeping your hands on the keyboard (although mouse support can be added), and remains functional when your X server fails, which makes it a useful part of your recovery toolkit.
The only sign of Alpine's age is a few terms that are non-standard today: "Commit changes" for "Save," "Form letter" for "Template," and "WhereIs" for "Search," for example. However, these usages are easy to figure out and create only minor learning problems.
Navigating Alpine
If you check Alpine's man page [3], you'll see it has several command-line options. Most concern the folders, options, and configuration files that Alpine uses and duly notes in its man page. However, users who prefer simplicity will probably prefer to use the unadorned command alpine
and rely on the displayed keyboard commands to navigate.
Unlike many recent email browsers, Alpine lets you access all features through the keyboard. On the main part of the main menu, Alpine lists the main commands for navigating through its sections (Figure 1). Along the bottom is the menu for the Pico editor that Alpine uses. Neither of these lists of keyboard commands is case sensitive but both are contextual, so the same key can access different functions at different points in the menu. Pico menu commands use ^ to indicate that you should press the Ctrl key first. On a section's introductory screen, Alpine's menu and Pico's may be almost identical. To activate a command, either press its key or, in Alpine's menu, highlight the command and press the Enter key.
From the main menu, select I (Message Index) to view the contents of the current folder – by default your Inbox, as shown across the top of the window. You can then read, reply, forward, and delete email message. To change from the default folder, press L (Folder List), and use the arrow keys to move from directory to directory. The Folder List is also the screen from which you can create additional folders and server connections as needed.
If you run into difficulties, use the ? key to open help. Additionally, O in the Pico menu displays less frequently used commands.
Setting Up Mail Accounts
Like other Unix applications of its vintage, Alpine uses plain text configuration files. However, for convenience, most users will probably use Alpine's own interface for setting up email.
To begin configuration, press S (for Setup) and then C (for Configuration). Alpine changes to a display of dozens of fields divided into 14 categories: Basic, Composition Preferences, Reply Preferences, Sending Preferences, Folder Preferences, Address Book Preferences, Message Index Preferences, Mark for CC, Viewer Preferences, News Preferences, Printer Preferences, Advanced User Preferences, and Printer Preferences – making for hundreds of options in all.
The basic settings at the top of the Configuration screen (Figure 2) are the ones you need to send and receive email. Many of these settings that refer to a directory or file have default values. If you are on a network with a mail server, you can leave most of these values untouched – the Personal Name, for example, is taken directly from the name of the current account. However, you probably need to specify the User Domain (your email address) and the SMTP server (the outgoing mail server). You may also choose to add folders that have no default, such as the Read Message folder and Form Letter (Template) folder.
To edit each of these fields, use the arrow keys to navigate to them, then press the Enter key when the field is highlighted. A single line appears above the navigation keys for editing the field's value. Enclose the value in quotation marks, then press the Enter key after editing to save the value. Note that, at some point, you need to select L from the Main Menu and actually create the directory.
By contrast, enabling email is more complicated if you need to connect to a remote server, such as an Internet service provider. To set up a remote provider, press S (Setup), then L (Folder List), and then A (Add), and fill in the fields to create a new connection (Figure 3).
For example, to connect to Gmail, you can use something like Gmail for the Nickname, and imap.gmail.com/ssl/user=[USERNAME]@gmail.com for the server. When you have entered the server, press Enter and type your password when prompted. Once you log in, press Ctrl+X to save the new list entry. Next, press S to return to Setup and then C (Configure). Change the SMTP server field to smtp.gmail.com/tls/user=[USERNAME]@gmail.com and the Inbox (and any other fields) to {pop.gmail.com/pop3/ssl/user=[USERNAME]@gmail.com}Inbox. After testing, you may find you need to scroll down the Configuration screen to Folder Preferences and select Enable Incoming Folders Collection.
Other remote email providers are configured in the same way. You might need to contact your provider to get the correct paths.
Configuring Other Settings
To select other configuration options, press S from the main menu and select options from the C (Configure) menu (Figure 4). Below the general configuration fields is a list of checkboxes for basic configuration of the message composer. You might want to experiment with the alternative menus available. Of the other options, Spell Check Before Sending is probably the field that most users will want.
Configuration for replies follows. You can decide how replies will handle attachments, as well as which parts of the original message to include in the reply. Below that are options for sending and using the folders you have defined, as well as Address Book and Message Index and Viewer Preferences. You may need to experiment with some of the features listed to decide which ones you want, but first you can simply select the features that you know you want. To learn more about an option, press ? for information. When you are finished configuring, press E and then y (to exit and save).
Other configuration options are available from the Setup introduction page. Printer and Newpassword are settings for your entire installation, not just Alpine. By contrast, S (Signature) is for entering a signature to use with your email messages), and A (Addressbook) is for adding an address book.
The R (Rules) option lets you filter incoming message by Roles, Index Colors, Filters, and other defining characteristics. Each category is defined by a pattern in an email's To, From, and/or Sender headings and determines such features as its priorities and whether the address is added automatically to an address book. Still another way to filter messages is to create collectionLists (L), which assigns incoming email to specific folders.
Other options let you set an LDAP directory for Alpine (D), customize the colors of different parts of Alpine (C), specify the directories for public certificates and private and public keys (M), or upload your Alpine installation to an IMAP server, from which it can read from any of your computers (Z).
The only difficult configuration element is P (Printing). Its default settings are very much old school Unix and may be confusing to a modern Linux user. In theory, you should be able to enable printing through the lps
command, but, assuming you have a Postscript printer, the best advice I have found is on the Arch Linux wiki [4]. It suggests that you install the a2ps (Anything to Postscript) package [5] and then edit the ~/.pinerc
file with the commands shown in Listing 1.
Listing 1
Enable Printing
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.