Pine: Frequently Asked Questions (FAQ)
Section 1: Answers To Common Questions about Pine
Maintaining Good Email Health
Inadequate Terminal Size
Creating a Signature
Automatic Mail Forwarding
Automatic Response Messages (Vacation Notices)
Changing the "from:" line
Using Pine and Eudora Interchangeably
Transferring Saved Mail to Another Machine
Using Pine and Elm Interchangeably
Reading an "Attached File"
emailing Attached Files
Recovering a Deleted Message
How to Stop email Harassment
Section 2: Help! I Can't Read My email
Unable to Display on Terminal
Can't Find Your Home Directory?
Being Over Quota
Large Mail Spool
Lock Files
Corrupted Mail Folder
When the Problem is System-Wide
This summary will help you answer many of the questions that people ask about using Pine, an electronic mail program on the shared UNIX workstations (e.g., Cardinal, Power, and Wisdom).
Using This Document: Throughout this handout we differentiate normal text from Pine or UNIX commands by enclosing the commands in quotation marks (" "). When reading this document and using these commands, do not include the quotation marks as part of the recommended command. For example, the sentence--To create a mail message, type "m" for mail--indicates that you should press the m key on your keyboard, not the m key plus any quotation marks. Not all words or phrases in quotes are commands. Particular commands or function keys are shown in boldface, e.g., Return.
Section 1: Answers To Common Questions about Pine
Maintaining Good Email Health
Some email problems are caused by the computer system and cannot be avoided
by you as an end-user (see Section 2: Help! I Can't
Read My Mail). There are, however, a few things you can do in Pine
that will save you some grief:
1.) Check your disk quota every week by typing:
lelandquota
at the system prompt. More information can be found in Section 2, Being Over Quota.
2.) Always quit Pine by hitting "q" until you are returned to the UNIX system prompt. You can then type:
exit
to logout of your session. Never quit Pine by hitting CONTROL-c or by simply closing your terminal window. If you happen to hit CONTROL-z to suspend Pine, simply type "fg" at the system prompt to resume the program. If your session simply freezes, see if typing CONTROL-q will unfreeze it.
Inadequate Terminal Size
The menus are the wrong size for the terminal's screen
You may find Pine's menus are either running off your screen (because the screen size is smaller than Pine expects) or the menus are not taking advantage of the space available (because the screen is bigger than Pine expects). Solving this problem can be tricky. First, quit out of Pine. Then type this command at the system prompt:
resize
and restart Pine. If that doesn't work, quit Pine again and try typing:
\resize
or
eval `resize`
at the system prompt. If neither of these works, count how many rows of text your terminal is displaying and then type:
stty rows <NumberofRows>
or
setenv LINES <NumberofRows>
at the system prompt, replacing <NumberofRows> with the actual number of rows your terminal window is using.
Creating a Signature
How do I create a signature for outgoing messages?
Many people like to add a brief message or a few lines of personal information at the end of every email message they send. A quick way to create such a "signature" is to type this command at the system prompt:
pico .signature
You will be given a chance to create a signature. We recommend that your signature be no more than four lines long. When you have created your desired signature, hit CONTROL-o to save your changes. Then hit the return key to save the filename, which will be .signature by default. To finish hit CONTROL-x to exit.
Automatic Mail Forwarding
I want mail sent to my @Stanford account forwarded to another account.
- Point your browser at http://stanfordyou.stanford.edu
- If you get a "SUNet ID and Password Required" page:
- Click on the "Authenticate at weblogin.stanford.edu" button.
- Enter your SUNet ID and current password; click on "Continue"
- Click on the "Continue to the link you requested" link.
- Go to the "your SUNet services settings" page.
- Click the change link in the @stanford.edu email forwarding section.
- Follow the directions on the page.
- Click the save changes button at the bottom of the form.
Automatic Response Messages (Vacation Notices)
I will be away from my email temporarily (or permanently); people who send email to me need to be notified.
- Point your browser at http://stanfordyou.stanford.edu
- If you get a "SUNet ID and Password Required" page:
- Click on the "Authenticate at weblogin.stanford.edu" button.
- Enter your SUNet ID and current password; click on "Continue"
- Click on the "Continue to the link you requested" link.
- Go to the "your SUNet services settings" page.
- Click the change link in the Vacation message section.
- Follow the directions on the page.
- Click the save changes button at the bottom of the form.
Changing the "from:" line
I want to change the username which appears in the .from field of my email account.
Mail sent from your Leland account will normally show this for your originating email address:
From: yourname@stanford.edu
- In order to change how this appears, point your browser at http://stanfordyou.stanford.edu/
- Select the option "View and change your SUNet ID settings".
- Next select the change option in the "SUNet ID" section. Follow
the instructions to select your alternate ID.
- You can set up one alias based on your account name and up to two aliases
based on your real name. For example, you could enter "firstname.lastname" in
one of the fields. When you are ready to activate the alias, select
the Save Changes option.
- You will be shown a page that summarizes the account information for
your Sunet ID. You can test your alias immediately by sending mail
to your new account name.
The next step is to configure your email program to change how the "From:" line appears in your outgoing email messages. Note: These instructions are for Pine users.
- At the main menu hit "s" for settings and then "c" to get to the configuration page.
- Scroll down until you are highlighting the customized-hdrs = line (it
is at the end of the advanced user preferences section) Note that
you cannot enter just anything. It must be your SUNet ID or one of
your SUNet ID aliases.
- Hit "c" and then type in "From:" followed by a space and then the alias. When you are finished, hit RETURN.
- Then type "e" to exit the configuration page, and type "y" when asked to save the changes.
Using Pine and Eudora Interchangeably
Can I use Pine if I normally use Eudora (or vice versa)?
The short answer is "no." The long answer is that it's possible, but complicated. The basic answer is that we don't recommend it. Any new mail you read with Pine is normally transferred automatically from your mail spool on the mail server to the home directory of your UNIX account, and so is not viewable by Eudora. Likewise, new mail read with Eudora will normally be down-loaded from the mail server to the local disk of your Mac or PC, and so will not be viewable by Pine.
If you wish to use both Pine and Eudora, you should be extra careful about staying within your mailspool and Leland disk space quotas. You also have to decide where the primary repository of your saved mail messages will be. If you wish to keep your messages on one Mac or PC, you will need to have Pine run in such a way that a copy of the new mail is still kept on the mail server, allowing Eudora to see it later. In that case, instead of typing "pine," type this command at the system prompt:
fetchmail -n -P
This will copy new mail into your home directory and then run Pine to display it.
If you wish to keep your messages in your UNIX account, you can invoke Pine in the normal way, but you will have to configure Eudora to "Leave Mail on Server" for a certain number of days (seven days or less is recommended).
Transferring Saved Mail to Another Machine
How do I save my Pine mail to my Mac or PC or other UNIX account?
What Pine calls "folders" or "mailboxes" are really just single files that contain the text of many email messages concatenated together. On the Leland Systems, these files are normally saved in the "Mail/" directory within your home directory.
If you wish to transfer these files to another computer that is connected via a network, you will have to run a program that employs "FTP" (file transfer protocol). For more information about FTP, point your web browser at:
http://www.stanford.edu/group/itss-customer/docs/ftp/
Don't forget to transfer the mail folders as plain text or "ASCII."
If you wish to transfer Pine's mail folders to a Mac or PC that is dialing into the Leland Systems over a modem (and NOT using SLIP or PPP software), you will need to use a modem down-loading protocol such as xmodem, ymodem, zmodem, or kermit that is included with most modem communications programs. Note: Samson for Mac, Windows, and DOS does not include any of these protocols.
Using Pine and Elm Interchangeably
Pine and Elm will, by default, save messages to folders in the same directory ("~/Mail/"). They both use the same format, so you can use them interchangeably. If you have aliases in Pine's Addressbook, you can transfer them to Elm's alias file by typing this command at the system prompt:
pine2elm -a
Reading an "Attached File"
How can I read an "attached file" that someone emailed to me?
Applications such as MS Word, Wordperfect, and MS Excel do not normally save files as plain ASCII text. Rather, each application will normally save in its own document format that only IT can read. Such "binary" files cannot normally be emailed: they get corrupted when transferred through the Internet mail system, which was designed to deal only with plain ASCII text.
If someone managed to send you a binary file over email, they most likely had to "encode" the file as text in order to send it through email, and they expect you to "decode" it back to the original binary file.
There are three commonly-used encoding schemes: MIME, uuencode, and binhex. Pine should normally handle a MIME-attached file automatically: while reading the message you will be given the option of saving the attached file to your account. Simply choose that option and the attached file will be decoded and saved into your home directory.
If an email message included a uuencoded file, you will see a line that looks something like this:
begin 644 WordFile.doc
The "644" might be any three-digit number and "WordFile.doc" will instead be the name of the binary file the sender was attaching. This line would then be followed by many lines of cryptic ASCII characters. In this situation you should save the message to a file in your home directory (i.e. save it to the "~/MyMail" folder), exit Pine, and type this at the system prompt:
uudecode MyMail
You should be returned to the system prompt. If you then type "ls" to list out the files in your home directory, you should see the name of the attached file.
If an email message included a binhexed file, the sender hopefully included explanatory text at the beginning of their message indicating it as such. The binhex-encoded binary file will look similar to a uuencoded file, but there will be no tell-tale "begin" line. Save the message to a file in your home directory as explained above, exit Pine, and type this at the system prompt:
mcvert MyMail
Mcvert will tell you the name of the decoded binary file it created.
People will sometimes unnecessarily "attach" a plain ASCII text file to email they send. You can check to see if this is the case after you have decoded the file by typing this at the system prompt:
more NameOfFile
Replace "NameOfFile" with the name of the file created from the decoded message. The "more" program will display a plain text file on your terminal, pausing at each screenful. If it displays strange characters or beeps at you when you invoke it, the file in question is most likely binary and will typically need to be read using the same application that created it. To get it transferred to a Mac or PC, you will need to use either an FTP program if your machine is networked or is using SLIP or PPP, or a modem download protocol (such as zmodem or kermit) if you are dialing in directly with a modem.
For more information about FTP, point your browser at:
http://www.stanford.edu/group/itss-customer/docs/ftp/
Keep in mind that binary files should be transferred in "binary" mode, not ASCII.
Emailing Attached Files
How do I send an attachment?
To email an attachment to someone, you first need to locate the relevant file or upload the file from your PC or Mac to your @stanford account on a UNIX workstation. To upload the file, you'll have to use FTP or a modem protocol. To learn how to do this, see the web page at http://www.stanford.edu/group/itss-customer/docs/ftp/.
Once the file is in your account, run Pine and start composing a message to your intended recipient. Tab down to the "Attchmnt" line and type the name of the document you wish to attach. Pine will automatically expand the line showing the location of the file. It will also change the document into MIME format if necessary. Finish composing your message, then send it. The recipient of your email will not have to manually decode your attachment in order to view it.
Recovering a Deleted Message
Oops. I accidentally deleted a message...
If you simply marked a message for deletion by selecting it in the Headers List and typing d, just move the selector back to that message (by typing the number corresponding to its header on the List), hit Return, and then type u to "undelete" the message. Messages marked for deletion aren't actually deleted until after you quit Pine and even then, Pine will ask you to confirm that you want them deleted.
If you quit Pine and then realize that you've mistakenly deleted a message, things get complicated.
If the message was sent to you on the same day that you read it, and you deleted it on that same day, there is absolutely no way to recover it.
If the message has been in one of your mail folders for at least a day (i.e., you read it for the first time yesterday and deleted it today), you have the ability to recover it if you take action immediately, or at least before midnight of the same day that you deleted it. You should have in your home directory a subdirectory called ".backup/". You should see it in the listing if you type:
ls -a
at the system prompt. If it isn't there, type this command at the system prompt:
fs mkmount ~/.backup user.$USER.backup
where $USER is your username. The ".backup" directory is basically a snapshot of your home directory from the previous day. This snapshot is taken between midnight and 4:00 a.m. every night. If, for example, you wished to recover a message that had been in your INBOX, you would type this command at the system prompt:
cp .backup/Mail/incoming ~/Mail/incoming.backup
Note: What Pine calls the INBOX is in reality a file in UNIX called "incoming." You should now be able to have Pine open up the folder "=incoming.backup" and see the day-old message there. If the folder in the backup directory (the INBOX in our example) is too big for your quota and can't be copied over, have Pine open it directly by typing:
pine -f .backup/Mail/incoming
at the system prompt. You will be given the Headers list of the folder in the backup directory. Be sure to have Pine save any message you want recovered to a folder in your regular home directory: select the message header, hit "s", and type "~/Mail/incoming", replacing "incoming" with some other name if you wish.
This trick will also work for any file that is in your account, but it will not work if you wait until the next day to recover a message or file that you deleted. Your only recourse in that case would be to email a request to file-restore@stanford.edu, specifying the name of the folder (and the exact location as well, if it is a non-mail file) and the date and approximate time that you had made the deletion. File-restore requests can take several days to process, depending on the number of items that must be restored.
If you delete a message that you just read, but you feel certain that it had been sent to your account at least one day before (if not earlier), you can mail file-restore@stanford.edu, requesting that your mail spool from the previous day be recovered. Again, it may take several days to process your request.
How to Stop Email Harassment
I am being harassed over email.
If you are being harassed over email, the first thing you should do is send an email message to the harassing person asking them to cease all communications with you. Keep a copy of this message! If they continue, or if the mail they sent you was from an anonymous address, save the culprit's email message by typing "h" to view with full headers, then "f" to forward the message to the appropriate address. You will be asked if you want to forward the message as an attachment. You can then add a message (if you want to explain the situation). If the harassment is coming from a stanford email address, address your message to security@stanford.edu. If it is coming from a non-Stanford address, use junkmail@stanford.edu.
If you receive a chain-letter or unsolicited commercial email (commercial "spam" as it is known in the Internet community), you can report it to junkmail@stanford.edu, making sure to include the offending message as explained above. Do not reply to these unsolicited commercial mailings. Commercial spam is considered to be an abuse of Internet resources, as is participation in email chain-letters.
Section 2: Help! I Can't Read My email!
Unable to Display on Terminal
You may find that Pine refuses to run and gives you a message like this:
You need a cursor-addressable terminal to run "Pine" and I can't find any kind of termcap entry for "samson" -- check your "TERM" setting.
The error message may have some other name in place of "samson." This happens because people used to access their email through "dumb" or "tty" terminals that could only display text that scrolled from the bottom of the screen to the top. Today's terminals allow a person's screen to be redrawn more interactively. Pine requires a terminal type called vt100 to show you its menus. It is important that both the terminal program you are using on your Mac or PC and the machine you are logged into are set to vt100 terminal type.
1.) Checking your terminal program: To check and change information about your program's terminal type, you'll need to start your terminal program, open a telnet session, and check the program's preferences. To check your terminal type in the latest version of MacSamson, go to the Session Menu, select "Terminal Settings", and look at the "Terminal Mode" field. In any version of Samson-for-Windows prior to version 5.0, go to the Options Menu, select "Session," and look at the "Terminal emulation" field. If necessary, change the field to:
vt100
In the latest version of Samson-for-Windows, the terminal should already be set automatically.
Next check the "answer-back" field. It ensures that your terminal program can tell the Leland machine what terminal type to use as you log in. In MacSamson, the answerback field is located at the bottom of the "Terminal Settings" box (above). In Samson-for-Windows, go to the Options Menu, select "Terminal," and look for the "Answerback" field. In each case, the field should be set to:
vt100\r
Remember, this is "vt100" followed by a backslash (\), not foreslash (/), and the letter "r".
2.) Checking the workstation : To check the terminal type of the machine you're logged into, type the following command at the system prompt (not the Pine prompt):
printenv TERM
If the system responds "vt100", you're ready to go. If you don't get "vt100" back, you can set the terminal type by typing the following command at the system prompt:
setenv TERM vt100
If this doesn't work, or if you need more help getting Pine to display on your screen, contact http://helpsu.stanford.edu/
Can't Find Your Home Directory?
If you received the message "Don't Panic. Can't find your home directory" (or similar) when you logged in, it means that the workstation you are logged into can't see your account's home directory, which contains the files you'll need to run Pine. This problem may also exist even if you don't get this message. You can check this by typing "cd" at the system prompt (outside of Pine) and then typing "pwd". If your username were "anna", for example, and everything was okay, the pwd command would elicit the following response:
/afs/ir.stanford.edu/users/a/n/anna
If the response is "/" then you do not have access to your home directory on the machine you're logged into. Try connecting to a different workstation. For example, if this occurred when you logged into elaine30, try connecting to elaine40 or elaine5, then try connecting to amy or cardinal. If none of these machines can see your home directory, it may be that the file server upon which your account resides is down. Contact HelpSU as soon as possible so they can try to bring the file server back to service quickly.
Being Over Quota
If the host you are using can see your home directory, you should next check to be sure you are not over quota. Type "lelandquota" at the system prompt. User "anna" would get output like this:
diskquota disk used mailspool disk need % home directory --------- --------- --------- --------- ---- ------------------------ 50000 K 22500 K 20000 K 42500 K 85% /afs/ir/users/a/n/anna pagequota page used "diskquota" is the amount maximum you can use. --------- --------- "disk used" is what is in your home directory now. 100 pp 0 pp "mailspool" is how much mail you have. "disk need" is what is needed for Pine or pine to work. Breakdown of quota (Disk in KB, Print in pieces of paper, Quarter is last quarter valid): Quota type Disk Print Quarter Sponsor Dept ---------- ---------- ----- ----------- -------- ---------- default 50000 K 100 ---------- ---------- ----- Total 50000 K 100
The "K" means kilobytes, and 50000 K is about the same as 50 megabytes or 50 million bytes. The number underneath the "%" is how much of your quota is being used, and should never be greater than 90%. Pine will not read in new mail if your quota-usage is at 100% or if the new mail to be downloaded and read will push your quota-usage past 100%.
If You Are At Or Over Quota: you will need to delete or pare down the files in your account. First type the command:
du -ha | more
at the system prompt to get an itemized list of all files in your account and the size of each file in 1 MB blocks.
You can ignore any files in the directory ".backup" because they do not count against your quota. You can delete files by typing:
rm NameOfFile
at the system prompt. If your email folders (the files found in the "Mail/" directory) are taking up most of your account space, you can pare them down individually by first typing "cd" at the system prompt (to get you back to your home directory, if you're not there already), and then:
pine -f Mail/NameOfMailFolder
Pine will open up the specified mail folder without trying to download any new mail. You will then be able to delete individual messages. The now-smaller mail folder will be saved when you quit Pine.
Large Mail Spool
If you are not over quota but the size of your "incoming mail," as shown by the "lelandquota" command, indicates that it is too large for your quota, you will need to get it transferred to a temporary directory where you can read it. Issue the command:
fetchmail -o /tmp/mymail.mbox
at the system prompt. This will download your new mail to the folder called "mymail.mbox" in the "/tmp" directory. Files saved in /tmp do not count against your quota and there is usually a generous amount of disk space available in /tmp. Be aware that:
/tmp is local to each workstation; if you were logged into, say, cardinal2 when you issued the above command, and you got disconnected, you would need to log back into cardinal2 to get to the mail folder in /tmp.
files saved in /tmp are deleted after 24 hours. You should therefore deal with the temporary folder as soon as possible after issuing the above command.
After issuing the fetchmail command, type:
pine -f /tmp/mymail.mbox
to have Pine open this folder. Any messages you wish to keep should be saved in the "=incoming" mailbox (or any other mailbox with "="), to indicate that it should reside in the "Mail/" directory in your account.
Lock Files
As it runs, Pine creates various lock files to prevent you from running more than one email program at the same time, which could possibly corrupt your mail folders. If you exit from Pine in some irregular manner; for example, instead of hitting "q" while in the Headers list, one or more of these lock files will be left behind. Irregular ways of exiting Pine include:
having your computer crash
quitting your terminal session or program (without exiting Pine first)
hitting CONTROL-z or CONTROL-c as a means of ending your Pine session
Hitting CONTROL-z will actually "suspend" Pine. This can be useful if you wish to do some other activity in your UNIX shell. In this situation, you can bring Pine back to the foreground of your session by typing "fg" at the system prompt.
For all other situations, Pine will refuse to run, typically printing an error message to the screen. The first thing to do is type:
cd
at the system prompt, followed by:
ls Mail
This will list out the files in Mail/. If you find a file whose name ends in ".lock", such as "incoming.lock", remove it by issuing the command:
rm Mail/incoming.lock
and then see if Pine will work.
Corrupted Mail Folder
If Pine refuses to start and instead gives you an error message about a corrupted mail folder, type the command:
mailfix =incoming
at the system prompt. If Pine gives a similar error when you attempt to change to a different folder while you are trying to view its messages, quit out of Pine. At the system prompt, type the same command as above, but replace "incoming" with the name of whichever folder is giving you trouble. You can type "mailfix -h" at the system prompt to find out more about this utility.
When the Problem is System-Wide
If you cannot read your email and you have confirmed that it is not caused by a lock file, or being over quota, or a corrupted mail folder, and logging into different workstations does not make the problem go away, there is a good chance that either the fileserver or the mail server for your account is not working. In this case, you should call the Stanford IT Help Desk at 725-HELP. If it is afterhours, leave voicemail. Be sure to include the username of your account and a description of any error messages you receive.
For More Information
A summary of all the Pine commands is available online. Type "?" from within the Pine program and follow the instructions.
If you need more help with the Pine program, contact the Stanford IT Help Desk at 725-HELP or http://helpsu.stanford.edu


