Deflexion.com blog >> 
Join the conversation >>
 

[Infinite Ink logo]

POWER PINE®
Getting the Most Out of Unix-, Mac-  & PC-Pine

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright © Nancy McGough & Infinite Ink
Last modified 10-Dec-2007

 

MetaNote   I wrote this Power Pine page for someone who wants to really understand the inner workings of Pine, the multi-platform POP, IMAP, NNTP, & ESMTP client, and take advantage of its power features. A lot of the instructions in this article depend on discussion that comes earlier, so if you are having trouble following the instructions, please go back and read the earlier parts of the article.

Version MetaNote   The current released version, Pine 4.64, was released 28 September 2005. The current testing version, Alpine 0.999999, was released 6 December 2007.

Searching MetaNote   You can use this form to search the web, the Infinite Ink site, or the Deflexion.com site (my blog) for more information about Alpine or Pine (or about anything!).

 
Web
Infinite Ink
Deflexion.com

 

 

[New!] News MetaNote   The Alpine- and Pine-related news items that used to be posted here are now posted on my Deflexion.com blog with the label ALPINE. (Alpine is Pine's new name.)

 

 


 On This Page 

 

 

What is PC-Pine?

PC-Pine is Unix Pine that the University of Washington Pine team ported to Microsoft's platforms. Versions 4.0 and later — the latest version is 4.64 — are 32-bit and run on Windows 95 and later (98, Me, NT, 2000, XP, etc). Versions 3.96 and earlier are 16-bit and run on all versions of Microsoft Windows and on DOS. In addition to supporting the Unix keyboard shortcuts, PC-Pine has a menu bar with drop-down menus, dialog boxes, clickable buttons, clickable key-menu commands, clickable messages in the Message Index, clickable URLs & web-hostnames, clickable attachments, right-click pop-up menus, scroll bars, and supports cutting, copying, & pasting using the Windows clipboard.

 

Why Use PC-Pine

PC-Pine versus Other Windows Mail Clients

In addition to the many reasons to use Pine that I list on the Infinite Ink main Pine page, MS Windows users have the additional reason that there is no other Windows mail client that I know of that is as powerful and customizable as PC-Pine is. The area that Pine really shines — compared to other MS Windows mail clients — is:

 

 Security and Privacy 

 

Unlike Unix mail clients, most MS Windows mail clients do not give users a lot of control over how message headers, message bodies (plain, enriched, or HTML), and attachments are displayed. This lack of control makes you vulnerable to attachments containing viruses and “bugged” HTML messages. I discuss these in Security and Privacy Features on the Infinite Ink main Pine page.

Some ways to secure Pine and your system are described in the Privacy and Security section below. I describe some areas where I think Pine needs to be improved in the Pine Security-Enhancement Wishes section of my main Pine page.

 

PC-Pine versus Unix Pine in an SSH Window

Many people have an account on a Unix system and happily use Pine by SSH'ing from their Windows machine to a Unix machine and running Unix Pine in an SSH window. If your machine is running Windows 95 or higher, there are many reasons you might want to use PC-Pine rather than Unix Pine in an SSH window.

 

Advantages of PC-Pine

With PC-Pine you can:

  1. avoid typing your server passwords by storing them on your PC (you should do this only if your PC is not accessible to spies)
  2. double click (or press the ENTER key) on a URL or web-hostname and have it open in a web browser on your PC (details are in Step 6E, url-viewers, below)
  3. use your mouse to run Pine commands
  4. easily attach a file that is on your PC to a message that you are sending
  5. easily view an attachment using a program that runs on your PC (for example, view a Microsoft Word attachment using Word Viewer)
  6. easily export an attachment to your PC's file system
  7. type your messages in a local text editor without having to wait for the delay caused by your ssh client transporting your keystrokes to the editor running on your Unix host
  8. postpone a message to a folder on your local PC and work on it when you are not connected to the Net
  9. read and process messages and attachments that you've saved to your local PC
  10. use the Windows clipboard and PC-Pine's Select, Select All, Cut, Copy, Copy Append, and Paste to move text between PC-Pine and other windows open on your PC
  11. have multiple instances of PC-Pine running and switch between them using the Windows Taskbar
  12. get notification about new messages in the Windows Taskbar
  13. have better international character-set handling
  14. right click on a message in the Pine MESSAGE INDEX and choose from a list of message-specific commands, for example you can flag the message or open the message in a separate window

 

Disadvantages of PC-Pine

Disadvantages of using PC-Pine rather than using Unix Pine in a telnet/ssh window include the following.

  1. The PC-Pine default folder format is c-client MBX, which means that you can't easily use tools and other messaging clients that are designed to use Unix mail spool mailbox format (mbox). For more about this see my #4 Pine Wish: Let Pine Users Choose Their Default Local Mailbox Format on the Infinite Ink main Pine page.
  2. Starting with Pine 4.0, the PC-Pine source code is not available to general users so you cannot patch the code or use the Pine patches that other people create.
  3. Your PC needs to have access to SMTP and NNTP servers that let you send messages using all your roles. AOL, for example, does not give their users direct access to the AOL SMTP server, the AOL NNTP server, or to any port 25 SMTP server (because they hijack outbound port 25 requests). You may be able to get around this by either using SSH port forwarding to tunnel your SMTP requests to another ISP or by reading the Unofficial AOL Email FAQ, especially the part about using a third-party email program.
  4. If you like to multitask and you have a machine with a slow processor, not much memory, and a slow connection to the Net, you are probably better off using Pine in an ssh window and saving your sytem's resources and bandwidth for your other tasks, such as surfing the web.

In the next section, I describe how you can get many of the advantages of PC-Pine and not have the first two disadvantages that I list above.

 

PC-Pine versus Pine on “Unix on Windows”

With Pine running on one of the Unix-on-Windows packages, such as Cygwin, you can run Pine on your PC and not have disadvantage #2 above, i.e., you can view and patch the Pine source code. The disadvantages of Pine on Unix on Windows are that 1) you need to install a Unix-on-Windows package and 2) you don't get all the GUI-ness that you get with PC-Pine. Depending on your needs, this might be the right option for you. I have links to Cygwin Pine, U/Win Pine, & more on the Infinite Ink main Pine page.

Note     According to this 2004-Dec-10 comp.mail.pine message by Mark Crispin, “No mailbox format except for [c-client] mbx works in Cygwin.”

 

 

Before You Begin

PC Requirements

This article describes how to set up PC-Pine 4.64 on a system running Microsoft Windows 95 or higher. These instructions do not work for earlier versions of PC-Pine and need to be modified for Windows NT, 2000, and XP (this is noted below).

Server Requirements and Server Information Needed

Pine was designed to be an IMAP client so if your mail is not delivered to an IMAP server, you probably do not want to use PC-Pine as your primary mail client.

Tip     If you are looking for an ISP that supports IMAP, see my IMAP Service Providers page, which includes lots of IMAP tips, a growing lists of reasonably-priced & free IMAP service providers, and instructions for setting up Pine to access the INBOX and mailstore at each of these providers.

In order to set up PC-Pine you need the following information:

If you will use Pine as an NNTP client, you also need to know:

And finally it is useful to know:

If you can not find the answer to these questions on your ISP's web pages, ask in an appropriate local discussion group, i.e., a discussion group that is for discussion among users of your ISP. If you can't find the answers in your ISP's web pages or in their local discussion groups, send these questions to your ISP's technical support. Be forewarned that some ISPs do not (yet) understand IMAP and do not know that PC-Pine exists.

 

Terminology and Typographic Conventions Used in This Article

I use a fixed-width font for text that is displayed on your computer, text that is meant to be typed, and names of files. Variables and names that depends on your settings are formatted in italics.

Most Pine commands are not case sensitive so if I say “To go to the Main Menu, type M,” you can type either M or m. Some non-alphabetic characters work without holding down the SHIFT key. For example, if I say “To go to the parent screen, type <” you can type either < (less than) or ,(comma). Some non-alphabetic characters do require the SHIFT key. For example, to use the flag command you need to type * (SHIFT-8). Just typing 8 will not invoke the flag command.

Some Pine commands are issued by pressing the CTRL key and while holding it down, typing a character. For example, to get Pine context-sensitive help, type CTRL-G. CTRL-G is abbreviated ^G and in general CTRL-X is abbreviated ^X. Usually you do not need to hold down all three keys (the CTRL key, the SHIFT key, and the character); just the CTRL key and the unshifted character will do. For example, to set a mark in Pico you can type either CTRL-6 or CTRL-^ (“control caret”). And to get Pine context-sensitive help you can type either CTRL-G or CTRL-g. An exception is CTRL-_ (“control underscore”), which launches an alternate editor. For this command you need to press CTRL-SHIFT-_.

Often there are many ways to issue a Pine command. I usually give only one way but you can sometimes find another equivalent command by looking at the key menu at the bottom of the Pine screen or by consulting Pine's context-sensitive Help by typing ^G.

If I am writing about the Microsoft Windows world, I use %HOME% to mean whatever is specified by the HOME environment variable. If I am writing about the Unix world or about many worlds (e.g., Unix and MS Windows), I use $HOME to mean whatever is specified by the HOME environment variable.

I use the word directory for a place on a computer disk where files and possibly other directories, called subdirectories, are stored. I use mailbox, folder, or message folder for a place on a computer disk where Pine stores messages. I hope the following paragraph illustrates the use of these terms.

PC-Pine was created back in the days when the name of a DOS or MS-Windows file was limited to eight characters followed by a period and a three-character extension. Because of this, the PC-Pine default folder names contain eight characters or fewer. For example, the PC-Pine default is to put a message that you postpone into a folder named “postpond.” The default location for this folder — and all PC-Pine default folders — is your %HOME%\mail directory.

A special folder name is INBOX. You might not have a folder that is actually named INBOX. INBOX is an abbreviation for whatever you or your system administrator has specified as your primary incoming folder on the IMAP server. When the name INBOX is used in an IMAP client, it is case-insensitive so it is fine to write INBOX, inbox, Inbox, or any other combination of lower and upper case.

 

See Also

For more about these and other email-related terms, see:

 

 

Configuration Overview

Default Files and Directories

The easiest way to set up PC-Pine is to unzip pmxxxw32.zip into a directory, double click on pine.exe, and leave all Pine-related files and directories in their default locations. The defaults, which are discussed in the Pine man page and Support Files, Environment Variables, and Registry Settings: PC-Pine, are as follows.

File Default Location
all local mailboxes (aka “folders”)
sentmail mailbox
savemail mailbox
postpond mailbox
intruptd mailbox

the primary folder collection, which defaults to %HOME%\mail

(if %HOME% is not defined, the root of the current drive, for example C:\, is considered to be %HOME%)

remote IMAP-accessible mailboxes not set; to specify this, see Setting IMAP, NNTP, and Local Collections below

pinerc
spell32.dll

pine.exe directory
dict.u

spell32.dll directory

pinercex (pinerc exceptions; available in 4.30+)
addrbook
*.lu
(addrbook lookup)
a*
(abook hash files?)
.ab*
(more abook hash files?)
pine.sig
pinedebg.txt
pineDBGN.txt

mailcap (cannot be created from within pine)
mimetype (cannot be created from within pine)
PASSFILE, e.g. pine.pwd (cannot be created from within pine)
newsrc (if it does not exist in %HOME%)

pinerc directory
deadletr
newsrc
(if it already exists in this directory)
%HOME%
newsrc.old newsrc directory
mailbox.lock files

mailbox directory

C!!MyHome!Msgs!mailbox (lock file for C:\MyHome\Msgs\mailbox) %WINDIR%\Temp (4.31 and later)
%WINDIR% (4.30)
%TEMP% (4.21 and earlier)
mapi_debug.txt (needs to be created by user; new in 4.30) %TEMP%

pi* (pico temp files)
msgNN (??)

%TMP%
aeN.txt (alternate editor temp files) %TMPDIR%

 

After a lot of experiments, I have decided that I like to keep the Pine program files and my Pine user-specific files in separate directories; and I like my user files to go in a subdirectory of my “home” directory. In the next five sections I discuss Pine configuration files and explain why I set things up the way I do.

Trivium     The rc in pinerc and newsrc is a Unix naming convention that stands for either runtime configuration, runlevel change, or run commands (take your pick!). Thanks to Richard Smith, the maintainer of geekrave.org, for telling me he thinks of rc as runtime configuration; Elmar Hinz for telling me he thinks of it as runlevel change; and Imperial College for FOLDOC, the Free On-Line Dictionary Of Computing, and its definition and history of rc.

 

How PC-Pine Finds User Files

As you can see in the table above, most Pine user files reside in the directory that the pinerc file is in. PC-Pine finds the pinerc file by looking at:

  1. the -p command-line argument
  2. The PINERC environment variable (%PINERC%)
  3. %HOME%\Pine\pinerc
  4. pine.exe directory\pinerc
  5. the Windows registry value in HKEY_CURRENT_USER\Software\University of Washington\PC-Pine\4.0\PineRC (see Checking, Clearing, and Resetting Pine's Registry Settings below)

The first one in this list that exists is what Pine uses as the pinerc file. All user files listed in the fifth (green) row of the table above are read from and written to the directory that the pinerc file is in. More details about where PC-Pine looks for user files is at:

I prefer to use Pine configuration method #3 (%HOME%\Pine\pinerc) and in the next few sections I discuss why. In Setting Environment Variables below, I walk you through setting up a HOME environment variable & directory, and a “Pine” subdirectory.

 

Why Separate Program Files and User Files?

Separating program files and user files is generally a good idea because it makes it easy to

Separating these files is an example of modular architecture.

 

Why Put User Files in a “Home” Directory?

Another key feature of my PC-Pine configuration is that I put my Pine user files in a subdirectory named Pine in my “home” directory. Using a home directory is useful because:

 

Naming Directories

If you are going to use the Pine configuration that I use, you can name your Pine program files directory, messages directory, and “Home” directory anything you like. However, your Pine user-files directory must be named Pine and must reside in your “Home” directory. Here are some suggestions for naming these directories.

 

Directory Contents Name Suggestions
Pine Program Files C:\Program Files\Pine or C:\Proggies\Pine or C:\Proggies\PC-Pine or wherever you like
“Home” C:\Nancy (but use your name instead of mine!) or C:\MyHome or D:\MyHome or C:\Home or C:\Data or wherever you like
Pine User Files %HOME%\Pine (if you want to use Pine configuration method 3, this directory must be named Pine and must reside in your %HOME directory)
Local Messages %HOME%\Msgs or %HOME%\Mail or %HOME%\Messages or wherever you like (the Pine default is %HOME%\mail)

 

For security reasons, you might want to use bizarre and completely non-standard file and directory names. I discuss this in the Privacy and Security section below.

The next two sections discuss my personal naming strategies. The section Step by Step Through Downloading and Setting Up PC-Pine walks you through creating the directories and setting the HOME environment variable.

 

Naming Your “Home” Directory

This is where the user-specific files of Pine and many programs that originated in the Unix world go. The Microsoft default is to put user-created documents in C:\My Documents. I like my personal files, including documents and configuration files, to be located together so I use a modified Microsoft naming style and name my download directory C:\MyDownloads, my web sites directory C:\MyWebs, my backup directory C:\MyBackups, and my home directory C:\MyHome. And I set up all my programs to save their configuration files in C:\MyHome. This way when I need to find or backup files I've created or updated—or my programs have created or updated—I can go to Windows Explorer and sort by name and all My directories are alphabetized together. On a machine that has only one disk drive, I use C:\MyHome. On a machine that has more than one drive, I like to keep user files somewhere other than C; for example, in D:\MyHome.

 

Naming the Directory Where Your Local Messages are Stored

Both Unix Pine and PC-Pine use a directory named “mail” in your home directory as the default for where folders are stored. Since Pine is both a mail and news client, you can use Pine to save both mail and news messages in your folders. To me it seems incorrect to call this directory “mail,” so I call it “Msgs.” I capitalize the letter M because my personal naming convention is to name directories using an initial capital letter. You can, of course, name the directory where your folders reside anything you like!

 

Step by Step Through Downloading and Setting Up PC-Pine (most of this is relevant to Unix and Mac Pine too)

The procedure I describe in this section is one of many ways to set up PC-Pine. I discuss why I like this configuration and give a link to information about alternate configurations in Configuration Overview above. These instructions were originally written for someone using Windows 95 or 98. If you are using another operating system, it should be fairly straightforward to adapt these instructions to your system.

 

 

0. Backing Up Files and Clearing Pine Registry Settings

If you have used Pine before on this computer, make a backup of all Pine-related files, especially your pinerc file(s), address book(s), and PASSFILE.

If PC-Pine is currently installed on this computer, clear the Pine-related registry settings before you run a new version. To display the Pine-related registry settings, click on the Windows Start button, choose Run, and type:

\full\path\to\pine.exe -registry dump

To clear these settings, run this:

\full\path\to\pine.exe -registry clear

The next time you run PC-Pine, it will reset the registry with the correct settings for the PC-Pine that you are currently using. To find out more, see Support Files, Environment Variables, and Registry Settings: PC-Pine and Pine Comand-Line Arguments, especially the section on the  -registry  command-line argument, at the UW PIC.

 

1. Downloading and Unpacking Pine

Tip     [W] If you are a user of MyUW.net or are a University of Washington student, staff, or faculty, the University of Washington has a step-by-step guide to Configuring PC-Pine for UW Email.

 

  1. Go to washington.edu/pine/getpine/ and follow the link to your platform

  2. Download the appropriate version of Pine to a temporary directory. For example, on my PC I use a directory named C:\MyDownloads\2Install\Pine. Make sure that you do a binary download and not an ascii download.

  3. Check the MD5 checksum to make sure that you have not downloaded a trojan. For example, on Mac OS X, you can check this by running  /usr/bin/openssl md5 /absolute/path/to/pine.tar.gz

    Tip: To ensure that you are using the real (rather than a trojan) openssl and that you are checking the correct pine.tar.gz, specify the absolute path to each of these.

  4. Create a directory where your Pine program files will go. On my Mac, I use (the standard) /usr/local/bin and on my PC, I use C:\Program Files\Pine, but you can put these files anywhere you like. Note that on a Mac, you need to use the sudo command to be able to manage files and directories in the /usr directory.

    • On Mac OS X Tiger, you can either follow the instructions for installing the UW pre-built pine-bin.osx-10.4.Z on Mac OS X Tiger or, to build Pine yourself, see Using a PASSFILE with Unix and Mac Pine below.

    • On Mac OS X Panther and earlier, you need to follow the instructions for building Pine that are in Using a PASSFILE with Unix and Mac Pine below. The UW does not distribute a pre-built version of pine for these systems.

    • On MS Windows, unzip the files into the Pine program files directory (the directory you just created in step 1D) using an unzip program. I recommend Stuffit Expander because it is free of charge and has an easier to understand user interface than WinZip. Expander can also be used to decode a lot of other encodings, such as MIME base64 and uuencoded files. The unzipped Pine files should include the following.
         dict.app
         dict.d
         dict.i
         dict.s
         install.txt
         ldap32.dll
         mailcap.sam
         mimetype.sam
         pico.exe
         pine.exe
         pine.hlp
         pine.ndx
         pinerc.adv
         spell32.dll
      
      MS-
      Windows
      Tip
          If you do not see all these files or their file extensions in Windows Explorer (or in My Computer), you need to change your Folder Options. To do this, click the Windows Start button, choose Settings > Folder Options, and then choose the tab labeled View. Make sure that the following is not checked
            [ ] Hide file extensions for known file types
            

      and the following, which is in the Hidden Files section, is checked

            [X] Show all files
            

      These settings are needed by the set-up procedure below and are also useful for detecting trojans and viruses, which often take advantage of the fact that the default MS Windows configuration hides a lot from users.

      Here is what the Folder Options window looks like in MS Windows 2000.

      Win2K Folder Options dialog box

       

 

2. Setting Environment Variables

Many programs that originated in the Unix world use environment variables for settings that are used by more than one program. An advantage of using environment variables is that if something changes, such as your timezone or the path to your default text editor, you can make the change once — in the environment variable — and the change will be reflected in all the programs that use the environment variable. Another advantage of using environment variables is that a configuration file, such as the pinerc file, can be transferred to another system without needing to be edited because the variables will be set by the local environment variable settings. This section walks you through setting up the environment variables that Pine (and some other programs) use.


 
Note    

 

  1. Use Windows Explorer to go to C:\ and make a backup copy of your C:\autoexec.bat file. One technique for naming backup files is to start with the number zero and count up, e.g., your first backup of autoexec.bat would be named autoexec.bat.0.

  2. Open your C:\autoexec.bat file in a text editor. One way to do this is to click the Windows Start button, choose Run, and type sysedit in the text box. This will open a number of system files. Make sure the focus is on the autoexec.bat file before you do the edits below.

  3. Copy & paste the following four lines into your autoexec.bat file:

    REM The next 3 environment variables are used by PC-Pine
    SET TZ=EST+05EDT
    SET HOME=C:\MyHome
    SET USER_DICTIONARY=%HOME%\Pine\myDic.txt
    
    Pine uses the TZ (time zone) environment variable to construct the Date header in messages that you send. Set this to the appropriate time zone setting for your location. For example, since I live in London, I set TZ to GMT00BST. For more info, see F. Pollastri's Time Zones, especially the links in the Other Information section at the bottom of his page.

    Set the HOME environment variable to point to the directory that you want to be your “home” directory. %USER_DICTIONARY% is used by the PC-Pine spell checker and you can, of course, name it anything you like. If you do not specify it in your autoexec.bat, it will be named dict.u and stored in the directory that spell32.dll is in (and thus not be backed up when you back up your home directory.)

  4. [optional]  If you want to have the option of using an alternate editor to compose a message in Pine, set the EDITOR environment variable. For example
    SET EDITOR=C:\Progra~1\Vim\Runtime\gvim.exe -f 
    
    or if your editor, gvim.exe in this example, is on your path, you do not need to specify the absolute path and can use the following instead
    SET EDITOR=gvim.exe -f 
    
    The second setting is more easily portable to autoexec.bats on other MS-Windows machines.

  5. [optional] PC-Pine will automatically use pinercEx, if it exists, and pinerc to read runtime configuration settings. (These are named .pinercex and .pinerc in Unix Pine.) If you want PC-Pine to automatically use a third file, include a line like the following in your autoexec.bat
    SET PINECONF=%HOME%\Pine\pinercConf
    
    %PINECONF% is used to store “generic” Pine settings that can be used by any Pine user on the system. It can be named anything you like. I suggest the name pinercConf so that when you sort your Pine user files, it will be sorted next to pinerc and pinercEx.

    Tip    

    To get a quick start customizing Pine, copy and paste my sample pinerc-generic (or a fragment of it) into the file you've specified as %PINECONF%. You can append to or override these settings in your pinerc and pinercex files using  MSC  and  MSXC.

    I discuss pinerc, pinercex, and pineconf and give examples on Compartmentalizing and Sharing Your Pine Configuration.


  6. [optional, useful for command-line junkies  If you like to launch pine or its companions pico, rpload, rpdump, and mailutil from the MS Windows Run prompt or the MS Windows Address Bar, include your pine.exe directory in your PATH environment variable. This way you won't need to type \full\path\to\program when you want to launch program; instead you can just type program followed by any arguments you want to use.

  7. After you are done editing your C:\autoexec.bat file, save your changes and exit the text editor.

  8. In order for your environment variables to be set you need to reboot your machine. Close all applications and windows that are open on your system. Click the Windows Start button, choose Shut Down, select Restart, and click OK.

  9. After your machine reboots, open a DOS box (Start > Programs > MS-DOS prompt) and type  set  at the DOS prompt. Check that all the environment variables that you set above are set correctly. Also, check to be sure that at least one of the environment variables TMPDIR, TEMP, and TMP are set. On some systems, the default is to set both the TEMP and TMP environment variables to %WINDIR%\Temp .

  10. To exit the DOS box type  exit

 

3. Creating Directories for Your Pine User Files

  1. Use Windows Explorer to create the “home” directory that you specified in your autoexec.bat file in step 2C.

  2. Create a subdirectory in %HOME% named Pine. This is where your Pine user files will go. In order for PC-Pine to find your user files, this subdirectory must be named  Pine  and it must reside in your %HOME% directory (for details, see How PC-Pine Finds User Files above).

  3. Create a directory where your Pine local message folders will go. The Pine default is %HOME%\mail, but I use %HOME%\Msgs. See Naming Your Folder Directory above for a discussion of the name of this directory.

 

4. Creating a PASSFILE for Storing Passwords

To avoid typing a password when you use Pine to access a password-protected POP, IMAP, NNTP, or ESMTP server, you need to be using either

  1. a version of Pine that was built with the option to use a PASSFILE, OR
  2. a command-line ssh client on the machine on which Pine is running and a POP, IMAP, NNTP, or ESMTP server that allows you to log in via ssh.

In this section, I discuss option #1. If you are interested in using option #2, which involves setting the ssh-command & the ssh-path in your pinerc, and setting up an SSH private-public key pair, see Scott Leibrand's 1999-Dec-13 message Re: Pine config of news server/login/groups (this message is also available at Archive.org).

All versions of PC-Pine have the ability to store passwords, but non-PC versions of Pine need to be built with this option (details about building Pine with a PASSFILE are below).

In order for Pine to use a PASSFILE, the PASSFILE must exist. In non-PC Pine, the name of the PASSFILE and its location is chosen by the person who built Pine. To create the PASSFILE on a Unix-like system, use commands like this:

touch /path/to/my/secret/passfile
chmod 600 /path/to/my/secret/passfile

For example, if you use the pine from rpm.livna.org, use these commands:

touch ~/.pine.pwd
chmod 600 ~/.pine.pwd

For another example, see how to create a PASSFILE for Pine running on a DreamHost shell account.

In PC-Pine, the default PASSFILE is named pine.pwd and is located in the directory where your PINERC is (%HOME%\Pine in these instructions). To create the pine.pwd file, use Windows Explorer to open the %HOME%\Pine directory and then right click on the blank space in the right panel where files (if there are any) are listed. In the pop-up menu choose New > Text Document. Change the name of the file from New Text Document.txt to pine.pwd.

You can override the name and location of the PASSFILE using Pine's -passfile command-line argument, which is discussed in the next section.

 

Important    
  • [All Versions of Pine]  In order to avoid typing your user name and password, you must create PASSFILE (e.g., pine.pwd) and append /user=YourLoginName to every occurrence of a server specification in your pinerc file(s). This includes the settings for smtp-server, nntp-server, inbox-path, incoming-folders, folder-collections, news-collections, address-book, and incoming-archive-folders.


  • [PC-Pine]  If the default name of the new text document is displayed as New Text Document without the .txt extension, then Windows Explorer is hiding the extension from you. In order to rename the file to pine.pwd (rather than pine.pwd.txt), you need to change your Windows Explorer folder options as described in the Tip in the “Downloading and Unzippping PC-Pine” section above.

 

Using the -passfile and -nowrite_passfile Command-Line Arguments

Starting with version 4.43 for PC-Pine and version 4.55 for Unix and non-PC versions of Pine, you can specify a non-default location for the PASSFILE by launching Pine with the -passfile command-line argument. For example:

pine -passfile /absolute/path/to/your/passfile

If you are on a shared Unix system and you launch Pine with the -passfile argument, I recommend that you create a shell script (maybe called mypine or even better something that will be a mystery to spies) that launches pine with this and possibly other arguments. Do not name your script pine and do not use a Unix alias because these are more vulnerable to spies (for example, if the spy runs the ps, who or w command).

The -nowrite_passfile argument tells Pine to "Read from a passfile if there is one, but never offer to write a password to the passfile." This command-line argument was introduced in Pine 4.60.

Tips    
  • Make sure that you chmod 600 your Unix PASSFILE so that other users on the system cannot read or write to it.

  • The -passfile and -nowrite_passfile command-line arguments work only if Pine was built with PASSFILE support. Compiling Pine with PASSFILE support is discussed in the next section.

  • To find out if your Pine supports a PASSFILE, run pine -h and if the -passfile argument is listed, it does!

 

Using a PASSFILE with Unix and Mac Pine

If you are using a non-PC version of Pine, for example Unix Pine or Mac Pine, and if it was built using the default build files, it probably does not support a PASSFILE. To check, run

pine -h

If the -passfile argument is listed, it supports a PASSFILE. If the -passfile argument is not listed and if it is Pine 4.55 or later, it does not support a PASSFILE. To find out how to build Pine so that it can optionally store passwords, see:

Build
Tips
    To specify the PASSFILE as an argument to the build command, run a shell script like the following from your Pine build directory:
#!/bin/sh
./build clean
./build 'EXTRACFLAGS=-DPASSFILE=\".pine.pwd\"' osx
#                                              ^^^
#                                              platform

Important: To avoid problems with quotation marks and other characters that might be interpreted as metacharacters by your shell, run this as a Bourne shell script (that's what  #!/bin/sh  in the first line of this script means).

To check that your newly built Pine supports a PASSFILE, run pine -h and make sure that the -passfile argument is listed.

Note that PASSFILE, which is .pine.pwd in this example, is relative to the location of the pinerc file.

[New!] The above ./build command does not work to build Alpine. For Alpine, use ./configure --with-passfile=FILENAME instead. For details, see Building and Installing Alpine (Apache-Licensed Pine) in my blog.

Reference: I found this Pine build syntax in this 2005-March-23 message in the YellowDog-extras mailing list.

 

As I discuss in the Privacy and Security section below, I suggest that you name PASSFILE something non-standard and bizarre to make it harder for spies to find. Also make sure that you chmod 600 your Unix PASSFILE so other users on the system cannot read or write to it.

See Also:  Pine's Help on the disable-password-caching feature, which is tangentially related to using a PASSFILE.

 

5. Running Pine the First Time and Setting inbox-path and Other Essential Variables

If all your environment variables are set correctly, you are ready to run Pine for the first time.

Tip    In Pine you can get context-sensitive help by typing either ? or ^G (“Get help”).
  1. To run PC-Pine, use Windows Explorer to find pine.exe and double click it. Alternatively, you can use the Windows Find command to locate and launch pine.exe (Start > Find > Files and Folders).

  2. The first time that your run PC-Pine, it displays the PC-Pine Configuration Setup window, which asks you if you want to  Use configuration file stored on an IMAP server  or  Use local configuration file. For now, I recommend that you use the default local configuration file and check the box labeled  Use this as the default PC-Pine configuration. If you are interested in using a remote configuration, see the Infinite Ink page about Compartmentalizing and Sharing Your Pine Configuration.

  3. Pine will display a message telling you it is creating the directory %HOME%\mail. Click OK.

  4. To exit the “Welcome to Pine” screen, type E. You will get a prompt that says
    No inbox! Folder to open as inbox:
    If your ISP uses IMAP, type
    {your.imap.server/user=LoginName}INBOX
    If your server supports secure IMAP connections, then include /tls (available in 4.40 and later), /ssl, or /secure inside the curly braces. With some servers you need to use the /novalidate-cert (which is unsafe) or the /notls qualifier. For details about these and other qualifiers that can be used in a Pine server specification, see Do Not Send Your Password in Plaintext below and Server Name Syntax at the UW Pine Information Center. If you are using Unix Pine and if you do not want to use rsh or ssh to connect to your IMAP server, you can either explicitly specify the IMAP port number using, for example
    {your.imap.server:143/user=LoginName}INBOX
                      ^^^
                      port
    
    or include /norsh  inside the curly braces. The /norsh qualifier is not relevant to PC-Pine users and is available only in Unix Pine 4.41 or higher.

    If you get a message like this
    [Can't connect to your.server,143: Unknown error (10051)]
    
    it means that port 143, which is the default IMAP port, is not accessible.

    You can use Pine to access a POP INBOX but be forewarned Pine will not know about new messages that arrive while you are accessing the POP INBOX. To set up Pine to access a POP INBOX, type
    {your.pop.server/user=LoginName/pop3}INBOX 
                                   ^^^^^
                                   Note
    
    Near the bottom of this page, there is more information about using Pine to access POP INBOXes.

  5. After you press ENTER, you will get this prompt:
    Preserve folder as "inbox-path" in PINERC?
    To answer yes, type Y.

  6. You will now be prompted for your password:
    HOST: your.imap.server USER: LoginName ENTER PASSWORD: 
    
    Type your password and press RETURN.

  7. If you created a PASSFILE (step 4), you will get this prompt:
    Preserve password on DISK for next login? 
    
    To answer yes, type Y.

  8. Pine will open your INBOX or, if you are not connected to the Net, Pine will tell you that it cannot connect to your INBOX.

 

Setting Your From Address, SMTP Server, & Optionally an NNTP Server

  1. To continue configuring Pine, go to the Pine SETUP CONFIGURATION screen by typing MSC (Main > Setup > Config). The top of the screen looks like this:
         PINE 4.64   SETUP CONFIGURATION
          
       personal-name            = <No Value Set: using "">
       user-id                  = <No Value Set: using "">
       user-domain              = <No Value Set>
       smtp-server              = <No Value Set>
       nntp-server              = <No Value Set>
       inbox-path               = {your.imap.server/tls/user=LoginName}INBOX
    
    To change any of these, move the cursor to the relevant line and type C for Change. Details about the inbox-path, which specifies your Pine primary INBOX, are in Step 5D above.

    In order to send messages without being prompted for your identity, you need to fill in the first three variables. The personal-name, user-id, and user-domain variables are what Pine uses to construct your From header, which will look like this:
    From: personal-name <user-id@user-domain>
    
    If you are using Unix, Mac, or any non-PC Pine, your Pine user-id is your login name and you do not have the option to change it within Pine. You can, however, change your From header either by using a role or by setting some of Pine's  *-hdr  variables. I discuss these and other options in detail in Changing Your From Header in Pine.

    The smtp-server is the server that sends your outgoing email messages. If you are running Pine on a remote Unix system, you probably do not need to edit the smtp-server and instead you should leave it as it is (even if it says <No Value Set>). Pine will then use the default outgoing SMTP server for that system. For example, this is the case at Dreamhost.com. If you are not able to send email from Pine running on a remote Unix system, ask the system administrator of that system how you should configure Pine's smtp-server when Pine is running on their system.

    If your SMTP server requires authentication using SMTP AUTH, you need to specify a user name for your SMTP server, which you do by setting smtp-server to something like this:
    your.smtp.server/user=UserName
    
    Note that if your SMTP server requires a fully qualified user name, it will look something like this:
    your.smtp.server/user=UserName@domain.name
    
    If your SMTP server supports SMTP AUTH over SSL or TLS, append the /ssl or /tls qualifier so that you have something like this:
    your.smtp.server/user=UserName/tls
    
    If you need to use an SMTP server port other than port 25, for example port 26, use something like this:
    your.smtp.server:26
    
    [New!] If your SMTP server uses a Submit server (usually port 587) and if you are using Pine 4.64+, you can use this:
    your.smtp.server/submit
    
    If your SMTP server uses all of the above (alternate port, SMTP AUTH, and TLS), use something like this:
    your.smtp.server:26/tls/user=UserName
    
    [New!] Or this:
    your.smtp.server/submit/user=UserName
                    ^^^^^^^
                    Works in Pine 4.64+ with a Submit server (usually port 587)
                    Submit servers automatically use TLS so you do not need /tls


    If you want to use Pine as an NNTP client, you can either specify your nntp-server(s) on this screen or in the role(s) that you use for public posting. If you need to specify a user name for your nntp server, do it like this:
    your.nntp.server/user=UserNameOnNNTPServer
    
    Note that usually you will not need to specify a user name for the NNTP server of your IAP (Internet access provider).

    The inbox-path should already be filled in with the information that you gave in Step 5D above.

To use the bare-bones Pine, these are the only Pine settings you need.  

 

SMTP &
NNTP
Tips
   
  • If you do not want to use your Internet access provider's outgoing SMTP server and if they hijack outbound port 25 requests, you may be able to route around them by either
  • If you are having trouble authenticating to an SMTP server:
    • Make sure you are using the correct username (the string after the Pine  /user=  qualifier) to log in to the SMTP server. Sometimes the SMTP username is different from the IMAP username, even if both the IMAP server and the SMTP server are provided by the same service provider.
    • Make sure that there are no upper-case letters in the username. Usually this string can contain only lower-case letters (possibly along with numbers, the @ symbol, and other non alphanumeric characters).
    • Make sure that the SMTP server allows you to use the address that is in your From header line. Some outgoing SMTP servers, for example the AOL outgoing SMTP servers, require you to use a From header that contains an email address that is hosted on their system.
    • If you are having trouble with the Gmail SMTP server, see Gmail SMTP and POP Tips below.

  • If you send mail From more than one email address and if some of these require a different (not your Pine default) SMTP server, you can set up a role for each From address and specify the appropriate SMTP server in the role. An example of this is in the Gmail SMTP and POP Tips below. Being able to set an smtp-server (or list of servers) in a role is available in Pine 4.50+.

  • To ensure that your outgoing mail messages are not considered forgeries by SPF-aware tools, I recommend that you use SPF Tester to see if your SMTP MAIL FROM (Return-Path) address and your outgoing SMTP server are an acceptable combination.

  • If you are using Pine 4.56+, I recommend that you do not set your nntp-server on the Pine SETUP CONFIGURATION screen but instead do the following.
    • Use the instructions in Step 7 below to set up the news-collections that you read.
    • Set the nntp-server(s) in the role(s) that you use for posting to newsgroups.
    This way you will be less likely to post your non-public email address in a newsgroup.

 

6. Useful Configuration Settings for Power Users

If you have the time and energy, page through the rest of the Pine SETUP CONFIGURATION screen, read Pine's context-sensitive help by typing ? or ^G, and experiment with your settings.

Tip     If you use some or all of my generic pine settings, many settings in this section will already be set. In PC-Pine, you can set the PINECONF environment variable and then “plug in” system-wide generic Pine settings. I discuss setting this environment variable in step 2E above.

For more ways to plug & play with Pine settings and details about how it works in both PC and Unix Pine, see Compartmentalizing and Sharing Your Pine Configuration.

 

  1. default-fcc 
    In its default configuration, Pine saves a courtesy copy (CC) of each message that you send in a folder on the local system named sentmail (in PC-Pine) or sent-mail (in non PC-Pine). If you would like these Fcc'd messages to be accessible to then set your default-fcc to something like this:
    default-fcc = {imap.server.of.your.webmail.provider}INBOX.Sent Items
                                                        ^^^^^^
                                                        path & delimiter depend on IMAP server
    To find out the imap.server.of.your.webmail.provider and the “Sent” folder on that system, consult your webmail provider's documentation. Details for some providers are in The Table on the IMAP Service Providers page.

    Note:  The behavior of default-fcc depends on the variable fcc-name-rule and on a number of feature-list settings (search for the string fcc on the SETUP CONFIGURATION screen). It also depends on whether the recipient of the message is in your address book with an Fcc setting and whether a role with an Fcc setting was used to construct the message.

    Tip 1:  If you want to always view the Fcc folder name when you are composing a message, include Fcc in your Pine default-composer-hdrs list. This also makes it easy to change the Fcc during message composition. This is one of the settings that I suggest in the Sample Settings section of Compartmentalizing and Sharing Your Pine Configuration.

    Tip 2:  If you want to save both your sent and your received messages in the same folder, set your default-fcc to be the same as your saved-msg folder. Doing this makes it easy to review entire conversations (rather than only one side of a conversation).

    Tip 3:  You can use Fcc to “deliver” a newly composed message directly to an IMAP mailbox to which you have write access. This is an easy way to “send” yourself, or anyone who can read the Fcc'd mailbox, a message without using SMTP. This is one way to use IMAP for blogging (which might more appropriately be called plogging, i.e., IMAP logging as opposed to web logging). If you do this regularly, you might want to set the feature fcc-only-without-confirm.

    Tip 4:  An alternate way to save messages that you send on an IMAP server, and what I prefer, is to use Bcc (blind courtesy copy). I discuss this in my blog in an item titled Server-Side Sent Messages.


    See Also:  The section Using Pine's pruned-folders Variable below, which discusses how to set up Pine so that it will periodically archive the default-fcc folder.
     

  2. My 27 Favorite feature-list Settings
    Below are 27 feature-list settings that I find especially useful. If you set your EDITOR environment variable (step 2D above) and if you want the option to use it to compose a message, make sure that you set enable-alternate-editor-cmd (the first feature that I list below). An easy way to put these settings in your pinerc is to copy & paste them from the feature-list in the generic pinerc on the Compartmentalizing and Sharing Your Pine Configuration page.

    Note: The 2nd, 4th, 5th, 15th, 25th, and 26th features that I list below are not X'd.
PINE 4.64   SETUP CONFIGURATION
    :
   Set    Feature Name
   ---  ----------------------
[ Composer Preferences ]
    :
   [X]  enable-alternate-editor-cmd
    :
[ Reply Preferences ]
    :
   [ ]  reply-always-uses-reply-to (unset this so Pine will give you the option to not use the Reply-To header)
    :
[ Sending Preferences ]
   [X]  disable-sender  (available in 4.51+)
    :
   [ ]  send-without-confirm (unset this so you can use sending-filters, which are useful for greenlisting, & use ^V to control flowed text)
   [ ]  use-sender-not-x-sender (unsetting this may prevent spammers from getting your private - as opposed to public - email address)
   [X]  warn-if-blank-to-and-cc-and-newsgroups  (available in 4.55+)                                            
   [X]  warn-if-blank-subject  (available in 4.55+)
[ Folder Preferences ]
    :
   [X]  separate-folder-and-directory-entries  (useful if you access Cyrus or other servers that support dual-use names; discussed below)
    :
[ Viewer Preferences ]
    :
   [X]  enable-msg-view-urls  (available in 4.00+; discussed below)
   [X]  enable-msg-view-web-hostnames  (available in 4.00+; discussed below)
    :
   [X]  quell-charset-warning  (available in 4.60+)
[ News Preferences ]
    :
   [X]  enable-multiple-newsrcs (useful even if you use only one NNTP server; discussed below; available in 4.56+)
   [X]  hide-nntp-path  (available in 4.60+)
    :
   [X]  news-post-without-validation
    :
   [ ]  quell-extra-post-prompt (because of this problem, I recommend unsetting this; available in 4.30+)
[ Advanced Command Preferences ]
   [X]  enable-aggregate-command-set (aggregate operations are discussed below)
   [X]  enable-arrow-navigation (makes Pine menu navigation easier)
    :
   [X]  enable-bounce-cmd  ("bounce forward" can be used to update a greenlist, train Spambayes, use SMTP to transfer msgs)		
   [X]  enable-exit-via-lessthan-command (makes Pine menu navigation easier)
   [X]  enable-flag-cmd (enables manual setting and clearing of status flags and keywords (labels))
    :
   [X]  enable-flag-screen-keyword-shortcut (available in 4.62+)
    :
   [X]  enable-full-header-cmd (also consider enable-full-header-and-text)
    :
   [X]  enable-unix-pipe-cmd (available in PC-Pine 4.60+; available in non-PC-Pine for 10+ years)
[ Advanced User Preferences ]
    :
   [X]  expose-hidden-config (available in 4.40+)
    :
   [ ]  quell-attachment-extension-warn  (available in 4.60+)
   [ ]  quell-attachment-extra-prompt (unset this so Pine will notify you if you try to launch an attachment; available in 4.50+)

    :
    :
    : (next section is at the bottom of the Config screen & viewable only after setting expose-hidden-config & restarting Pine )
    :
--- [ Normally hidden configuration features ] ---
    :
   [X]  allow-changing-from
    :

[New!] See Also: The section below about Privacy Configuration Settings, which lists some of the above settings, as well as some other useful settings.

 

  1. character-set, the euro sign, and 8-bit negotiation
    Page down through the Pine configuration screen until you get to the character-set variable. Alternatively, search for the string character-set using Pine's Where (^W) command. Set this to the character coding that you use for most of your correspondence. For example, if you usually correspond in a Western European language, such as English, you will might set this to ISO-8859-1 or ISO-8859-15. For example:
    character-set            = ISO-8859-1

    [New!] Starting with Alpine, the Apache-Licensed Pine, you can specify UTF-8, i.e.:

    character-set            = UTF-8

    UTF-8 can represent any character in the Unicode standard and is what I use and recommend. Note: UTF-8 is available only in Alpine and is not available in Pine.


    euro sign
    Note
       

    Unfortunately, there are currently many problems using the euro sign in email and I, along with many others, recommend that you

    Do not use the euro sign in an email or news message.

    Instead, type the string  EUR  rather than the character  . For a discussion of the problems, including why you may not see the euro sign that is the last character before the period in the previous sentence, see Jukka "Yucca" Korpela's the euro sign in HTML and in some other contexts. If you need to send the euro sign in an email message, 1] set your Pine character-set to a coding, such as Windows-1252 or ISO-8859-15, that contains this character, 2] set your Pine font to one that corresponds to the coding you used in #1, and 3] make sure your correspondents are using a system and font that is able to use this character coding.

    Thanks to Jukka for for the graphic of the euro sign and his wonderful material on international character sets!



    For correct results when viewing a character coding, you must choose a corresponding font. For example, the vt100.fon font, which I discuss below in the Setting Fonts section, can be used for ISO-8859-1 but it cannot be used for the Windows-1252, ISO-8859-15, or UTF-8 full character repertoire because vt100.fon does not contain the euro sign and some other non-ASCII characters. When you receive a message that is in a different coding from your Pine character-set setting, Pine displays a warning:

    [ Some characters may be displayed incorrectly. ]
    You can turn off this warning by setting quell-charset-warning, which is one of the feature settings that I recommend above.

    (Thanks to the Usenauts who helped to clarify some “charset” issues, especially Alan Flavell, who edited the previous paragraph in this 2001-Dec-3 Usenet message.)


    For more about the terms charset, character set, repertoire, coding, & encoding, see:
    • Pine's built-in context sensitive Help by typing  ?  or  ^G  when character-set has the focus on the Pine configuration screen