Alpine

From Peyton Hall Documentation

Revision as of 16:25, 8 May 2007 by Huston (Talk | contribs)
Jump to: navigation, search
This article is actively undergoing a major edit for the afternoon -- huston 12:25, 8 May 2007 (EDT).

As a courtesy, please do not edit this page while this message is displayed. The person who added this notice will be listed in its edit history or has placed their signature above.

If this page has not been edited recently (several hours!), please remove this template (or replace it with {{underconstruction}}).

This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to improve this page.

Template:oldfaq Here you will find information about Pine, the supported email client in Peyton Hall.

Contents

Where to get Pine/For more information

Pine is installed on all Peyton Hall UNIX machines. If you have a Unix laptop that is not administered by us, a Windows PC and wish to run Pine on it, or just need more information, head over to the UW Pine Information Center.

Using a different editor

So you would rather use something else than Pico to edit your mail? Here's what to do to change what editor Pine uses by default:

  1. Go to the Configuration Menu (Setup -> Config from the Main Menu).
  2. Turn on the options "enable-alternate-editor-cmd" and "enable-alternate-editor-implicitly" (The first to allow the use of an alternate editor, the second to use it without asking).
  3. At the bottom, select the "editor" config option and type the name of the editor you wish to use. Note that the editor should not return a command line until you're actually done editing the message (ie, 'gvim' should be called with the '-f' option to keep it from fork()ing to the background).

Blind Carbon Copies

To send a Blind Carbon Copy in Pine (meaning someone will get a copy of the message, but the other recipients will not be aware of it), press Ctrl-R (for "Rich Headers"). One of the additional headers now displayed is "BCC". Enter the address in this line as you would "To" or "CC".

Performing actions on attachments

A common issue with Pine (and any other mailer for that matter) is how it reacts to attachments. Attachments are handled based on their MIME-type, and how they're handled is defined in the mailcap file. One copy of this file is usually in /etc/mailcap, while another can reside in your home directory as a dotfile (.mailcap). As an example, we'll show how to set PostScript attachments to be displayed with GhostView as opposed to being printed, which is the default in Pine. These instructions can be adapted easily to any other MIME-type.

Begin by creating the file .mailcap in your home directory, if it doesn't already exist. For a PostScript file, you'll want to add the following line:

application/postscript ; gv %s

The next time you tell Pine to view a PostScript file, it should launch GhostView and display it on the screen. Please note that according to the default /etc/mailcap file, "...PostScript can be an enormous security hole. It is RELATIVELY harmless when sent to the printer..." It is recommended you use this sort of setup with caution; keep in mind that Microsoft Outlook uses similar ideas, and that's how VisualBasic Script viruses are spread.

Viewing Word Documents

Another common attachment issue is MS-Word attachments. Using the same method as above, and assuming that StarOffice is available on your platform, you can use this line:

application/msword ; /usr/peyton/bin/soffice %s \; echo Displayed via StarOffice ; description="Display via StarOffice"

Cut and Paste in Pine

Most Unix people are used to using the mouse to highlight any text on the screen, and paste it with a middle mouse click (or left and right buttons simultaneously for 2 button mouse users). You *can* still do this in Pine, however you must hold down the Shift key first. This is because Pine can handle receiving mouse clicks within an xterm (so you can click on the "buttons" at the bottom, where the key options are listed). Pressing shift first tells Pine you mean to highlight text, not click on it.

You can turn off the behavior of having to hold Shift to copy text (and also turn off the ability to use the mouse to click on objects in Pine) by turning off the config option "enable-mouse-in-xterm".

Address Books

Campus-wide

You can access the campus-wide address book by adding the Princeton LDAP server to your address book lists.

  1. Go to the Main Menu, then (S)etup.
  2. Press (D) for Directory
  3. (A)dd a new directory.
  4. Set the following options:
ldap-server = ldap.princeton.edu
search-base = o=Princeton University,c=US

I like to turn on the first three features there also:

  • use-implicitly-from-composer means that if you type a name in the To, CC or BCC fields that doesn't resolve to a local user it'll look up that name in the addressbook (handy when you can't remember someone's email address, or the spelling of their last name, "Bill" will return all kinds of Bills in the addressbook and you can select which one you want).
  • lookup-addrbook-contents means you can set "Steve Huston" in your local addressbook, aliased to "sysman", and when you type "sysman" in the To field it'll perform an address lookup on "Steve Huston".
  • save-search-criteria-not-result means when you save an LDAP-looked-up entry into your local addressbook, it saves the criteria you used to find that address instead of the result of the lookup. Both of these cover the case when someone's email address might change, by looking it up every time instead of keeping a static entry you're guaranteed to have the right address.

Departmental

To setup the departmental LDAP server for addressbook lookups, follow the same procedure as above with these changes:

ldap-server = ldap.astro.princeton.edu
search-base = ou=People,dc=astro,dc=princeton,dc=edu

Using Both

If you add both directories to Pine, you should probably set the Astro LDAP server as the first in the list (using the $ (shuffle) command). This way, Pine will check your local ~/.addressbook first, followed by the department LDAP directory, and then the Princeton LDAP directory last.

Sending E-mail in the background

If you'd like Pine to appear to run faster, you can turn on the option "enable-background-sending" in the Main -> Setup -> Config screen. This will not actually make things faster, just appear that way - Pine will send the message in the background while you do other things.

While you're hovered over the option, press '?' once or twice to bring up the help for the option, and read the caveats there. There's a few issues which could bite you later by turning this on (mostly with seeing error messages, since Pine isn't sending the mail in real-time where it can show you the error).

When turning on this option, all it does is make available one new keystroke in the send dialog. When you press Ctrl-X to send, and get the "Send message?" prompt, you can then press Ctrl-R to send in the background. If you have "send-without-confirm" turned on, this option does nothing.

Exporting mail

So you're leaving the department, or going somewhere that you require bringing all your mail with you? Not a problem. While you cannot login to the mail server and copy the files off (and if you could, they would do you no good as they're in an indexed database), you can export your folders to text files for transport. Here's how:

Start by opening a folder in Pine. Then press ';' to select messages, and 'a' to select all. Then, press 'a' to apply a command to the selected messages, and 'e' to export the messages. Lastly, type a filename to export the messages to. All the messages in the folder will be exported to the file you named, in 'mbox' text format. While this may be large, it's easily compressable, so once you've done this for all your mail folders you can use 'tar' to compress them all to a rather small size.

Repeat this for your other mail folders, including your inbox, and you'll have all your email in an easily-importable text format that you can take with you wherever you go! A good idea if you're leaving the department is to have your mail forwarded to the new location *before* you do this, and make sure it works. This way no new mail will arrive in your mailbox, so once you've done the above steps you can guarantee that all your mail is at your new location, between what was saved on the server and what has arrived since you started the export.

Another good trick, after you've verified that the mail has been exported, is to (while still in the same window with all messages flagged with an X) press 'a' to apply, and 'd' to delete. This will remove all the messages from the server. Make sure they have been properly exported to the text file, though, as they may not be recoverable after this action!

Another method for doing the same thing is to use the program "Fetchmail" to pull all your mail off the server in one shot. One advantage to this is you can tell it to do multiple folders simultaneously. Please see Using Fetchmail for more information on this.

Personal tools