# Pine

## Introduction

Pine is a supported email program in Maths. It is text-based i.e. it operates in a terminal window and you browse through your email with the arrow keys and other keyboard shortcuts rather than using the mouse. Graphical attachments and HTML email can readily be viewed in a separate window.

Technically, the program on our Linux machines is alpine not pine. The original Pine was developed by the University of Washington in 1989 and was not Free Software as they did not allow anyone else to distribute modified versions. In 2006, development of Pine was discontinued in favour of Alpine which is free software. In 2008, development of Alpine was discontinued in favour of re-alpine which is installed on the Maths Windows machines.

## Configuration

• By default pine connects to Hermes. How to reconfigure it to connect to local email.
• To get pine to remember your password(s), quit all pine sessions and type touch ~/.alpine.passfile ; chmod 600 ~/.alpine.passfile
• pine takes its configuration from the files /etc/pine.conf and ~/.pinerc.

## Starting pine

To start pine, type pine or alpine at the command line, or go to Applications -> Internet -> Alpine in the XUbuntu menus.

To connect to a remote email server instead of the default Cambridge one you can type

pine -inbox-path={remote.imap-server.hostname/user=loginname/ssl}


## Sending mail

Press C to select COMPOSE MESSAGE in the Main Menu and fill in the lines in the mail header:

      To      :   (must be filled in)
Cc      :   (optional)
Attchmnt:   (not for new users -- see help for details)
Subject :   (type a short, meaningful description)


Carbon copies of the mail are sent to the addresses listed in the Cc: field. To display some extra header fields (including Blind Carbon Copy) press ^R.

Now fill in the message text and type ^X (control X) to send the message. You can modify the header fields at any time by moving the cursor back to the top of the window.

Pine uses a text editor called pico which is like a simplified version of the (very advanced) emacs editor, and uses some control keys (but not all) in a similar way to emacs. Pico has a spelling checker (^T), it can justify (format) paragraphs (^J), and it provides a "cut and paste" facility for moving blocks of text around (see Pine help). (Note: the editor used by pine can be changed to emacs or any other editor using the pine Setup menu.)

Press I to display an Index of mail messages in the current folder. Pine starts up by reading the mail in your INBOX, but you can use the L command to List (and select) other folders containing mail messages which you have saved previously.

To read a message position the menu selector bar using the arrow keys (or N and P) and press V (View), or just press Return. You can Reply to the message with R, or send it on to someone else with F (forward).

When you have processed the message press D to Delete it, or S to Save it in a folder (the message is then deleted). Note that deleted messages are only marked for deletion and do not actually disappear until you quit from pine (you may be asked whether to Expunge them which means deleting them for real). If you change your mind you can press U to Undelete a message and keep it.

## Printing mail

### Under Linux

If you have set up your default printer then you should be able to print from pine on Linux without any further changes. Setting up your default printer generally involves adding a line such as

export PRINTER=my_printer_name


to your .bashrc file.

To customise the appearance of your printouts you can make use of the "Personally selected print command" option.

• From the Main menu, select Setup then Printer and scroll down to "Personally selected print command".
• Press A for Add Printer.
• The printer name can be left blank (just hit Return).
• For the print command, a2ps on its own will print two pages per side of A4, or you can use a2ps -Pprinter_name to specify a printer. See man a2ps for many more options.

### Under Windows

When you print from Windows re-alpine, a print dialog will pop up offering a choice of printers. To customise the layout (e.g. for multiple pages per sheet) click Preferences.

Note: If your preferred printer isn't available, run Add Pavilion Printers and ensure that your pavilion and room number are entered correctly.