Open Computing ``Hands-On'': ``PC-Unix Connection'' Column: July 94 E-Mail for the Rest of Us Spread the wealth of Unix's features with Pine, an e-mail manager with something for everyone from superusers to stupor users By Tom Yager If you don't understand Unix, you have no business using it. At least, that used to be the prevailing view among the Unix literate. Their hard-won knowledge left them with an almost proprietary attitude regarding their pet operating system. But now everybody's getting into the Unix waters--a positive development, I think--and it forces change on some administrators who would prefer to cater to knowledgeable users. Recent Unix releases have spawned a class of chummy applications that take some part of Unix and ostensibly make it easier to use. Graphical electronic mail readers, point-and- click online manual page viewers, and system administration tools are all common targets for the spoonful of sugar. I have no trouble with the idea of making things easier. My gripe? Too often, functionality gets sacrificed for simplicity. Can't anyone create something that is simple and capable? Someone has, and that something is called Pine. This e-mail manager, developed by the University of Washington, is a virtually commercial-quality application--with source code--available for free to the public. It is such a laudably well-designed work that I have no trouble saying: if you use Unix to send and receive e-mail, you really must get Pine. Pine does everything you'd want a mail program to do--read, send, archive, even manage addresses and lists--and it does so with a concise text interface that runs as well on an X terminal as it does on a 9,600-baud modem connection. You can retrieve the Pine source code via anonymous FTP from ftp.cac.washington.edu (in the /pine) directory or do an Archie search for ``pine'' to find it on other servers of your preference. I grabbed the source code for version 3.89 and compiled it on my Unixware 1.1 lab system. Under Its Skin Pine not only typifies excellent interface design, but it also incorporates features that rival commercial e-mail managers. The Unix version of Pine runs on a variety of systems (AIX, SunOS/Solaris, and System V Release 4 among them), but remote users not equipped with the big U can pick up PC-Pine. Pair it with Sun's PC-NFS or one of a few other PC TCP/IP packages, and PC-Pine can reach into your Unix mail host to pick up your messages. The invisible portions of Pine are just as intriguing as its front end. It incorporates support for several marvelous buzz- acronyms: SMTP, IMAP, and MIME among them. The simple mail transfer protocol (SMTP) is the most widely implemented scheme for transferring mail between Unix systems. Pine can connect to SMTP server systems two ways: through Sendmail, if you've got it, or through Pine's built-in SMTP client. If you want to reach into your mailbox from a remote location without the overhead of a telnet session, Pine allows that, too. IMAP stands for interactive mail access protocol. All you need is a network-connected host and a copy of Pine. The source code includes an imapd IMAP server that fields connections. Just specify the address of the remote mail folder, and Pine makes the IMAP link. It then behaves as though the mail were stored locally. MIME, the multipurpose Internet mail extensions, seemed interesting to some mostly because they permitted limited text attributes (underlining, bold) in previously monotone e-mail text. Pine exploits MIME's ability to attach binary files to mail messages. Have you ever had to explain to someone how to mail a binary file? Pine's MIME facility makes it easy. You just specify the file (you may choose it interactively) or files you want to attach. When the recipient gets the message, the attachments are listed by Pine (or any other MIME-capable mailer). He or she can save them to disk or, in the special case of GIF graphic files, view them on an X Windows display. Good Stuff Cheap Lest Pine's price tag fool you into thinking it's beset with bugs and missing features, take heart: It's one of the most solid and capable public-domain programs I've seen in a long time. A Pine session starts with its main menu (see Figure 1 (8K GIF)). If you're using the system that contains your mail file, Pine opens the mail file and tells you how many messages you've got when it puts up its main menu. This menu is blissfully simple, holding only six items: Help, Compose, Index, Folder List, Address Book, and Setup. I hacked the Pine code to keep curious fingers out of the Setup menu so it's safer to use on my public-access system; it was an easy fix. The Compose option sends a message. Another hidden jewel of Pine is its editor, Pico. Pico, which you may also run as a standalone program, is a radically reduced subset of the Emacs full-screen editor. It gives you what you want, including word wrap, modeless editing, and even a spelling checker (in the Unix version only). When Pine invokes Pico, you also get fill-in-the-blanks mail header editing. The editor prompts for ``To:'' and ``Cc:'' addressing (with automatic nickname aliasing), binary MIME attachments, and subject. After you fill in the header, the editor hops down to the lower portion of the split screen where the message text resides. If you have a file named .signature in your home directory, Pine adds it to the body of your message. Pine keeps both incoming and outgoing messages in folders. It has default folders, and you can create new folders of your own. It's a flat system (no hierarchy), and Pine makes no distinction between folders holding inbound and outbound mail. Still, all it takes to switch to a different folder is to select from a list on the screen. That's typical of Pine; it never makes you type something when it can be chosen from an on-screen list. The Index selection lists the messages stored in the currently open folder (usually ``INBOX,'' your default Unix mailbox). Pine puts up a list of available messages to pick from. You can jump directly to a message number, search subject strings for specific text, or even yank a sender's address into your address book. Want to see only your new messages? Fire up the viewer by hitting ``V'' or Enter--it's set up as the default action. Pressing the Tab key brings up the next new message. Pine's Address Book option keeps track of individuals and lists, using nicknames you devise. You'll never have to type a complex Internet e-mail address more than once. To blast a note to blasny@finicky_blert.ufoo.prison.edu, just enter your favorite nickname in the ``To:'' field of the header editor. Pine instantly expands it to the full address. If you get lost in Pine, which is not at all easy, you can access the embedded context-sensitive help system. Typing ``?'' from nearly anywhere will get you a few screens of helpful text. If you've got a printer configured into Pine, you can even print the help files. Of course, that capability extends to mail messages as well. A Role Model You should always be on the lookout for ways to make your Unix box more accessible to all classes of users. Pine is such a quality piece of work that even your experienced users will find themselves using it as a matter of course. Their affection, and mine, for Pine is for its just-right balance of functionality and ease of use. I hope others, both in the academic and commercial development communities, will take a page from Pine and build applications that everyone can use. ------------------------------------------------------------------------------- Copyright © 1995 The McGraw-Hill Companies, Inc. All Rights Reserved. Edited by Becca Thomas / Online Editor / UnixWorld Online / beccat@wcmh.com [Go to Content] [Search Editorial] HTML markup by Tim "The Kid" Cooley Last Modified: Tuesday, 22-Aug-95 15:48:41 PDT