Migrating email from mail.cs to maildir.cs

Background

  • The current IMAP service running on mail.cs uses the "mbox" format for mail files, which has all the email for a mail folder in a single file and is compatible with older mail clients. Maildir format creates a unix directory for each folder and then each email is a separate unix file. It has been observed that working with the maildir format seems to be much faster for email clients such as Thunderbird.

  • Be sure to read the EmailMaildirFAQ before committing to the change. There are some implications regarding server-side filtering and direct access to email files that you should be aware of

Steps for migrating your IMAP service from mail.cs to maildir.cs

Initial Setup

  1. close all but one of your IMAP clients (Thunderbird, Outlook, Pine, etc.)
  2. add a new account for maildir.cs (Thunderbird users: follow notes here: EmailMaildirSetupThunderbird)
  3. login to the CS core environment (solaris.cs or linux.cs)
  4. In your home directory, update the file .forward to read: youruserid@maildir.cs.uwaterloo.ca
    • this will now make all new mail go to the maildir.cs server and no longer to mail.cs
    • Alternatively, if you use a .procmailrc, you can forward a copy to maildir and still leave a copy on mail.cs. Eventually you should change this.
      • appropriate snippet from .procmailrc (for aeinstein):
...
# send a copy off to maildir.cs
:0 c
! aeinstein@maildir.cs.uwaterloo.ca

# everything else goes to its normal mailbox
:0:
${DEFAULT}

  1. If possible, have someone send you a test email to "youruserid@cs.uwaterloo.ca" to ensure that it shows up in your new Maildir Inbox and not in your mail.cs Inbox (unless you have it going to both)
  2. Any new mail should now be coming into your Maildir account Inbox
  3. In your mail client, configure your account for mail.cs to no longer check the server
    • Thunderbird: Tools -> Account Settings -> Server Settings (mail.cs account)
    • Uncheck: "Check for new messages at startup"
    • Uncheck: "Check for new messages every [xx] minutes"

Migrating your old mail messages from your mail.cs account to your maildir.cs account

Whenever you wish, you can copy your mail folders from one server to the other. The Imap servers take care of putting the emails in the correct format for the new server

Copy your mail.cs Inbox to your Maildir.cs Inbox

    • Warning This process can be quite time-consuming. Copying in-house took about 40 minutes for 5,000 messages
    1. You may wish to sort your email so that the most recent is at the top. That way, email messages are copied such that the "Order Received" has the oldest item being the lowest number.
    2. In Thunderbird, click on your Mail.cs Inbox, press Ctrl-A (PC) or Cmd-A (Mac) to select all messages
    3. Right-click on the selected messages and choose "Copy To" -> then select your Maildir.cs Inbox
    4. It will briefly flash the message numbers as it copies.
    5. When complete, you will have all the messages, with the same Read/Unread status as they were in the original Inbox, on maildir.cs

Copying mail.cs folders to your maildir.cs account using Thunderbird

  1. In Thunderbird, the most efficient method I've found is to left-click and drag the folder from your mail.cs account into the folder (or subfolder) where you want it in your maildir.cs account. This will create the folder in maildir.cs and silently copy the messages in the background to the selected maildir.cs
  2. You can get several mail folders copying at once, it seems to handle copying them all in the background. All of this is done working in the Folders pane, on the left. If you check the new folder periodically, you will see the number of messages increasing (if it's a large mailbox)
  3. Note that the status of read/unread is preserved through the copy
Topic revision: r6 - 2009-03-27 - RonaldoGarcia
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.


Edit

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2014 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback