CSE logo University of Washington Computer Science & Engineering
 Secure IMAP access to CSE Exchange via PINE
  CSE Home  About Us    Search    Contact Info 

      NOTE:  Many thanks to Teresa Downey and Len Moss at SLAC (Stanford Computing) for the original content of this page (Use Approval Granted)

Pine is a full-featured UNIX email and news client that runs in any character-cell terminal.  The UNIX version of Pine does not have a graphical user interface but it is "screen-oriented", i.e., it uses the full terminal screen rather than just the command line.  Most commands consist of a single keystroke or sometimes a CTRL key combination.  The commands available at any time are displayed on the bottom two lines of the screen; if there are more than will fit, one of the commands will cycle through the other available commands.  There is a Getting Started with email Pine web page for PINE, plus extensive, context-sensitive, built-in help once you have started a Pine session. Pine can handle some types of attachments itself, and can be configured to hand-off others to separate applications (typically a Web browser).

By default, Pine assumes your INBOX is the local UNIX mail spool and that your other mail folders are in your UNIX home directory, normally in a subdirectory named mail;  however, it can also be configured to use IMAP (or POP) to access mail from one or more servers.  As of version 4.21 (as installed at CSE in June 2000), IMAP connections can be configured to use Secure Sockets Layer (SSL) to prevent passwords from appearing on the network in the clear.  This means that it can now be used to connect to CSE's Exchange mail server. This version also includes support for the Light Weight Directory Access Protocol (LDAP) and is configured to access CSE's LDAP server to search for information about CSE personnel.


Configuring Pine for a new UNIX user

Pine is configured by default to read your incoming UNIX mail spool file as its primary INBOX, and to put your saved mail folders in $HOME/mail.  If you are a new CSE user and only need to read your CSE mail when logged into a CSE UNIX host, you should be able to start using Pine immediately with no configuration necessary.  If you sometimes need to read your CSE mail from other systems (e.g., when logged into a CERN computer or from a Web browser) you may wish to obtain an account on CSE's Exchange mail server and then follow the directions below to configure Pine as an Exchange client.

Configuring Pine as a CSE Exchange client

