|Search Pine Information Center|
Applies to Pine for Unix only
Users of Pine on a remote host may sometimes wish to transfer messages to their desktop computer. The process for this depends on the version of Pine you are using and on how you connect from your PC to the host running Pine.
*Multiple messages can be exported to a single file by selecting them (if enable-aggregate-command-set is checked in Pine's SETUP CONFIGURATION) and applying the Export command to them. The sequence of the messages in the exported file can be changed by sorting (press $ in the FOLDER INDEX view) the messages first.
This is actually not a function of Pine itself, but is often asked by Pine users, thus we cover this question here.
Many users migrate from one Internet account to another as they graduate from college, switch Internet Service Providers, and so on. Others maintain multiple Internet accounts, receive email messages in all or several of them, but want to manage and respond to all their email from one of them. In those situations, you may want to have your email automatically forwarded from one account to another.
Let's says you currently have this email address at your university: email@example.com, but you are graduating and will lose that account in another few weeks. Thus, you sign up with an Internet Service Provider for a personal account, where your email address is: firstname.lastname@example.org. You decide that, rather than logging into both accounts during the time period you have both to check your email, you want to receive all your messages in your new elsewhere.net account, and respond to them from there, especially to inform those who still send email to your here.edu account that they should start sending email only to your new address.
If your here.edu account is on a Unix host, you can accomplish this automatic forwarding by creating a file named .forward --note the dot at the beginning of the filename!--in your home directory in that account. This file should contain the email address to which you want all your email forwarded, in this case: email@example.com --nothing more and nothing less. After creating the .forward file, send yourself a message to your firstname.lastname@example.org address, then check whether it arrived in your email@example.com email INBOX. Note: establishing this .forward file only forwards messages arriving from now on, not those already in your account. For achieving that, see the next Frequently Asked Question below. If you
To copy messages you already have saved in PINE to another account, you can use one of these methods:
They are listed in order of probable preference based on safety and practicality, but each has its advantages, disadvantages, and specific requirements, so you should evaluate carefully which one might work best in your particular situation. It is best to do this while you still have access to both accounts, and the technical support people of the organizations providing them, for a while. Regardless of which method (except for the first one) you choose, you should be able to access both accounts simultaneously to monitor the operation's progress. In particular, do not delete any messages before you have assured yourself that their transfer has completed, and that they are accessible, as expected.
Store messages on personal computer using PC-Pine
Note: for this method to work, the messages in your present account - the one from which you wish to transfer messages to another account - must be stored on an IMAP server. If in doubt, contact your local computing support people. This method has the advantage that you do not already have to have your "other" account established; however, that account should be one that will allow you to use PC-Pine. If you already have the "other" account, also see the method Save directly to folders in other account using IMAP for an alternative; it also works using PC-Pine.
If you have your own personal computer, install PC-Pine on it. After installing, check enable-aggregate-command-set in PC-Pine's SETUP CONFIGURATION screen, and read that feature's context-sensitive help, as you will use it for transferring your messages.
Then, create folder collection definitions for the IMAP server on which your messages are stored, and for your PC's hard disk and/or floppy disk. For the syntax on defining these folder collections, see PC-Pine's context-sensitive help for folder-collections in the SETUP CONFIGURATION screen for versions up to and including 3.96. (In PC-Pine 4, from the [M]AIN MENU, go to [S]ETUP collection[L]ist, then choose [A]dd Cltn.) In the folder collection(s) on your PC, you can create folders for saving messages to first, or you can do that "on the fly" while saving messages to your PC from the IMAP server later - just enter the name of the folder you want on your PC, and then con firm when prompted for its creation. Then, for each folder on the IMAP server, Select the messages to transfer, then Apply-Save them to a folder in (one of) the folder collection(s) on your PC. Don't be suprised - especially if you are using a modem connection from your PC to do this - if saving messages to folders on your PC takes much longer than moving messages among folders using Unix PINE on the same account, since the messages have to be transported from the IMAP server to your PC.
Later, if you wish, you can transfer the messages from your PC to your other account if it supports IMAP server-based storage.
Save directly to folders in other account using IMAP
Note: enable-aggregate-command-set in your SETUP CONFIGURATION screen must be checked for this method to work. Read that feature's context-sensitive help if you are not familiar with it. This method requires that your other account allow you to store messages on an IMAP server (check with that account's provider if in doubt).
Save the messages from each PINE folder in your current account to a folder on your other account's IMAP server, using Select, Apply and Save. For the syntax on defining the folder (collection) for your other account so you can save messages to them with PINE, see PINE's context-sensitive help for folder-collections in the SETUP CONFIGURATION screen for versions up to and including 3.96. (In PINE 4, see the context-sensitive help for the COLLECTION LIST screen.) When accessing the folder in your other account to save to, you may be prompted for that account's username (if you did not specify it in your folder (collection) definition already) and password. Don't be suprised if saving messages to folders in your other account takes longer than moving messages among folders in the same account on which you are currently using PINE, since the messages have to be transported across the Internet to the other account's IMAP server.
Copy mail folders via FTP or rcp or portable storage medium
Transfer the file(s) containing the mail folder(s) to the other account using FTP (File Transfer Protocol) or rcp (remote file copy), or save them to a portable medium such as floppy disks, removable hard disks, or backup tapes; see also 3.3 How do I transfer messages from Pine on a Unix host to my PC?. If you have questions about how to use FTP or rcp after consulting these utilities' documentation (man ftp or man rcp at the Unix prompt), where your mail folder files are located, or how to save mail folder files to a portable storage medium, contact your local computing support people.
However, using the mail folders thus transferred _with an email client_ in your other account will only work if the email client you are using with your other account supports the same mail folder format used with PINE. To use the FTP transfer method, you will also have to be able to FTP "into" your other account (preferrably the area where mail folders are stored), which is often not the case with POP (Post Office Protocol) accounts; check with the account provider if in doubt. To use the rcp transfer method, both accounts need to be on Unix hosts, and you need to have shell access on both.
As an alternative to transferring the mail folder files directly, which will not work if they are stored on a host you cannot directly log into (which is often the case at least for your INBOX), you can Select, Apply (enable-aggregate-command-set in your SETUP CONFIGURATION screen must be checked) and Export messages from folders to files and then transfer those files; however, this will at least temporarily increase your storage capacity requirements - a consideration if your PINE account has a storage quota.
Before using either of the next two methods, be _sure_ that
Send folders as attachments to email messages
Note: For this method to work, your PINE mail folders have to be stored on the same host as the one on which PINE is running; on Unix hosts, this is typically your ~/mail/ directory. Increasingly, message folders are instead stored on a dedicated IMAP server. In that case, this method won't work for you. If in doubt about the location of your mail folders, contact your local computing support people. You also should be comfortable with the process of sending attachments with PINE email messages.
Since each PINE mail folder is stored as a file, you can attach one or more of those files to a PINE email message and send that to your other account. There, you can then save each attachment (file containing a PINE message folder) back to disk. However, using the mail folders thus transferred with an email client in your other account will only work if the email client you are using with your other account supports the same mail folder format used with PINE.
Among those listed here, this method should work most independently of your other account's and email software's attributes. However, use this method judiciously, as forwarding many email messages at once consumes considerable system and network resources. Note: in your PINE SETUP CONFIGURATION screen, enable-aggregate-command-set and enable-bounce-cmd must be checked, and fcc-on-bounce _should not_ be checked, for this method.
When transferring your PINE message folders to another account, you may also wish to transfer your PINE addressbook. You can do this by attaching the addressbook file to an email message, and saving that attachment from the received message in your other account, as described for message folder files in Send folders as attachments to email messages ; or copying it to your other account or PC, as described for message folder files in Copy mail folders via FTP or rcp or portable storage medium. The addressbook for Unix PINE is by default stored in your ~/.addressbook file.
The Pine source distribution includes a shell script to do this in the contrib/utils directory. It is called brk2pine.sh.
From: Klaus Wacker <wacker@Physik.Uni-Dortmund.DE>
I wrote my own perl script, which I claim digests everything elm accepts
and converts it into something pine accepts. Please tell me if you find
otherwise. I intend to use this script regularly to keep system-wide aliases
and addressbooks in synch. The source is available from
Here are two solutions to this, both created by others:
Please note that we have not tested either of these ourselves.
Use this Perl command:
perl -ane '$F[$#F] = "<$F[$#F]>"; print "alias @F\n";' \ $HOME/.addressbook > $HOME/.mutt.aliases
The resulting data (the mail aliases) will be saved in file "$HOME/.mutt.aliases"; to make mutt read them in on startup you must add this line to mutt's setup file:
Q&A from Sven Guckes
|Search Pine Information Center|