PINE and PC PINE

PINE (Program for Internet News and Email) is a popular character-based IMAP client. PINE was developed at the University of Washington, home of IMAP itself. PINE is available for nearly all Unix platforms. It is also available for Windows machines in a version called PC PINE. PINE was designed to be easy to use. While it has retained its simplicity of operation over many years of development, it has also grown into a very highly configurable, robust client equally suited to both novices and power users. It’s worth mentioning that there are other character- based IMAP clients for Unix, but they are not covered here because none even comes close to matching PINE’s feature-richness. The Elm mailer was once widely preferred over PINE for its simple interface. Although it supports IMAP, it has come to be considered a holdover from the good old days of “old-school Unix.”

The Windows version of PINE, PC PINE, has all the features of Unix PINE, but runs under Windows or DOS. PC PINE has the added benefit of allowing you to attach files that reside on your computer’s local disk to email messages without the need to first upload those files to another host. PC PINE, although it doesn’t appear to on a first look, does support drag-and-drop attachments (try dragging a document into a Compose window).

The PINE home page is located at http://www.washington.edu/PINE/.

Features

PINE supports the following Internet protocols and specifications: IMAP4, SMTP (Simple Mail Transport Protocol), NNTP (Network News Transport Protocol) for reading Usenet news within PINE, and MIME (Multipurpose Internet Mail Extensions). PINE has the option of supporting LDAP and Kerberos, if it’s built to include the appropriate libraries. Instructions for integrating LDAP and Kerberos are provided in the PINE online documentation.

PINE offers many features, including:

  • Personal address books.

  • Context-specific online help.

  • A command to grab an address from a message and add it to the address book.

  • A message composer with easy-to-use default editor and built-in spell checker. The composer expands addresses as they are entered and provides direct access to the address book.

  • Support for both remote and local folders.

  • Robust facility for search and selection of messages.

  • The ability to perform operations on sets of selected messages at one time.

Version 4.20 and up support client-side mail filtering. PINE does not support “vacation” messages.

Supported Platforms

PC PINE is available for Windows NT, Windows 95, Windows 98, and Windows 2000.

Unix PINE is available in both a binary distribution and source distribution. The binary distribution is available for many flavors of Unix, including AIX, HPUX, Digital Unix, Linux, NeXT, SGI, Solaris, Sun OS, and Ultrix.

In addition to the platforms for which the PINE binary distribution is available, PINE has been ported, built, and tested on many other Unix platforms. Some of those platforms include FreeBSD, NetBSD, SCO, Ultrix, DG/UX, and SVR4. The full list is available at http://www.washington.edu/PINE/overview/ports.html.

Configuring PINE for IMAP

PINE’s syntax for defining IMAP options is more difficult to handle than most other clients. Examples are provided in this section to make it less confusing.

PINE for Unix

Unix PINE allows the system administrator to exert some control over client options by setting global default options. Any global option can be protected, preventing the option from being overridden by a user’s personal options settings.

PINE for Unix has three configuration files:

/usr/local/lib/pine.conf

The pine.conf file contains the system-wide global configuration options (location is configurable). Options in pine.conf are overridden by the options in the user’s personal ~/.pinerc file.

/usr/local/lib/pine.conf.fixed

The pine.conf.fixed file contains system-wide options that are essentially “read-only” and cannot be overridden.

~/.pinerc

~/.pinerc is the user’s personal configuration file. Options defined in that file override the options set in the system pine.conf.

Users can configure PINE either with a menu system through the Setup command, or directly by editing the personal resource file, ~/.pinerc.

Large sites using PINE and IMAP may want to set site options in the pine.conf file to reduce the amount of work their users must go through to configure PINE individually. It’s also recommended that large sites “lock down” certain options, such as the outgoing SMTP server, domain name, path to the user’s INBOX, and the user’s full name.[11] This procedure not only will make PINE easier to use for the end user, but also will prevent possible problems that could occur if the SMTP server is incorrectly specified or if the user spoofs his personal name. Example 4-1 is a pine.conf file that might be used at a large site using IMAP with PINE. Example 4-2 shows the pine.conf.fixed file used at that same site.