This section assumes you have previously used Pine (or another UNIX mail program like MH) and so you already have some mail saved in mail folders in your UNIX home directory.  We will therefore add your exchange folders as a second folder collection rather than immediately replacing your UNIX folders with Exchange folders.  If you eventually import all your existing mail folders into Exchange (or simply discard them once they've become obsolete), you can delete your UNIX folder collection at that time.  If you've never used UNIX mail before and have no existing folder, you can still follow this procedure and then immediately delete the UNIX folder collection afterwards.
  • Go to Pine's MAIN MENU.  If this is the first time you've used Pine, you may want to spend a few minutes familiarizing yourself with the Pine environment by reading the initial greeting message and some of the built-in help screens.  When you are ready to proceed, you should be able to get to the MAIN MENU from most Pine screens by pressing 'M'.  You should see something like this:


  •  

  • First, we will add a folder collection on the Exchange server.  From the MAIN MENU, press 'S' (Setup) followed by 'L' to get to the SETUP COLLECTION LIST:

  • A new pine user will see two collections, one for mail and one for news.  Press 'A' to add a new collection:

    You can move between the four fields of this screen using the up and down arrow keys, and obtain help for the current field by typing CTRL-G while it is highlighted.  Enter a NickName, perhaps "ExchangeMail",  to identify this folder collection in the list of collections.  Set the Server field to

      exchange.cs.washington.edu/ssl/user=<your-userid>

    substituting your own userid for "<your-userid>".  A few users have Exchange mailbox names that are different from their Windows NT userid.  If you're in this group, you will need to enter something like "CSE\<your-userid>\<your-mailbox-name>" following the "user=".

       
    You can leave the Path and View fields empty.  Press CTRL-X to exit and save your changes.  Before exiting, Pine will attempt to login to the Exchange server and prompt you for your password:

    (Although the login prompt message displays the host name of the Exchange server as exchsrv1, you should always use the name "exchange" when configuring your email client.)  Enter you password (which should not be displayed).  If the login is successful, you will then be prompted, 'Exit and save changes?'   Press 'Y' and you will be returned to the SETUP COLLECTION LIST.

    With the new collection selected, you can use the '$' (Shuffle) command to move it to the top of the list.  Press '$' followed by 'U' to move your new ExchangeMail folder collection above the News collection; then repeat to move it above your Mail collection.

    To avoid confusion, you might want to change the NickName for your local folder collection, e.g., to 'UnixMail'.  Select the 'Mail' collection and press 'C' (Change), then modify the NickName field.   Type CTRL-X to exit and save:

    Respond 'Y' and you will return to the SETUP COLLECTION LIST screen.


     

  • Next, you must change your default INBOX to the Exchange server.  Press 'E' to exit the SETUP COLLECTION LIST screen and return to the MAIN MENU, then press 'S' (Setup) followed by 'C' to get to the SETUP CONFIGURATION screen:

  • Use the arrow keys to select the inbox-path field and press 'C' (Change) to edit it.  Type in,

       {exchange.CSE.washington.edu/ssl/user=<your-userid>}INBOX

    again changing "<your-userid>" to your own userid (or to "CSE\<your-userid>\<your-mailbox-name>").  Note that the braces ("{}") are required.

    Check also that the user-domain field is set properly so that the Mailrouter database is checked to resolve the email address:

        user-domain=CSE.washington.edu
     

  • Press 'E' to exit the SETUP CONFIGURATION screen and answer 'Y' (Yes) to the 'Commit changes?' prompt:

  • You will then be returned to the MAIN MENU.
     

  • For the INBOX change to take effect, you must quit and then restart Pine.  Press 'Q' to quit and respond to the 'Y' to the 'Really quit Pine?' prompt.  When you restart Pine, you will be immediately prompted for your password to login to the Exchange server:

  • Once you are logged in, you can press 'L' to view your COLLECTION LIST which should now look something like this:

    Press '>' ([View Cltn]) to view the current collection, which should look something like this:


     

Tips for Exchange users

Here are some additional suggestions for using Pine as an Exchange client.

    WARNING: Bug saving copies of outgoing mail 

    There is a bug in Pine which prevents you from saving a copy of a long message from a UNIX mail folder or a newly created outgoing message to a mail folder on the Exchange server. "Newly created outgoing messages" include both FCCs (i.e., "File Carbon Copies", Pine terminology for copies of messages saved to a folder after the message has been sent) and postponed messages (those saved temporarily before being sent). It does not prevent you from saving long messages from your Exchange INBOX to other folders, nor does it affect any message shorter than about 16 Kbytes including attachments (this threshold is approximate since the exact number is difficult to pin down). In the case of an FCC, the mail itself will be correctly sent, but the copy will not be saved. In Pine 4.21, your Pine session will also hang and you'll have to login in another window to kill it; in Pine 4.31, the attempt to save the copy will timeout after 15 seconds. The problem has been seen at other sites and has been reported, but there is not yet any word on a fix.

    Most users are unlikely to run into this bug unless they use Pine to send large attachments or cut and paste large blocks of text into the body of their messages. A work-around when sending attachments is to set the configuration option, fcc-without-attachments; with this option set, all attachments are replaced with text explaining what has been sent rather than the attachments themselves.

    To avoid the problem altogether, you should arrange to save copies of your outgoing mail in folders in your UNIX folder collection instead of in your Exchange folder collection. For example, assuming your UNIX folder collection is stored in the default location in your NFS home directory ($HOME/mail), you could set the default-fcc and postponed-folder options in the SETUP CONFIGURATION screen as follows:

    
         default-fcc        = ~/mail/sent-mail
         postponed-folder   = ~/mail/postponed-msgs
      
    Pine may issue a spurious error message, "Mailbox name is invalid", when you try to make these changes. Simply ignore the message. If you have configured Pine to save FCCs in other locations (e.g., as described in the Help for the fcc-name-rule option) you may need to make additional configuration changes. Note that you will not be able to access these folders when using other email clients, such as Outlook or CSE's Web Email reader.

    Folders and directories on the Exchange server

    In Pine terminology, a folder collection consists of mail folders, containing individual mail messages, and mail directories, containing mail folders and other mail directories.  Pine normally distinguishes these two kinds of mail storage nodes by appending a slash, "/", to directory names.  However, some mail servers, including Exchange, allow the user to store mail messages in intermediate, or directory, nodes as well as in the end-point, or folder, nodes.  Pine handles such servers by associating with each directory a folder of the same name.

    There are two configuration options which control how you interact with these folder/directory pairs.  When set, the separate-folder-and-directory-entries option causes the name of each such pair to appear twice in a FOLDER LIST screen, once with a trailing "/" (for the directory) and once without (for the folder).  When this option is not set, Pine appends "[/]" to each name, to indicate that it may be interpreted either as a directory or as a folder, depending on the command used.  For example, to see the directories and folders at the next level of the hierarchy, you would use the ">" (View Dir) command, while to see any messages stored in the associated folder, you would use the "V" (View Folder) command.

    With separate-folder-and-directory-entries set, Pine's behavior is essentially the same for both UNIX and Exchange folder collections, except that virtually all of the entries in the latter will be doubled.  The second option, quell-empty-directories, can help reduce this clutter: enabling this option will suppress the empty directories corresponding to (non-empty) folders.  Unfortunately, there is no corresponding option to suppress empty folders corresponding to non-empty directories, so you will still see a number of folder/directory pairs in the FOLDER LIST screens.

    Most Pine/Exchange users will probably find it more natural to keep the folder and directory entries separate, despite the duplicate entries in the FOLDER LIST screen.  Moreover, there appear to be some glitches in Pine's behavior that can be avoided by enabling this option.  For example, several people have noticed that Pine has trouble creating a sent-mail folder the first time they try to send mail after switching to the Exchange server unless this option is set.

    Enabling the quell-empty-directories option has one somewhat surprising side effect.  In a FOLDER LIST screen, the 'A' (Add) command will still offer the option of adding a directory instead of a folder; however, the directory will be immediately removed, leaving only the folder.  The work-around is to specify both a new directory and a new folder within that directory.  For example, to add a directory named "foo/" to your current FOLDER LIST and also create a folder named "bar" within that directory, press 'A' (Add) and then type "foo/bar" at the "Folder name to add :" prompt.

    Default folders

    Pine makes use of several default mail folders, such as sent-mail , postponed-msgs, etc.  These folders are located by default at the top level of your first folder collection; however, you can also configure Pine to put them somewhere else.  For example, to tell Pine to always store your postponed messages in your UnixMail collection, go to the SETUP CONFIGURATION screen and set your postponed-folder to ~/mail/postponed-msgs.

Usage Approval given by Teresa and Len on March 22, 2001.

Last updated: March 20, 2001


CSE logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to Tony Anderson]