From InfoServe 3.2 April 1996

Using Elm and Pine more effectively

Alan K.-C. Tai
UCS Help Desk

Following are answers to some commonly asked Elm and Pine-related questions.

What's a signature?

A signature is a few lines of text containing just about anything you want. It appears at the end of a letter and typically contains contact information that is not in a mail header. This information can include your office number, phone and fax number, and a postal address. A general rule of thumb for signatures is to restrict them to four or five lines and to ensure that they are no more than 65 characters wide. People may find it annoying to receive a letter with a long signature.

To create a signature, use the Emacs or Pico editor to create a file called .signature, i.e.,
emacs .signatur
e or pico .signature.

Once you have created your signature file, you may need to tell Elm or Pine to automatically include this file whenever you compose a message. In most cases, you don't have to do anything; however, if your signature file is not automatically included in your messages, try the following instructions for Elm and Pine.

Using signatures with Elm:

  1. Type o for options.
  2. Type + twice for the third page of options.
  3. Type l for local signature.
  4. Type .signature in this field.
  5. Type r for remote signature.
  6. Enter .signature in this field.
  7. Type > to save options.
  8. Type i to go back to the main menu.
Note: Elm allows you to use two signatures.

Using signatures with Pine:

Pine looks for a .signature file by default; all you need to do is to create it using Pico or Emacs. If this process doesn't work, try the following:
  1. Type s to enter Pine's setup options.
  2. Type c for Pine's configuration options.
  3. Type n repeatedly to move down to the option signature-file.
  4. Type a to add a value to this field.
  5. Enter ".signature" for the filename.
  6. Hit the spacebar key to move down one screen.
  7. Type n repeatedly to move down to the option signature-at-bottom.
  8. Hit the Enter key so that the box is checked.
  9. Type e to exit Pine's configuration options.
Note: Changes to Pine's configuration are automatically saved.

Using folders

Many users keep all of their e-mail in the Inbox. This is not a good idea for two reasons. The Inbox is meant for unread mail and is stored on the mail server. Since disk space on the mail server is limited, Inboxes over 512,000 characters in length are emptied, and the messages are copied to a folder in the user's Mail directory. The name of this folder will be "sys" followed by a number. The frequency with which this occurs depends on how full the mail server is.

Another reason you shouldn't keep everything in the Inbox is that having a growing mail folder makes looking up messages progressively more difficult. Separate folders can be created to keep related messages together.

Using folders with Elm:

1. Changing Folders
From Elm's main menu, type c to change folders. Then, type ? to get a list of your folders. Each folder is numbered; you can choose a folder by selecting its number.

2. Saving messages
Highlight the message you want by using j and k to select the message. Type s to save it. You will be asked for a folder name. If the folder does not exist, Elm will create it and save the message in the folder. The original message is now marked for deletion in the original folder.

3. Deleting messages
Highlight the message you want to delete, and type d. The message is now marked for deletion but won't actually be deleted until you quit Elm. You can unmark it for deletion by typing u when the message is highlighted.

Using folders with Pine:

1. Changing folders
From Pine's main menu, type l to list folders. Hit the Enter key to see a list of your folders. Type n repeatedly to move to the next folder until the one you want is highlighted. If you go too far, you can back up to the previous folder by typing p.

2. Saving messages
Highlight the message you want by using p and n. Type s to save it. You will be asked for a folder name. If the folder doesn't exist, Pine will ask you if you want to create it. The original message will be marked for deletion.

3. Deleting messages
Highlight the message you want to delete, and type d. The message is marked for deletion but won't actually be deleted until you quit Pine. You can unmark it for deletion by typing u when the message is highlighted.

When using Pine, set up a received folder to which mail in the Inbox that has been read will be moved automatically.

Setting up a received folder in Elm:

  1. Type o for options.
  2. Type + once to get the second page of options.
  3. Type r to set the Received mail folder name.
  4. Enter =received in this field.
  5. Type t to turn on automatic storing of read mail in received.
  6. Type > to save options.
  7. Type i to go back to Elm's main menu.

Setting up a received folder in Pine:

  1. Type s for Pine's setup menu.
  2. Type c to change Pine's configuration options.
  3. Type n repeatedly to move down to the option read-message-folder.
  4. Type a to add a value to this field.
  5. Enter received in this field.
  6. Type n repeatedly to move down to the option auto-move-read-msgs.
  7. Hit the Enter key so that the box is checked.
  8. Type e to exit Pine's configuration options.

Encoding and decoding e-mail

Since e-mail was originally designed to handle only text, binary files such as word processing documents, spreadsheets, and graphics must be encoded before they can be sent through e-mail. There are two methods for encoding binary files: UUencoding (Unix-to-Unix) and MIME-encoding (Multipurpose Internet Mail Extensions). UUencoding is an older method and is falling out of favour.

In this article, I will only discuss how to decode a UUencoded message. The main emphasis will be on encoding and decoding MIME messages. I will assume you know how to transfer files to and from your AIX account from a microcomputer.

Before you send someone an encoded file, ask if they know how to decode it or if they have a program that can read the file. Even if they know how to decode the file, you might want to send them a small test file first to find out if they have limits on the message size they can receive.

