Alpine

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
m (Tagging inuse)
Current revision (17:41, 20 April 2010) (view source)
m (Pointed the mail forwarding question to the new mail forwarding section of the SmartSieve article.)
 
(11 intermediate revisions not shown.)
Line 1: Line 1:
-
{{inuse|the afternoon -- [[User:Huston|huston]] 12:25, 8 May 2007 (EDT)}}
+
Pine is a text-based [[Email|email]] client which is supported in Peyton Hall.  Though there is no GUI, it has features which make it perfectly acceptable for daily use (and many use it exclusively).
-
{{oldfaq|NUM=26}}
+
{{update}}
-
Here you will find information about Pine, the supported email client in Peyton Hall.
+
-
==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 [http://www.washington.edu/pine UW Pine Information Center].
+
== Introduction ==
 +
=== What is Pine? ===
 +
Pine (which either stands for "Pine Is Not Elm" or "Program for Internet News and E-mail" depending on who you ask) is a full-featured text-based email client.  It supports IMAP and POP3 Internet mail protocols, as well as mbox and #mh style local folders.  As configured in Peyton, just running <tt>pine</tt> at a prompt will ask for your user name and password, and connect you to your IMAP mailbox on mail.astro. Pine is configured to run on every Unix/Linux machine in the building.
-
==Using a different editor==
+
If you have a Unix laptop that is not administered by us, or a Windows PC and wish to run Pine on it, you can install Pine there as well.
-
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:
+
-
#Go to the Configuration Menu (Setup -> Config from the Main Menu).
 
-
#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).
 
-
#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==
+
=== Where to get Pine ===
-
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".
+
If you wish to download and install a copy of Pine (for example, on your laptop or home computer), the University of Washington Pine information center is where you need to get it. Their web page is http://www.washington.edu/pine/.
-
==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:
+
== FAQ ==
 +
Pine has its own FAQ at its homepage, http://www.washington.edu/pine/faq/index.html.  What follows are some FAQs pertaining specifically to Peyton Hall.
 +
 
 +
 
 +
=== Can I use a different editor? ===
 +
While 'pico' has a few features, it's sometimes nice to use your own editor instead.  Here's how you set that up:
 +
 
 +
# Go to the Configuration Menu (Setup -> Config from the Main Menu).
 +
# 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).
 +
# At the bottom, select the "editor" config option and type the name of the editor you wish to use.
 +
#: '''NOTE:''' 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).
 +
 
 +
A trick that I use is to tell Pine to run the command '~/bin/pineedit.sh'.  I then created this shell script which contains:
 +
#!/bin/bash
 +
if [ "$DISPLAY" == ":0" ] || [ "$DISPLAY" == ":0.0" ] ; then
 +
    gvim -rv -f -geometry 100x50+0+0 $1
 +
else
 +
    vim -f $1
 +
fi
 +
 
 +
This way, if I'm running Pine on the local computer, 'gvim' will open as the editor; but if I'm running it remotely ($DISPLAY will not be equal to :0) then 'vim' will be the editor instead.
 +
 
 +
 
 +
=== Can I send Blind Carbon Copies? ===
 +
Yes!  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".
 +
 
 +
 
 +
=== How can I perform 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 a <tt>mailcap</tt> file. One copy of this file is usually in /etc/mailcap, while another can reside in your home directory as a dotfile (~/.mailcap).  The mailcap file tells pine that if it sees an attachment of type X, it should execute Y on it. For example:
  application/postscript ; gv %s
  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.  
+
This will tell Pine that if it sees a file of type "application/postscript", and you tell Pine to open the file, it will do so by calling 'gv' with the name of the file (Pine will have saved a copy to /tmp and pass that as the parameter '%s'). For another example:
-
===Viewing Word Documents===
+
application/msword ; /usr/peyton/bin/soffice %s \; echo Displayed via OpenOffice ; description="Display via OpenOffice"
-
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"
+
Add this to your ~/.mailcap file, and when you hilight a MS Word document in Pine and select "open", Pine will save the file to /tmp and run OpenOffice to open it.
-
==Cut and Paste in Pine==
+
You can adapt this method to open any kind of file with any particular program.  Have a look in /etc/mailcap for some examples.  Also, see the Pine FAQ entry regarding [http://www.washington.edu/pine/faq/config.html#9.11 MIME association].
-
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.
+
 
 +
 
 +
=== Selecting and pasting doesn't work ===
 +
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".
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.
 
-
#Go to the Main Menu, then (S)etup.
 
-
#Press (D) for Directory
 
-
#(A)dd a new directory.
 
-
#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:
 
-
*<tt>use-implicitly-from-composer</tt> 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).
 
-
*<tt>lookup-addrbook-contents</tt> 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".
 
-
*<tt>save-search-criteria-not-result</tt> 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
+
=== How do I access the campus/department address book? ===
-
search-base = ou=People,dc=astro,dc=princeton,dc=edu
+
You may have noticed when you type a local email address in Pine and move off the "To" field, it will look up and find the person's full name to fill in the field nicely. But what if you're not sure about someone's email address?  You can have Pine look it up in the campus or department address books.
-
===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.
+
 
 +
==== Campus address book ====
 +
You can access the campus-wide address book by adding the Princeton [[LDAP]] server to your address book lists:
 +
# Go to the (M)ain Menu, then (S)etup.
 +
# Press (D) for Directory
 +
# (A)dd a new directory.
 +
# Set the following options:
 +
#* <tt>ldap-server = ldap.princeton.edu</tt>
 +
#* <tt>search-base = o=Princeton University,c=US</tt>
 +
#: I like to turn on the first three features there also:
 +
#* <tt>use-implicitly-from-composer</tt>
 +
#*: 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 address book (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 address book and you can select which one you want).
 +
#* <tt>lookup-addrbook-contents</tt>
 +
#*: Enables you to add "Steve Huston" in your local address book, aliased to "sysman", and when you type "sysman" in the To field it'll perform an address lookup on "Steve Huston".
 +
#* <tt>save-search-criteria-not-result</tt>
 +
#*: When you save an [[LDAP]]-looked-up entry into your local address book, it saves the criteria you used to find that address instead of the result of the lookup.  Both this and lookup-addrbook-contents 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.
 +
 
 +
 
 +
==== Department address book ====
 +
To setup the department [[LDAP]] server for address book lookups, follow the same procedure as above with these changes:
 +
 
 +
* <tt>ldap-server = ldap.astro.princeton.edu</tt>
 +
* <tt>search-base = ou=People,dc=astro,dc=princeton,dc=edu</tt>
 +
 
 +
 
 +
==== 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.
 +
 
 +
 
 +
=== How do I send email 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.
 +
 
 +
 
 +
=== Configuring additional collections ===
 +
==== Adding another IMAP server ====
 +
You can easily configure Pine to access multiple IMAP servers so that you can read mail from more than one place at a time.  Starting from the main menu screen:
 +
# Go to "'''S'''"etup.
 +
# Collection "'''L'''"ists.
 +
# "'''A'''"dd collection.
 +
## Type a nickname for this collection; perhaps "home" or "personal".
 +
## Enter the name of the IMAP server you wish to add.
 +
## The "Path" is where the folders for this mail server are located - Pine should fill in a sensible value for you.
 +
## You can likely leave "View" blank; press Ctrl-G to see what it does.
 +
# Ctrl-X to save changes
 +
 
 +
Now when you go to the "'''L'''"ist of folders, you'll be asked which collection you wish to view.  You can also change collections while saving messages, so you can save emails across IMAP servers (or transfer them from one to the other).
 +
 
 +
 
 +
==== Adding a local collection (mbox files) ====
 +
Just like adding another IMAP server, but leave the server field blank and fill in the directory where the mbox files live:
 +
# Go to "'''S'''"etup.
 +
# Collection "'''L'''"ists.
 +
# "'''A'''"dd collection.
 +
## Type a nickname for this collection; perhaps "home" or "personal".
 +
## Leave the server field blank.
 +
## The "Path" is where the mbox files live; if they are in ~/old-mbox/ for example, fill that value in for this field.
 +
## You can likely leave "View" blank; press Ctrl-G to see what it does.
 +
# Ctrl-X to save changes
 +
 
 +
 
 +
=== Exporting email ===
 +
If you want to export your mail - for example, if you're leaving the department - there's a few ways to do it.  Since you cannot login to the mail server to get to your messages (and it wouldn't do much good if you could due to how they're stored), you can use Pine to retrieve them for you.
 +
 
 +
'''NOTE:'''
 +
: If you're exporting your email because you're leaving, you may wish to have your mail forwarded first so that no new messages appear while you're trying to clean out your mailbox.  See [[SmartSieve#Forwarding_mail_to_another_account|this article]] for more information.
 +
 
-
==Sending E-mail in the background==
+
==== Exporting mbox files ====
 +
If you want to save your emails into a flat file ('mbox' format, readable by most mail clients), do the following:
 +
# Open a folder in Pine
 +
# Press '<tt>;</tt>' to select messages, and '<tt>a</tt>' to select all.
 +
# Press '<tt>a</tt>' to apply a command to the selected messages, and '<tt>e</tt>' for export.
 +
# Supply a filename to store the messages.
 +
# Repeat for your other mail folders, including the inbox.
-
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.
+
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 [[Fetchmail]] for more information on this.
-
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.
+
==== Transferring email ====
 +
Instead of saving the messages to flat files, if both the source mail server and destination server have IMAP capabilities, you can have Pine transfer the mails for you.
 +
# Configure Pine to access both mail systems ([[#Configuring additional IMAP servers|see above]])
 +
# Open a folder on the source system
 +
# Press '<tt>;</tt>' to select messages, and '<tt>a</tt>' to select all.
 +
# Press '<tt>a</tt>' to apply a command to the selected messages, and '<tt>s</tt>' to save
 +
# Choose the destination folder
-
== 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.
+
=== I ran pine but got alpine instead; why? ===
 +
The [http://www.washington.edu/ University of Washington], who originally developed and maintained [http://www.washington.edu/pine/ pine], has completely rewritten it from the ground up. Due to trademark and licensing changes, they have called the new product [http://www.washington.edu/alpine/ alpine]. While under the hood it's been changed significantly, the UI should function similarly to pine.
-
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!
+
=== How do I see literal dates (May 5) instead of relative dates (Today, Yesterday)? ===
 +
As of the transition from pine to alpine, you may have noticed the date display in the message index has gotten prettier. If you prefer the old-style formatting, do the following:
 +
# From the pine main menu, hit <tt></tt> for setup
 +
# Hit <tt>C</tt> for configuration
 +
# Find the line beginning with "Index Format" (hint: use "W" to search for it!).
 +
# Hit Enter to edit the field, and paste the following into it:
 +
#: <tt>STATUS MSGNO DATE FROMORTO(33%) SIZE SUBJKEY(67%)</tt>
 +
# Hit Enter
 +
# Hit <tt>E</tt> to exit
 +
# Hit <tt>Y</tt> to save the changes.
-
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.
 
[[Category:Email]]
[[Category:Email]]
 +
[[Category:Software]]
 +
[[Category:Unix Commands|pine]]

Current revision

Pine is a text-based email client which is supported in Peyton Hall. Though there is no GUI, it has features which make it perfectly acceptable for daily use (and many use it exclusively).

This article or section needs to be updated.
Parts of this article or section have been identified as no longer being up to date.
Please update the article to reflect recent events, and remove this template when finished.


Contents

Introduction

What is Pine?

Pine (which either stands for "Pine Is Not Elm" or "Program for Internet News and E-mail" depending on who you ask) is a full-featured text-based email client. It supports IMAP and POP3 Internet mail protocols, as well as mbox and #mh style local folders. As configured in Peyton, just running pine at a prompt will ask for your user name and password, and connect you to your IMAP mailbox on mail.astro. Pine is configured to run on every Unix/Linux machine in the building.

If you have a Unix laptop that is not administered by us, or a Windows PC and wish to run Pine on it, you can install Pine there as well.


Where to get Pine

If you wish to download and install a copy of Pine (for example, on your laptop or home computer), the University of Washington Pine information center is where you need to get it. Their web page is http://www.washington.edu/pine/.


FAQ

Pine has its own FAQ at its homepage, http://www.washington.edu/pine/faq/index.html. What follows are some FAQs pertaining specifically to Peyton Hall.


Can I use a different editor?

While 'pico' has a few features, it's sometimes nice to use your own editor instead. Here's how you set that up:

  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: 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).

A trick that I use is to tell Pine to run the command '~/bin/pineedit.sh'. I then created this shell script which contains:

#!/bin/bash
if [ "$DISPLAY" == ":0" ] || [ "$DISPLAY" == ":0.0" ] ; then
   gvim -rv -f -geometry 100x50+0+0 $1
else
   vim -f $1
fi

This way, if I'm running Pine on the local computer, 'gvim' will open as the editor; but if I'm running it remotely ($DISPLAY will not be equal to :0) then 'vim' will be the editor instead.


Can I send Blind Carbon Copies?

Yes! 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".


How can I perform 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 a mailcap file. One copy of this file is usually in /etc/mailcap, while another can reside in your home directory as a dotfile (~/.mailcap). The mailcap file tells pine that if it sees an attachment of type X, it should execute Y on it. For example:

application/postscript ; gv %s

This will tell Pine that if it sees a file of type "application/postscript", and you tell Pine to open the file, it will do so by calling 'gv' with the name of the file (Pine will have saved a copy to /tmp and pass that as the parameter '%s'). For another example:

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

Add this to your ~/.mailcap file, and when you hilight a MS Word document in Pine and select "open", Pine will save the file to /tmp and run OpenOffice to open it.

You can adapt this method to open any kind of file with any particular program. Have a look in /etc/mailcap for some examples. Also, see the Pine FAQ entry regarding MIME association.


Selecting and pasting doesn't work

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".


How do I access the campus/department address book?

You may have noticed when you type a local email address in Pine and move off the "To" field, it will look up and find the person's full name to fill in the field nicely. But what if you're not sure about someone's email address? You can have Pine look it up in the campus or department address books.


Campus address book

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

  1. Go to the (M)ain 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
      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 address book (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 address book and you can select which one you want).
    • lookup-addrbook-contents
      Enables you to add "Steve Huston" in your local address book, 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
      When you save an LDAP-looked-up entry into your local address book, it saves the criteria you used to find that address instead of the result of the lookup. Both this and lookup-addrbook-contents 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.


Department address book

To setup the department LDAP server for address book 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.


How do I send email 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.


Configuring additional collections

Adding another IMAP server

You can easily configure Pine to access multiple IMAP servers so that you can read mail from more than one place at a time. Starting from the main menu screen:

  1. Go to "S"etup.
  2. Collection "L"ists.
  3. "A"dd collection.
    1. Type a nickname for this collection; perhaps "home" or "personal".
    2. Enter the name of the IMAP server you wish to add.
    3. The "Path" is where the folders for this mail server are located - Pine should fill in a sensible value for you.
    4. You can likely leave "View" blank; press Ctrl-G to see what it does.
  4. Ctrl-X to save changes

Now when you go to the "L"ist of folders, you'll be asked which collection you wish to view. You can also change collections while saving messages, so you can save emails across IMAP servers (or transfer them from one to the other).


Adding a local collection (mbox files)

Just like adding another IMAP server, but leave the server field blank and fill in the directory where the mbox files live:

  1. Go to "S"etup.
  2. Collection "L"ists.
  3. "A"dd collection.
    1. Type a nickname for this collection; perhaps "home" or "personal".
    2. Leave the server field blank.
    3. The "Path" is where the mbox files live; if they are in ~/old-mbox/ for example, fill that value in for this field.
    4. You can likely leave "View" blank; press Ctrl-G to see what it does.
  4. Ctrl-X to save changes


Exporting email

If you want to export your mail - for example, if you're leaving the department - there's a few ways to do it. Since you cannot login to the mail server to get to your messages (and it wouldn't do much good if you could due to how they're stored), you can use Pine to retrieve them for you.

NOTE:

If you're exporting your email because you're leaving, you may wish to have your mail forwarded first so that no new messages appear while you're trying to clean out your mailbox. See this article for more information.


Exporting mbox files

If you want to save your emails into a flat file ('mbox' format, readable by most mail clients), do the following:

  1. Open a folder in Pine
  2. Press ';' to select messages, and 'a' to select all.
  3. Press 'a' to apply a command to the selected messages, and 'e' for export.
  4. Supply a filename to store the messages.
  5. Repeat for your other mail folders, including the inbox.

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 Fetchmail for more information on this.


Transferring email

Instead of saving the messages to flat files, if both the source mail server and destination server have IMAP capabilities, you can have Pine transfer the mails for you.

  1. Configure Pine to access both mail systems (see above)
  2. Open a folder on the source system
  3. Press ';' to select messages, and 'a' to select all.
  4. Press 'a' to apply a command to the selected messages, and 's' to save
  5. Choose the destination folder


I ran pine but got alpine instead; why?

The University of Washington, who originally developed and maintained pine, has completely rewritten it from the ground up. Due to trademark and licensing changes, they have called the new product alpine. While under the hood it's been changed significantly, the UI should function similarly to pine.


How do I see literal dates (May 5) instead of relative dates (Today, Yesterday)?

As of the transition from pine to alpine, you may have noticed the date display in the message index has gotten prettier. If you prefer the old-style formatting, do the following:

  1. From the pine main menu, hit for setup
  2. Hit C for configuration
  3. Find the line beginning with "Index Format" (hint: use "W" to search for it!).
  4. Hit Enter to edit the field, and paste the following into it:
    STATUS MSGNO DATE FROMORTO(33%) SIZE SUBJKEY(67%)
  5. Hit Enter
  6. Hit E to exit
  7. Hit Y to save the changes.

Personal tools