Example 4-1. pine.conf

#      /usr/local/lib/pine.conf -- system-wide PINE configuration

# The following options are set read-only in pine.conf.fixed.

personal-name=
user-domain=
smtp-server=
inbox-path=

# The following options are set but may be overridden by options in .pinerc

nntp-server=newserv.unt.edu
incoming-folders=Announcements {imapserv.unt.edu}user.announce.Internet_News
folder-collections=Folders {imapserv.unt.edu}inbox.[],~/mail/[]
editor=/usr/ucb/vi
speller=/usr/local/bin/ispell
image-viewer=/usr/local/bin/X11/xv
bugs-fullname=Helpdesk
bugs-address=helpdesk@helpserv.unt.edu
suggest-fullname=Helpdesk
suggest-address=helpdesk@helpserv.unt.edu
local-fullname=Helpdesk
local-address=helpdesk@helpserv.unt.edu
forced-abook-entry=help|Helpdesk|helpdesk@helpserv.unt.edu

global-address-book=/data/abook/pine.abook,
    /data/mercury/pine.abook.A-C,
    /data/mercury/pine.abook.D-F,
    /data/mercury/pine.abook.G-I,
    /data/mercury/pine.abook.J-L,
    /data/mercury/pine.abook.M-O,
    /data/mercury/pine.abook.P-R,
    /data/mercury/pine.abook.S-U,
    /data/mercury/pine.abook.V-X,
    /data/mercury/pine.abook.Y-Z

feature-list=enable-8bit-esmtp-negotiation,
    enable-8bit-nntp-posting,
    enable-aggregate-command-set,
    enable-alternate-editor-cmd,
    enable-bounce-cmd,
    enable-flag-cmd,
    enable-full-header-cmd,
    enable-goto-in-file-browser,
    enable-jump-shortcut,
    enable-lame-list-mode,
    enable-mail-check-cue,
    enable-tab-completion,
    print-formfeed-between-messages,
    quell-dead-letter-on-cancel,
    save-will-quote-leading-froms,
    signature-at-bottom,
    use-sender-not-X-sender

# Accept PINE's defaults for all options below this line

news-collections=
incoming-archive-folders=
pruned-folders=
default-fcc=
default-saved-msg-folder=
postponed-folder=
mail-directory=
read-message-folder=saved-messages
signature-file=
address-book=
initial-keystroke-list=
default-composer-hdrs=
customized-hdrs=
viewer-hdrs=
saved-msg-name-rule=
fcc-name-rule=
sort-key=
addrbook-sort-rule=
goto-default-rule=
character-set=
composer-wrap-column=
reply-indent-string=
empty-header-message=
use-only-domain-name=no
printer=lp
personal-print-command=
standard-printer=lp
bugs-additional-data=
kblock-passwd-count=
sendmail-path=
operating-dir=
display-filters=
sending-filters=
alt-addresses=
addressbook-formats=
index-format=
viewer-overlap=
scroll-margin=
status-message-delay=
mail-check-interval=
newsrc-path=
news-active-file-path=
news-spool-directory=
upload-command=
upload-command-prefix=
download-command=
download-command-prefix=
mailcap-search-path=
mimetype-search-path=
tcp-open-timeout=
rsh-open-timeout=
new-version-threshold=

Options that are not explicitly set, such as news-collection=, will take PINE’s default value unless a value is defined in pine.conf.fixed.

Example 4-2. pine.conf.fixed

personal-name=
user-domain=
inbox-path={imapserv.unt.edu}INBOX
smtp-server=smtpserv.unt.edu
use-only-domain-name=
feature-list=enable-lame-list-mode,
    no-use-sender-not-x-sender

In the previous example, personal-name, user-domain, and use-only-domain-name are not set—PINE will look up those options and set them at runtime. Forcing those options to be set by PINE helps prevent email spoofing. To enable a feature, include it in the feature-list. To disable a feature, prefix it by “no-” (for example, no-use-sender-not-x-sender) and include it in the feature list. Features are comma-delimited.

It’s worth noting that the syntax for defining IMAP options is identical in the two global configuration files and in the personal PINE configuration file.

