7 Replies Latest reply: Mar 22, 2007 4:05 AM by Von River
Von River Level 1 Level 1 (0 points)
I had problems downloading messages from a POP and an IMAP account, so I followed some recommendations in this forum, namely:

• Repair hard disk (it was OK)
• Make a copy of the Mail folder in the desktop (just in case)
• Delete the envelope files
• Restart Mail and accept the prompt to rebuild

Everything seems to go OK but when it reaches message number 175 (out of 4500) it gets stuck, only to increase indefinitely the amount of time left to complete the process.

On top of that, I deleted accidentally the envelope file I had copied on my desktop, so now I can neither proceed nor recover the initial situation, making it impossible to use Mail application at all.

Any help will be welcome

iMac G5, 2GHz, PPC   Mac OS X (10.4.9)  
  • j.v. Level 5 Level 5 (4,155 points)
    You may be screwed with the POP account but with the IMAP account, you should be able to delete that account from Mail.app's preferences and recreate it from scratch, since all the messages are stored on the server. Just make sure you make note of all the applicable setup info - imap and smtp server names and their port numbers, whether use SSL or not, type of authentication used, etc.
  • David Gimeno Gost Level 7 Level 7 (20,775 points)
    1. Quit Mail if it’s running.

    2. In the Finder, go to ~/Library/. Move (not copy) the entire Mail folder out of there, to the Desktop -- rename if you don’t want to overwrite the copy you made before.

    3. In the Finder, go to ~/Library/Preferences/. Locate com.apple.mail.plist and move it to the Desktop.

    4. Open Mail and set it up again from scratch. If given the option to import existing mailboxes or something like that, don’t. Just enter the account information and check that everything works fine.

    5. You’ll have to re-configure all your settings in Mail > Preferences. For spam-related security reasons, the first thing you should do is go to Preferences > Viewing and disable Display remote images in HTML messages if it’s enabled.

    6. If Mail works fine now and you had any messages stored in local mailboxes, do File > Import Mailboxes, choose Mail for Mac OS X as the data format, and follow the instructions to import your mail from the old Mail folder that’s now on the Desktop. Import the Mailboxes folder first, then each of the POP-username@mailserver account folders.

    Mail will probably be unable to import one or more mailboxes, just like it couldn’t re-create Envelope Index before. The problem is almost certainly a malformed message somewhere -- Mail’s import/reindex function isn’t very robust; that’s why it’s important to make a backup copy of the Mail folder first.

    If you can identify which mailbox has the problem and which are the *.emlx files that Mail chokes on, you could try getting rid of the offending *.emlx files and importing again. Alternatively, you may try using something like emlx to mbox Converter or Emailchemy to convert the *.emlx files to standard mbox format, then import that in Mail as Other.

    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. You can easily locate any of the folders referred to in this post by copying the folder path here, doing Go > Go to Folder in the Finder, and pasting the folder path there.
  • Von River Level 1 Level 1 (0 points)
    Thanks, David.

    I managed to overcome the problem of Mail not rebuilding indexes by moving the messages (emlx) from the POP Inbox to a personal folder. There must have been a corrupt one, since doing so Mail is running again.

    However, if I want to recover those messages from the copy I had on my desktop via Mailbox import, I always get the following message: "No Mac OsX Mail valid file has been found" ("No se ha encontrado ningún archivo Mail para Mac OsX válido")

    I tried to select both the .mbox folder and the Messages folder, but I get the same message in both cases.
  • David Gimeno Gost Level 7 Level 7 (20,775 points)
    You’re welcome.

    You’re selecting the wrong folder when importing.

    Pay attention to the instructions that Mail displays when choosing Mail for Mac OS X as the data format. Mail wants you to select the folder that contains the mailboxes to be imported (i.e. the folder where the *.mbox folders to be imported reside), not the *.mbox folders themselves nor the Messages folders within them.

    If you select the wrong folder, Mail says “No valid Mail for Mac OS X files were found” because it cannot find any *.mbox folders within the folder you’re selecting.
  • Von River Level 1 Level 1 (0 points)
    Getting forth step by step. I could select the folder to import, but the process aborted and Mail quitted. I retried importing the subfolders one at a time so I could tell the one with the problem within. For this one I used emlx to mbox Converter and all the messages appear in the Import folder with their right size.

    Nevertheless, when tring to open any of them I get the following message:

    ˝The message from [Sender] concerning “[Subject]” has not been downloaded from the server. You need to take this account online in order to download it.˝

    They were originally downloaded in a POP account but all of them have already been deleted from the server
  • David Gimeno Gost Level 7 Level 7 (20,775 points)
    This is one of the many bogus error messages in Mail that usually have absolutely nothing to do with what the problem really is. Don’t try to make sense of it. What the error message really means in the case of Mail 2.x is that Mail cannot find the *.emlx file associated with the message where the index says it should be.

    It isn’t clear what exactly did you do with the mailbox that Mail couldn’t import by normal means. Could you please clarify this? In particular, did you move the imported mailbox itself out of the Import folder after having imported it? Mail appears to have problems with this:

    Problem Importing & Moving Messages
    Crazy problem moving nested folders

    You may be able to fix the problem in this case by just rebuilding the mailbox, i.e. select it in Mail and do Mailbox > Rebuild.
  • Von River Level 1 Level 1 (0 points)
    Finally I decided to (almost) restart the whole importing procedure and follow one of your initial hints: trying to find the message that caused Mail to choke. I copied Inbox.mbox, then deleted half of the messages within and tried to import. If it worked, I moved the imported messages to the proper folder. Otherwise I repeated the process with the non-imported messages: halving the content of the folder and trying to import each half separatedly.

    I was successful since I was able to recover all but one of my messages (and for this one, I can have it resent).

    Thank you very much for your help. Mercès!