Some Pine Tips
Pine is an easy-to-learn, yet powerful and feature-rich email reader.
It has many more features than elm, but is just as user-friendly (if
not more), and it beats the old stand-by, the Unix "mail" (or "mailx")
program, hands-down. The only Unix email client that is superior to pine
(in most respects) is "mutt,
which, however, has a far steeper
learning curve and which I'd only recommend for "power users".
For the average Unix user, pine is the best compromise between features
and userfriendliness.
Most pine users are not aware of the many features that pine
provides which can make dealing with the daily flood of emails
easier. Here are a few tips that I have found particularly useful.
Most of these I have found on the web or on usenet postings -
see below for a listing of useful sites. Pine also has an excellent
set of built-in help pages, which can be accessed from the Main Menu,
or by typing ? at at point.
Quick access to pine's message index
With most email programs, typing the name of the program (e.g., "elm")
gets you straight to an index of new messages.
With pine in its default
configuration, you first get to the main menu, from which you have to
select "I" to access the message index. If you want typing "pine" to
lead you straight to the message
index, configure pine to always execute i as initial key stroke.
Here is how to do this:
- From the main menu, select s (Setup).
- Select c (Configure).
- You will see several dozen options you can select, or de-select.
The one that is relevant here is "initial-keystroke-list", near the
bottom of the page. Use the arrow keys until this line is highlighted,
select "c" (Change Value),
and at the prompt type "i" (without the quotes).
- Select e (Exit Setup), and when prompted answer "yes" to
the questions whether you want to go ahead with the change.
With this set-up, pine will behave like most other email clients and
display a list of waiting messages right away. You can still
access the Main Menu by typing "M", and you can enter into "compose"
mode by typing "C". An alternative way to get straight into compose
mode is to start pine with the email address of the recipient as its
argument, e.g., "pine johndoe@math.drofnats.edu".
Mailfolders in pine
By default, pine places all its
mailfolders inside a subdirectory "mail"
(note the lower case) off your home directory, and it expects
mailfolders you specify to be in the same subdirectory.
Other programs may store their mail in different subdirectories,
e.g., "Mail" (with an upper case) or ".folders". If you have used
other email programs in the past, you may still have directories with
those names, and your old mail may be under one of these directories.
The easiest way to make these old folders accessible to pine is to move
them into the "mail" subdirectory.
Pine has two default (sets of) mailfolders, one for storing outgoing
mail, "sent-mail", and one for saving incoming mail, "received*'.
In its default configuration, these folders are further subdivided by
month, so there might be folders named received-may-02,
received-apr-02, etc. To organize your mail and make it easily
accessible, you might want to create additional folder where you save
mail by subject or by name (e.g., "teaching", "math120", "personal",
johndoe", "rms", "gradcommittee"). You can use the same folder for
both incoming and outgoing mail.
Opening a specific folder
Here is a handy shortcut that allows you to bypass the opening screens
of pine and get directly into the index of a specific folder.
Say you have a folder named "teaching". To access the index of the
folder (assuming the folder is inside the "mail" directory), use
pine -I i -f teaching
(Note that if you have configured pine to execute "i" as initial keystroke,
as shown above, then you should not include the "-I i" part since that
part serves the same function. In that case, just use "pine -f teaching".)
If you expect to need this command often, create an alias, say "pinef"
for "pine -I i -f" by adding the line
alias pinef 'pine -I i -f'
to your ".cshrc" file (in your home directory).
Then "pinef teaching" will take you directly to the "teaching" folder.
Reading in files
To "read in" a file while composing a message,
use Control-R which will prompt you for a filename to read in.
If you don't rember the filename, type
Control-T. You'll then see a list of files in
the current directory, from which you can select the appropriate file
(with the Enter key), or navigate down to a subdirectory (indicated by
a trailing slash (/)) or a parent directory (indicated by two dots
(../)).
Similarly, if you want to attach a file, but
don't remember the file name, you can
use Control-T to get a listing of files.
Index coloring
One of the best
features of pine is the ability to color lines in the index
according to certain patterns occurring in the message.
This is especially useful if you receive a high volume of email and
want to make messages that demand immediate attention stand out.
For example, suppose you
are teaching Math 120 and want to "highlight" all emails
containing the string "math 120". You can do this as follows:
1. Enable color. (This step has to be performed only once.)
- At the main menu, choose s (Setup).
- Choose k (kolor).
- In the first menu, change "no-color" to one of the other options,
say "force-ansi-16color".
(You might have to experiment to see which one works best.
I don't think it matters much.)
- In the remaining menus, you can change the default colors interactively
with "C". (At this point, it is not worth spending to much time on
this; you might as well use the default settings.)
- Once you are done with the color selection, type e (Exit),
and answer "yes" when asked if you want to go ahead with the change.
2. Color index to mark messages matching given pattern.
When you are back at the main menu, you can start setting up
index-coloring for "math 120" related messages as follows:
- At the main menu, choose s (Setup)
- Choose r (Rules).
- Choose i (Index-colors)
- Choose a (Add).
- With the first field (Nickname) highlighted, choose a (Add Value),
pick an appropriate "nickname", say "120", and press Enter.
- Use the arrow keys to move down to the "AllText" field, then press
again a (Add Value) and enter the string "math 120"
- Continue scrolling down the page using the arrow keys. For most of the
settings the default choices (the ones already checked) are fine.
When you get to the point where you have to choose foreground and background
colors for the index, choose colors that are different from the
default colors that you selected
in Step 1 above. Good combinations are black as foreground and cyan,
yellow, or green as background.
- Once you are done with these changes, enter e (Exit), and confirm
(with "yes") when being asked if you want to make the changes.
To test this, display the index of an old mail folder that contains
some messages with the matching string. Those messages
should now up in the color scheme you selected in
Step 2.
Instead of matching "alltext", you can also specify specific parts of
the message against which the pattern should be matched. For example,
if you want to highlight all messages from the President of the
University of Illinois,
you could do so by matching the "Subject: " field against the
pattern "presmail". (This works since mass mailings from the President
have "MASSMAIL - Presmail" as subject line.)
Customizing signatures
Another nifty thing you can do using so-called roles is to customize
signatures, or other parts of your message, according to certain
patterns. Suppose, for example, that you want to have all
correspondence regarding "Math 120" signed with a topical signature,
say, "G. Leibnitz, Math 120 TA, Office hours: 11-12 MWF". The mechanism
to do this is almost identical to that of coloring the index.
Starting from the main menu, choose s (Setup), then r (Rules), and then
r (Roles). This gets you to a page that is almost identical to the page
you get upon choosing i (Index color), and you fill it out in the same
way, for example, by specifying "Math 120" as "Alltext" pattern.
Using the arrow keys, move
to the line "Set Signature" further down this page, type "A" and enter
the string that you want to appear as signature whenever
a message involves the pattern "math 120".
There is much more to this. For example, the same page allows you to
specify a template file to be used, and to customize headers.
For more on this, see the links below, or see the section on
"Roles" in the pine help pages (type ? at the Main Menu).
Saving outgoing mail
A very handy feature is the "Fcc:" field in the headers of messages you
compose. "Fcc" stands for "file carbon copy", and allows one to specify
a folder onto which a copy of the outgoing mail is being saved.
Unlike other headers, this header field will not be
transmitted along with the message. By default, outgoing mail gets
saved onto "sent-mail", so you'll probably see the "Fcc:" field filled
in with the string "sent-mail". You can change this by replacing this
string with another one. For example, if you want to save all mail
(incoming and outgoing) regarding "Math 120" in a folder "math120",
then you could specify "math120" as foldername for outgoing mail, and
as the name of the file to which incoming mail is being saved.
This can be automated in various ways. Here is one way to do this, via
the addressbook: Say you want all
mail to Math 120 TA's go into a single folder, say "math120". Then
use the address book to create an alias for this group, say "120ta".
When you get to the screen where you enter the list of email addresses
and the name of the alias, there will be an "Fcc:" field, where you can
enter the name of the folder to which all mail going to
this alias should be saved.
Forwarding versus bouncing mail
There are two types of forwarding available, one called "forward", the
second called "bounce". Suppose you received an email from A which you want to
pass along to B. If you use "bounce", then
the email simply gets "bounced" off your email address, and it will
show up in B's mailbox (almost) as if A had sent it directly to B.
On the other hand, if you use "forward", then in B's mailbox the mail
will be shown as having come from you. Moreover, with forward you
have the option to edit the message and add comments.
"Bounce" is useful for mail that should have gone to B in the first
place.
Links
Last modified Mon 16 Dec 2002 08:32:44 AM CST
A.J. Hildebrand