Mozilla Mozilla TweaksMozilla Mail · Mozilla/Pine · Mozilla Appearence Mozilla

Integrated IMAP access with Mozilla and Pine

"Software-Patents" in Europe: The threat prevails

Soon the European Parliament and the Council of Ministers will again decide about the legalisation and adoption of so-called "software patents" in Europe, which are already used by large companies in other countries to put competitors out of business. This can lead to the termination of many software projects such as Mozilla, at least within Europe, because the holders of the over 30,000 already granted "software patents" (currently without a legal foundation) can claim exclusive rights and collect license fees for trivial things like "progress bars", "mouseclicks on online order forms", "scrolling within a window" and similar. That way, software developers will have to pay the "software-patentholders" for using these features, even in their own, completely self-developed applications, which can completely stall the development of innovative software for small and medium companies. Apart from this, the expense for patent inquiries and legal assistence is high, for even trying to find out if the self-developed software is possibly violating "software-patents", if you want to continue to market your software. Contrary to real patents, "software-patents" are, in the draft proposed by the commission, monopolization of business ideas and methods, even without any tangible technical implementation.

More about the current major problem at



Constellation: Imagine the following situation: you have an e-mail account on a server that offers you IMAP capabilities. Sometimes, you want to use command-line tools such as Pine for your mail activities, other times you might prefer a GUI client, such as the Mozilla mail client.
Example: You usually check your mail with Mozilla. However, when you have to access your mails "on the road", e.g. in a different country, you access the GNU/Linux box that runs your IMAP server via SSH and fire up Pine. YOu could connect with a simple yet powerful open-source SSH client (Putty) that will need no installation on the mainly existant Windows machines in Internet Cafés. Once connected, you fire up Pine, and usually run intothe following problems:

In the above example, this would cause the following: you sent a message to a buddy with Mozilla a long time ago. Now, after 6 months (she is a really busy friend), she answers, but forgets to include your original message in her reply. Since your memory is not the best (that's why we have hard-disks and PDAs, right?), you would like to check what you wrote to her in your first message (with Mozilla, remember?).
As you are in Yemen right now for vacation, you have no opportunity to run "your" Mozilla, and have to use the Putty/SSH/Internet Café solution. Hence, you cannot access the message that you sent to her in the first place, and lose a big opportunity and might end up asking the same questions again...
Solution: In addition to the Inbox, where your new messages arrive, you can store other folders and messages on the IMAP server, such as your sent messages, drafts or templates. Pine and Mozilla can be configured to use those folders, thereby effectively sharing all information. This document provides the information to configure Pine and Mozilla in such a way.

Back to contents

Changing your CollectionList setting:

These steps will allow you to display the mail folders on both your GNU/Linux account and on the IMAP server.

  1. At the Main Menu, press S for Setup
  2. At the prompt, Choose a setup task from the menu below, press L for collectionList
  3. Press A to Add Cltn
  4. At Nickname, type IMAP
  5. At Server, type in your IMAP server name, e.g.
  6. Press ^X (Ctrl+X) to exit and save
  7. At the prompt, exit and save changes, type Y for yes
  8. Change which collection is listed first, press $ for Shuffle mode. Change the setting so that the IMAP server is listed first. Depending on which collection is highlighted, press Up or Down to change the order.
  9. Press E to Exit Setup

Back to contents

Accessing your mail folders

  1. At the Main Menu, press L for Folder List
  2. The folder named mail refers to folders located within your local account and the folder named IMAP are folders stored on the IMAP server.
  3. Use the arrow keys to highlight the desired folder and press Enter
  4. Press Enter to view the contents of a folder
  5. To return to the FldrList (Folder List) and then to the ClctnList (CollectionList), press "<" twice or press L for Folder List.

Back to contents

Transferring messages from local mail folders to IMAP folders

If you would like folders in the mail collection to appear in the IMAP collection so they can be visible to other e-mail clients, such as Mozilla, do the following.

Create Folders in Your IMAP Account:

  1. Select "L" to see your folder lists. Expand the folder list in mail. Note the names of the folders with messages you also want in the IMAP collection.
  2. Press "<" to return to the folder list.
  3. Highlight IMAP and press Enter
  4. Press "A" to add a folder.
  5. You will be prompted: "Folder name to add:" Type the name of the folder you want to create in your IMAP account and press Enter.
  6. Repeat steps 4 and 5 until your IMAP account contains folders of the same names or similar names as those in mail.

Move Your Messages from Your GNU/Linux Account to Your IMAP Account:

Hint: This is a good opportunity to delete messages you no longer need. We all have a tendency to conserve a lot of e-mails, but be honest to yourself: when was the last time that you needed a message that was older than one year?

Once you have deleted messages you no longer need, you can move the remaining ones to the IMAP server. To move messages individually would be very tedious, especially if you have a large number of saved messages. Therefore, you will want to move messages in groups. Follow the steps below:

  1. Press "L" to reveal your folder list.
  2. Highlight Mail and press Enter.
  3. Use your arrow keys to highlight a folder and Enter to view the list of messages.
  4. Press the semicolon key (;) to enable message selection. (You can see that command in the command list at the bottom of the screen by pressing "O" twice to get to the second set of other commands.)
  5. A list of selection criteria will be presented. Select a criterion according to your needs.
  6. An X will appear at the far left of a message line to indicate that it is selected.
  7. Press "A" to apply a command to all of the selected messages. (You can find that option by pressing "O" twice to get to the second set of other commands.)
  8. Press "S" to save the messages. (Saving will copy each selected message into the destination folder, and mark the selected messages from the original folder for deletion.)
  9. Use the keyboard stroke of <Ctrl>+T to display your folder list.
  10. You may need to press "<" to go to the CollectionList. Highlight IMAP and press Enter
  11. Select the folder in your IMAP collection in which you want to save the selected messages. When the destination folder is highlighted, press Enter. You will be returned to the Message Index window.
  12. A confirmation will prompt you to save these messages into the destination folder. Press Enter to complete the save.
  13. The messages that were selected will now have a "D" beside them to indicate that they are marked for deletion. When you try to access another folder or exit Pine, you will be prompted to expunge the marked messages from the server. Press "Y" to permanently remove these messages from the GNU/Linux server. Don't worry about this deletion, you stored already copies on the IMAP server!
  14. Repeat these steps for every set of messages that you want to move. You may only select messages from one folder at a time. Selected messages must be moved as a group to one destination folder.

Alternative: Move Your Messages from Your GNU/Linux Account to Your IMAP Account using FTP and Mozilla:

If Mozilla is already configured for the IMAP server, there is an easier way to copy the mailfolders to the IMAP server. First, you have to transfer the mails from your GNU/Linux account to your local Mozilla e-mail client using FTP.

  1. Connect to the GNU/Linux system where your mail folders reside, using your username and password.
  2. Transfer the desired files from the mail folder in your home directory (usually /home/yourUserName) to the directory on your harddrive where Mozilla stores its mail (e.g., in Windows that is C:\Windows\Application Data\Mozilla\Profiles\YourProfileName\Mail\Local Folders\).
    Note:Please make sure that none of your mail files that you just transfered have an extension. Example: important.mails is not allowed as a name, important is allowed.
  3. Close Mozilla (if running)
  4. Start Mozilla. When you open the e-mail client now, the folders will appear under Local Mail

Now that all mails are available on the local machine, use the Mozilla e-mail client to drag the folders to the IMAP server. This will upload the local folders to the IMAP server. After this is accomplished, you can savely delete the local copies of the mails.

Deleting Empty Folders from the GNU/Linux Account:

If you moved all of the messages from a folder, you may want to delete the folder since it is now empty.

  1. Press "L" to get to your folder list. Expand the folder list for the GNU/Linux account.
  2. Use your arrow keys to highlight the folder that you want to delete.
  3. Press "D" to delete the folder.
  4. You will be prompted to be sure you want to delete the folder. Press "Y" to permanently delete the folder. Press "N" to cancel the deletion command.

CAUTION:Open a folder before you delete it if you are not absolutely sure it is empty so that you do not accidentally delete messages. You will not be told if the folder contains messages.

Back to contents

Configure Sent, Postponed and Draft Messages to go to the Same Folder as in Mozilla

Pine makes use of several default mail folders, such as sent-mail, postponed-msgs, etc. These folders are located by default at the top level of your first folder collection; however, you can also configure Pine to put them somewhere else. As our first folder collection is acutally the IMAP server, there is not much to change in the settings. In order to enable Pine and Mozilla to save sent and postponed messages to the same folder, do the following.

  1. In Mozilla, destinate through the preferences,  Edit, Preferences, Mail & Newgroups, Copies and Folders, that Sent and Draft messages be saved on the IMAP server. Click on the Choose Folder button and specify the server.
  2. Note the names of the folders and how they are spelled using upper/lower case
    Hint: Mozilla assumes "Sent" as the name for the folder that stores sent messages, whereas Pine prefers "sent-mail". I suggest that you change the default setting for Mozilla, and thereby make use of the autmatic rotation that Pine offers for that folder at the beginning of every month. Don't forget to subscribe to those newly created folders!
  3. In Pine, at the Main Menu, press S for Setup
  4. At the prompt, Choose a setup task from the menu below, press C for Config
  5. Highlight default-fcc
    1. Press C to Change Value
    2. Type sent-mail. Note the spelling of sent-mail. Press Enter.
  6. Highlight default-saved-msg-folder,
    1. Press C to change the value
    2. Type saved-messages and press Enter
  7. Highlight postponed-folder
    1. Press C to change the value
    2. Type Drafts and press Enter. Spell folder name the same as it appears in Mozilla.
  8. Press E to Exit Setup
  9. At the prompt Commit changes ("Yes" replaces settings, "No" abandons changes)? press Y for Yes

Back to contents

Configuring Pine for Mozilla's Trash mechanism

The Mozilla mail client gives you the possibility to move deleted messages to a specified Trash folder, rather than deleting them instantly. That way, it protects you from accidentally deleting important mails, since you always have the possibility to restore the deleted messages from the Trash folder.
Every once in a while of course, you might want to revise the contents of this folder, maybe make a backup, and then delete the messages deemd unnecessary.
In order to have a similar mechanism in Pine that is also interoperable with Mozilla, you will have to create a filter (in Pine, go to the filters menu by pressing the keys M S R F in that order). Modify the screen to resemble the following (UNIX Pine 4.44):

Nickname        = Trash

===================== CURRENT FOLDER CONDITIONS BEGIN HERE =====================

Current Folder Type =
            Set    Choose One
            ---  --------------------
            ( )  Any
            ( )  News
            ( )  Email
            (*)  Specific (Enter Incoming Nicknames or use ^T)
                 Folder List = INBOX

==================== FILTERED MESSAGE CONDITIONS BEGIN HERE ====================

To pattern      = 
From pattern    = 
Sender pattern  = 
Cc pattern      = 
News pattern    = 
Subject pattern = 
Recip pattern   = 
Partic pattern  = 
AllText pattern = 
Score interval  = 

Message is Important? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is New? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

Message is Deleted? =
            Set    Choose One
            ---  --------------------
            ( )  Don't care, always matches
            (*)  Yes
            ( )  No

Message is Answered? =
            Set    Choose One
            ---  --------------------
            (*)  Don't care, always matches
            ( )  Yes
            ( )  No

============================== ACTIONS BEGIN HERE ==============================

Filter Action   =
            Set    Choose One
            ---  --------------------
            ( )  Just Set Message Status
            ( )  Delete
            (*)  Move (Enter folder name(s) in primary collection, or use ^T)
                 Folder List = {PathToYourIMAPTrashFolder}INBOX.Trash

Set Important Status =
            Set    Choose One
            ---  --------------------
            (*)  Don't change it
            ( )  Set this state
            ( )  Clear this state

Set New Status  =
            Set    Choose One
            ---  --------------------
            (*)  Don't change it
            ( )  Set this state
            ( )  Clear this state

Set Deleted Status =
            Set    Choose One
            ---  --------------------
            (*)  Don't change it
            ( )  Set this state
            ( )  Clear this state

Set Answered Status =
            Set    Choose One
            ---  --------------------
            (*)  Don't change it
            ( )  Set this state
            ( )  Clear this state

============================== OPTIONS BEGIN HERE ==============================

Filter features      =
            Set    Feature Name
            ---  ----------------------
            [ ]  move-only-if-not-deleted

Back to contents

Configuring Pine to Point Only to IMAP

Currently, Pine is configured so that you can simultaneously view folders in both your IMAP and GNU/Linux accounts. If you intend to use only IMAP to read mail and you have transferred all of your mail to the IMAP server, then you should re-configure Pine to point only to IMAP.

  1. At the Main Menu, press S for Setup
  2. At the prompt, Choose a setup task from the menu below, press L for collectionList
  3. Use the arrow keys and highlight Mail (your GNU/Linux account)
  4. Press D to Del Cltn
  5. At the prompt, Delete the collection definition for "Mail"? press Y for Yes
  6. Press "E" to exit collection list.

Back to contents

Achim J. Latz, , 01.12.2008

Mozilla Mozilla TweaksMozilla Mail · Mozilla/Pine · Mozilla Appearence Mozilla