A user is free to set options by directly editing her ~/.pinerc file, but may also set any allowable option from within PINE’s configuration menu. Settings that pertain to IMAP incoming mailboxes and folders are set in PINE’s Setup Configuration menu. Start up PINE and, from the Main menu, select “Setup” and “Config.” You will see a menu that begins something like the one shown in Example 4-3 .

Example 4-3. PINE Setup Configuration Menu

PINE 4.20   SETUP CONFIGURATION       Folder: INBOX  192 Messages

personal-name            = <Value is Fixed: using "John Doe">
user-domain              = <Value is Fixed>
smtp-server              = <Value is Fixed>
nntp-server              = <No Value Set: using "newserv.unt.edu">
inbox-path               = {imapserv.unt.edu}INBOX
incoming-archive-folders = <No Value Set>
pruned-folders           = <No Value Set>
default-fcc              = <No Value Set: using "sent-mail">
default-saved-msg-folder = <No Value Set: using "saved-messages">
postponed-folder         = <No Value Set: using "postponed-msgs">
read-message-folder      = <No Value Set: using "saved-messages">
form-letter-folder       = <No Value Set>
signature-file           = <No Value Set: using ".signature">
feature-list             =
            Set    Feature Name
            ---  ----------------------
            [ ]  allow-talk
            [ ]  assume-slow-link
            [ ]  auto-move-read-msgs

? Help  E Exit Setup   P Prev   - PrevPage A Add Value  % Print
        C [Change Val] N Next spc NextPage D Delete Val W WhereIs

Options that list “Value is Fixed” are read-only options set in the pine.conf.fixed file by the system administrator and cannot be changed by the user. In the example, the personal-name, user-domain, and smtp-server are fixed. The inbox-path setting tells PINE to look for the IMAP INBOX on the server imap.unt.edu. To change the inbox-path or any other option that is not fixed, press C to Change Value, enter the new value, and press Return to make the change. Press E to exit the Setup Configuration menu—you will be prompted by PINE as to whether or not you want to save your changes. Answering Yes will save your changes permanently.

PINE supports multiple IMAP accounts. Setting up multiple accounts is somewhat cumbersome to do via PINE’s menu interface, and for that reason we’ll show you how to configure multiple accounts by editing the ~/.pinerc. In the next example, user johndoe wants to set up three IMAP accounts. Here is information on the accounts that will be used to configure johndoe ’s ~/.pinerc:

Work

The Work account is a collection of IMAP folders that reside in johndoe ’s IMAP account on the official company IMAP server where he works. The name of that IMAP server is imap.someplace.org.

Personal

The Personal folder collection is a collection of folders that reside in johndoe ’s account on his personal IMAP server, running on his Linux box in his garage at home. That IMAP server’s name is imap.johndoe.net.

Cyrus archive

johndoe wishes to read mail in CMU’s Cyrus mailing list archive, logging in anonymously. The mailing list archive is located on the IMAP server called cyrus.andrew.cmu.edu, lives in the archive user’s mailbox hierarchy, and belongs to the cyrus user on that server.

Example 4-4 shows how the folder-collections option should be set in johndoe ’s ~/.pinerc to meet his requirements for the three IMAP accounts.

Example 4-4. pinerc folder-collections Settings

folder-collections=Work {imap.someplace.org}inbox.[],
                   Personal {imap.johndoe.net}inbox.[],
                   CyrusArchive {cyrus.andrew.cmu.edu/anonymous}archive.[]

PC PINE

PC PINE’s configuration is identical to that of PINE for Unix. The only difference lies in the filename and location of the user’s personal configuration file on the client machine. The name of the user’s configuration is either PINERC or the value of the environment variable PINERC. PC PINE searches for PINERC in the following places, in order of preference:

  • $PINERC

  • $HOME\\PINE\\PINERC ($HOME, if not set, defaults to the root of the current drive)

  • A file named PINERC in the same directory as the PC PINE executable (the file PINE.EXE )

The address book is stored in a file named ADDRBOOK, and the signature is in a file called PINE.SIG. PC PINE expects to find both files in the same directory as the PINERC file.



[11] Locking down the user’s full name disables the use of “roles,” which some users find useful.

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.