If decoding is a problem, and if it's a document, you may have to send your recipient a text-only version by using the import feature of Pico and Emacs. When you're composing a message in Pine, you can use the ^r command to read a file into the Pico editor. If your Elm is set up to use Emacs instead of Pico, you can use the ^xi command to import a text file.

MIME-encoding/decoding with Elm:

1. To MIME-encode a file in Elm
Compose your message as you would normally, and indicate what kind of file you are sending to your receiver. A simple sentence saying which program and what version created the file will suffice.

Save and exit from the editor. Now, instead of typing s or hitting Enter to send the message, type a to attach a file. When prompted, enter the name of the file you want to encode. Afterwards, type s to send.

2. To decode a MIME message in Elm
A MIME-encoded message has a letter M beside it on the message list. When you try to look at the message, you will see that there are multiple parts. Type j to move the cursor to the part of the message that is encoded (usually part two). Then, type w to decode the message to a file. The name of the file will be shown and chosen for you. You might have to download this binary file in order to view it.

MIME-encoding/decoding with Pine:

1. To MIME-encode a file in Pine
Type c to compose your message. Fill in the 'To' and 'Subject' fields; then fill in the 'Attchmnt' field by typing in the name of the file you want to include. In the text portion of your message, state the kind of file you are sending as well as the program and the version used. Now send the message.

2. To decode a MIME message in Pine
Select the message from the message list, and hit Enter to view the message. If the message has been MIME-encoded, you will see a list of its parts in the message header.

Type v to view attachments. You should see a list of attachments. Type the n key repeatedly to move the highlight bar to the non-text part (usually part two or greater). If you go too far, type the p key to move the highlight bar to the previous attachment. Once the correct attachment is selected, type s to save and decode the message to a file. The name of the file will be chosen for you and displayed. Now type e to exit the list of attachments, and then type i to go back to the message list. You might have to download this binary file in order to view it.

Decoding a UUencoded message

A message that includes a uuencoded file is characterized by a section of text that begins with the word 'begin' and ends with the word 'end'. In between is a seemingly random section of printable characters of variable length.

1. Decoding UUencoded e-mail with Elm
Select the message using the j and k keys from the message list. Type the 'pipe' character (|). On keyboards, this character appears as a broken vertical line. It is usually located near the backspace key. After typing the 'pipe' character, you will see a prompt 'pipe message to:'. Type in the command 'uudecode' and hit the Enter key.

2. Decoding UUencoded e-mail with Pine
Pine does not have the 'pipe' command turned on by default. To change this, select s for setup from Pine's main menu; then, select c for configuration. Use the n key repeatedly until the option 'enable-unix-pipe-cmd' option is highlighted. Hit the Enter key so that this option is checked. Now type e to go back to the main menu. The pipe command is now on by default.

Select the message using the p and n keys from the message list. Type the 'pipe' character (|). When you see the prompt 'pipe message to:', type in the command 'uudecode' and hit the Enter key.

In both cases, the name of the binary file will be indicated on the line that begins with 'begin'. The next thing you need to do is to download the file and load it into a program that can read the file.

Printing e-mail

E-mail can be printed locally or remotely. If you have a printer attached to your terminal or computer, you can print e-mail on your printer. This is called local printing. If you don't have immediate access to a printer, you can also send it to a line printer in the basement of Math Sciences. The printout will be distributed to boxes starting with the first letter of your username. This is called remote printing.

Local printing with Elm

By default, Elm sends printouts to the basement of Math Sciences. You can instruct Elm to send printouts to the printer attached to your computer.
  1. Type o for options.
  2. Type p to select the option labelled Print mail using.
  3. Enter |localprint (where `|' is the pipe character).
  4. Type > to make this your default.
To print a message, type p when the message is highlighted in the message list.

Remote printing with Elm

If you made the above change, and you now need to send the printout to the basement of Math Sciences, you can pipe the message to the Unix print command. Select the message, and then type the '|' command. When it prompts you with 'pipe message to:', type in /bin/lpr.

Local printing with Pine

Pine is set up by default to print to a local printer. Select a message from the message list, type y, and the message will be printed.

Remote printing with Pine

You can change the destination of a printout in Pine by changing the printer configuration.
  1. Type s for setup.
  2. Type p from printer.
  3. Type 2 to select standard Unix print command.
  4. Hit the Enter key to accept the changes.
Since Pine automatically saves configuration changes, the destination will remain in effect until you change it again.

Alternatively, you can also use the 'pipe' command to send the output to the line printer. Highlight the message in the list, and then type the '|' command. When it prompts you with 'pipe message to:', type in /bin/lpr. Unlike changing the destination in printer configuration, this does not change the default destination.

Problems with local printing

If you have trouble printing to a local printer, make sure the printer is turned on. If you forget to do this, you may have to reboot your computer.

The local printing features of Elm and Pine depend on the quality of the VT-100 terminal emulation that your terminal program is providing. Some programs may intentionally disable this in favour of their own printing commands. An example of a program that does not work with local printing is Quicklink II. Programs known to work are EWAN telnet and MSKermit.

Need more help?

The UCS Help Desk can be contacted at 220-5555, e-mail: consult@acs.ucalgary.ca World Wide Web: http://www.ucalgary.ca/~consult We are in room 770, Math Sciences, 8 a.m.-5 p.m., Monday to Friday.