Yale University

ITS Section Heading

Yale ITS Home Student Technology Collaborative

Gateways for:

Help Desk
203.432.9000

ITS Office
Yale University
25 Science Park
P.O. Box 208276
New Haven, CT
06520-8276
USA

Yale logo.

Using Pine Email Client

If you want more information about Pine, check out the University of Washington's Pine Information Center.

Getting Started with Pine

Pine is a simple text-based to use tool used to read and send email. To start it, simply type pine at a Pantheon prompt. After a moment, you will be presented with Pine's opening screen.

If this is your first time using Pine, you will see a message asking

Move current 'sent-mail' to 'sent-mail-xxx-199x'? (y/n) [n]

Ignore this message by just pressing the Enter key.
You will be presented with the main menu. Also, the bottom two lines of the screen will always have a short menu of some of the actions you can take. To take any action, press the highlighted letter to the left of the action name.

Some highlighted letters have a ^ in front of them. The ^ is called a caret, and it means to hold down the Control (CTRL) key while you press the letter next to it. For example, ^C means hold Control, press C, then let go of Control. This set of keystrokes is also often abbreviated CTRL-C.

To send mail, select C from the main menu. To read your mail, press I from the main menu. To quit, press Q at the main menu.

For more information on Pine, please consult Pine's excellent built-in help (usually either ? or ^G). If you still have questions, send mail to consult@pantheon.yale.edu.

Saving messages in Pine

To save a message, simply press S while viewing it. You can then specify the name of the folder, or create a new folder. To delete a message, press D while viewing it. (Messages you save are automatically deleted from your INBOX by default.) When you quit Pine, answer "yes" to the question "Expunge deleted messages?".

    Note that there are two places you can save your messages:
  • on your Post Office machine (via IMAP)
  • in your home directory

Note that only IMAP folders are available using Yale WebMail and that saving messages to IMAP folders is more efficient. Only save mail to your home directory if you have a good reason to do so.

Downloading email in Pine

When downloading mail, it is important to understand the concept of Pine mail folders. Pine folders are not actually folders; they are really just long text files that Pine interprets as folders.

Thus when you want to download, for example, your saved-messages folder, you really want to download a file in your mail directory called saved-messages. Note that you can only download messages saved to your Pantheon home directory. You cannot download files directly from your mail (IMAP) server.

Printing from Pine

If you are using a Yale-recommended telnet program, in Pine you can print messages to the printer attached to the Windows or Macintosh computer you are using. This is done through "attached-to-ansi" printing.

This kind of printing works by sending a standard ANSI escape sequence that causes output to be redirected from the screen to the printer. A corresponding escape is used when the printing is complete to reset the output to the screen. If you've invoked this accidentally and the printout spilled out all over your screen you can type ^L to refresh your screen. The reason this varies from one terminal emulator to another is because this feature is not always implemented properly by the communications program.

Inserting a Document into an E-mail Message

    There are several ways to include a document in a pine message.
  • Cut and Paste: If the file is short (a few pages at most), the easiest way is to open the file in your word processor and--withough quitting the word processor--open a telnet session to the Pantheon. On the Pantheon, start Pine and begin to compose a message. Then switch to your word processor and highlight the text you would like to include in the email message. Copy that text by selecting Copy from the Edit menu. Then switch to your Pantheon telnet window (which should be displaying a Pine compose message screen) and move the cursor to where you would like to insert the text from the word processor. Paste the text by selecting Paste from the Edit menu. The text will be inserted to your message as if you had typed it.
  • File Transfer Protocol: This procedure is more involved, but it may be better for long pieces of text. See the File Transfer for more information. If your document is a text file and you are unsure what kind of mail system the receiving party is using, you may want to simply send the text of a file forgetting about the formatting. Use Word's "Save As" option to save the file as "Text Only". Note that no formatting information will be preserved if you do this, i.e. bold, italic, fonts, margins, etc.
    Once your file is on the Pantheon, run Pine. Compose a message. When you move the cursor into the message area, one of the options will be "^R - Read file". Hit ^R and enter the name of the file you moved to the Pantheon. It should be inserted into your message.
    If you would like to send a complete word processor document, you can attach the file to a message you send using Pine While composing mail, highlight the "Attchmnt" field at the top of the message and press ^T to see a list of your files. Then choose the file you want to attach.
  • Eudora and Other Desktop Mail Clients: Attaching files to mail messages is much simpler using a mail client like Eudora, Outlook, or Netscape Messenger. These programs run on your own Windows or Macintosh computer. Contact your local support provider if you need help using one of these programs.
  • Yale WebMail: While composing a new mail message in Yale WebMail, you have have the option to attach a single file from your local machine by clicking on the Attach button at the bottom of the screen.

If you have trouble with attaching a message using Pine, send mail to consult@pantheon.yale.edu.

Pine Will Not Run (.cshrc and .login files)

If you delete certain important files from you home directory, you may find that Pine and other programs on the Pantheon do not run properly. For example, when you type "pine" you might get back a message that says "Command not found."

Two files in each user's home directory are used for general account configuration:

.cshrc
.login

You must never delete these files, and you should not modify them unless you know exactly what you are doing.

If you have deleted these files, you can restore them from default copies by executing the following two commands at a Pantheon prompt (such as mars%):

cp /usr/local/etc/skel/.login ~/.login cp /usr/local/etc/skel/.cshrc ~/.cshrc

Then logout of your Pantheon session. The next time you login, your session should behave properly and Pine will function.

Suspending Pine

By default, hitting Ctrl-Z does not suspend Pine like it does in other programs.

Unix is a multitasking system that allows users to run more than one program at once and switch between them at will. Pine, like other programs, can be suspended (so that you can use other programs) and then brought back to the foreground.

To configure Pine so that it can be suspended, press S from the main menu for Setup, C for Config, and then scroll down to the option

[ ] enable-suspend

Set it, and you can now to suspend Pine. As with other programs, typing fg from the prompt will resume Pine (that is, bring it to the foreground). You can also use the -z flag from the command line to enable suspension for a single session, but the menu option is generally easier.

IMAP Folders in Pine

To save disk space in your home directory or speed up Pine, you can take advantage of the "IMAP space" that has been allocated for you on your Pantheon Post Office machine. This space can be used to store IMAP-accessible mail folders. (Programs like Pine, Thunderbird, and others can use IMAP to access and store messages.)

There are several ways to move messages, but using Pine to do so is probably the most straightforward. The procedure involves saving your messages from one folder to another. In this case, the second folder happens to reside in your "IMAP space' (a different "folder collection" within Pine), but the procedure is the same as if you were transferring messages from one of your existing folders to another.

First, press L to view your folder collections, then use the arrow keys to move to the folder that you want to transfer and hit return. You should see the index of all messages within that folder. Press ; and then A ("All") -- this will select all messages in that folder.

Then hit A again to apply a command to the selected messages, and hit S ("Save") as the command you want to apply. The Save command, which you usually use to file individual messages, now acts on all the messages in your folder.

You will be prompted for the name of the folder to save these messages to. At the bottom of the screen you will see that CTRL-P and CTRL-N allow you to navigate among folder collections. Press CTRL-N once. This should bring you to your IMAP folder collection, and the prompt should look like:

SAVE 37 msgs to folder in [saved-messages]:

Type the name of the folder in your IMAP collection that you want to save the selected messages to. This can be the same name of the folder where the messages came from. Then press return. Pine may ask you if you want to create the folder; of course, hit Y ("Yes").

Pine will transfer the messages to the IMAP-accessible folder. Depending on the size of your mailbox, this may take a while. Once messages are saved to the IMAP-accessible folder, they will be marked deleted in the old folder. Press X to eXpunge those messages -- this is important; if you don't do this, those messages will still take up space in your home directory. Finally, you may want to get rid of the old (now empty) folder entirely by pressing L, selecting the folder, and pressing D ("Delete").

You can then repeat the procedure for any other folders you want to move. To transfer files from your IMAP collection to your local collection, you can use the same process in reverse: you can save messages from your IMAP folders to local folders and then erase the messages from your IMAP folders.

To make your IMAP folder collection your default one, you can reverse the order of the collections in your Pine configuration. This makes accessing your IMAP folders a little more convenient, but the process is somewhat involved, so you shouldn't attempt it unless you're comfortable using a text editor such as Pico.

By default, mail/[] (your "local" folder collection) is your default folder collection and listed first in the list of collections, followed by {${USER}.mail.yale.edu}${IMAPHOME}/[], which is your remote collection. The easiest way to invert the order is to edit the Pine configuration file, which is stored in .pinerc, with pico or another text editor. Find the folder-collections= line and make sure it looks like this:

folder-collections={${USER}.mail.yale.edu}${IMAPHOME}/[], mail/[]

Make sure you quit Pine and make a backup copy of your .pinerc file before editing it. The next time you start Pine, the remote mail collection will be your default one and you'll be able to use it exactly like you're using your local folder collection now.

Jump to top.

Last modified: Sunday, 24-Oct-2010 19:28:19 EDT. (vm)