9 Replies Latest reply: Mar 22, 2007 11:01 AM by Trevor Nomi
Trevor Nomi Level 1 Level 1
One of my accounts, an IMAP account if it matters, will resend emails sent in the last week or so when Mail app is launched. This is embarrasing, confusing and annoying to the recipients. What can I do to fix this?


Scrolling through the discussions I found a couple of answers:

This problem is caused by some index corruption that makes messages to randomly appear in a mailbox different from where they’re supposed to be. If that mailbox happens to be the Outbox, Mail thinks they’re waiting to be sent and dutifully proceeds to try to send them.

Verify/repair the startup disk (not just permissions), as described here:

The Repair functions of Disk Utility: what's it all about?

After having fixed all filesystem issues, if any, and making sure that there’s enough space available on the startup disk (a few GB, plus the space needed to make a backup copy of the Mail folder), try this:

1. Quit Mail if it’s running.

2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the Option (Alt) key down. This is where all your mail is stored.

3. Locate Envelope Index and move it to the Trash. If you see an Envelope Index-journal file there, delete it as well.

4. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index -- Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.


I tried all this, but when I attempted to relaunch Mail I received an import failed message. I also tried deleting my com.apple.mail.plist file and that didn't work either. I'm still sending already sent messages when Mail app launches.

HELP!!

MacBookPro1,1, Mac OS X (10.4.8)
Solved by David Gimeno Gost on Mar 14, 2007 7:19 PM Solved
If Disk Utility reports problems it cannot fix, even when starting up from a different disk, you’ll need a more powerful disk utility, such as DiskWarrior, TechTool Pro, or Drive Genius.

The “Disk Utility cannot repair the disk” section of the following article has some additional information you may also find useful:

Resolving Disk, Permission, and Cache Corruption
Reply by David Gimeno Gost on Mar 6, 2007 1:32 PM Helpful
It may certainly matter that the account is IMAP. Try the following variation of the procedure to re-create the index:

1. Quit Mail if it’s running.

2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the Option (Alt) key down. This is where all your mail is stored.

3. Locate Envelope Index and move it to the Trash. If you see an Envelope Index-journal file there, delete it as well.

4. Move the “IMAP-” account folder to the Trash. Note that you can do this with IMAP-type accounts because they store mail on the server and Mail can easily re-create them. DON’T trash any “POP-” account folders, as that would cause all mail stored there to be lost.

5. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index -- Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.

6. As a side effect of having removed the IMAP account folder, that account may be in an “offline” state now. Do Mailbox > Go Online to bring it back online.

Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder, i.e. ~/Library is the Library folder within the user’s home folder.
Reply by David Gimeno Gost on Mar 6, 2007 2:09 PM Helpful
I’m not talking about permissions. Actually, in the post you quoted I specifically said to not repair just permissions. Moreover, I said that the index should be re-created after having fixed all filesystem issues, if any...

The Repair functions of Disk Utility: what's it all about?

All replies

  • David Gimeno Gost Level 7 Level 7
    It may certainly matter that the account is IMAP. Try the following variation of the procedure to re-create the index:

    1. Quit Mail if it’s running.

    2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong, e.g. by dragging it to the Desktop while holding the Option (Alt) key down. This is where all your mail is stored.

    3. Locate Envelope Index and move it to the Trash. If you see an Envelope Index-journal file there, delete it as well.

    4. Move the “IMAP-” account folder to the Trash. Note that you can do this with IMAP-type accounts because they store mail on the server and Mail can easily re-create them. DON’T trash any “POP-” account folders, as that would cause all mail stored there to be lost.

    5. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index -- Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.

    6. As a side effect of having removed the IMAP account folder, that account may be in an “offline” state now. Do Mailbox > Go Online to bring it back online.

    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder, i.e. ~/Library is the Library folder within the user’s home folder.
  • Trevor Nomi Level 1 Level 1
    When I try the variation proposed I still get a message saying, "The import failed." The entire message is:

    An error occurred during the import. Please make sure you have plenty of available space in your home folder and try again.

    fyi: I have 20GB of free disk space.

    Additionally, it may or may not be related, I keep getting a seperate message saying, "Your Mac OS X startup disk has no more space available for application memory. To avoid problems with your computer, quit any applications you are not using." I mention this problem because it appears when I try and launch Mail...
  • David Gimeno Gost Level 7 Level 7
    Something doesn’t make sense here. Did you really verify/repair the disk? Did Disk Utility report any filesystem issues?

    The 20 GB of free disk space that you say you have are in the startup volume or are in a different partition?
  • Trevor Nomi Level 1 Level 1
    I really did use Disk Utility to repair permissions:

    Repairing permissions for “Macintosh HD”
    Determining correct file permissions.

    Permissions repair complete
    The privileges have been verified or repaired on the selected volume


    Only one partition as well:

    Intel ICH7-M AHCI:

    Vendor: Intel
    Product: ICH7-M AHCI
    Speed: 1.5 Gigabit
    Description: AHCI Version 1.10 Supported

    ST9100824AS:

    Capacity: 93.16 GB
    Model: ST9100824AS
    Revision: 7.01
    Serial Number: 5PL0XQ0E
    Native Command Queuing: Yes
    Queue Depth: 32
    Removable Media: No
    Detachable Drive: No
    BSD Name: disk0
    OS9 Drivers: No
    S.M.A.R.T. status: Verified
    Volumes:
    Macintosh HD:
    Capacity: 92.84 GB
    Available: 19.07 GB
    Writable: Yes
    File System: Journaled HFS+
    BSD Name: disk0s2
    Mount Point: /
  • David Gimeno Gost Level 7 Level 7
    I’m not talking about permissions. Actually, in the post you quoted I specifically said to not repair just permissions. Moreover, I said that the index should be re-created after having fixed all filesystem issues, if any...

    The Repair functions of Disk Utility: what's it all about?
  • Trevor Nomi Level 1 Level 1
    Whoops. Guess I missed that I needed to repair the disk as well. I ran a verification and indeed it needs repairing.

    Looks like I need to boot from CD/DVD and run Disk Utility from there. Standby, I'll let you know what happens.

    Thanks!!
  • Trevor Nomi Level 1 Level 1
    So I attempted to repair my disk by booting from the Installation DVD. I ran Disk Utility and received this error while trying to repair the disk.

    First Aid Failed

    Disk Utility stopped repairing "disk" because the following error was encountered.

    The underlying task reported failure on exit.

    Now what? Sounds like the hard drive is toast...
  • David Gimeno Gost Level 7 Level 7
    If Disk Utility reports problems it cannot fix, even when starting up from a different disk, you’ll need a more powerful disk utility, such as DiskWarrior, TechTool Pro, or Drive Genius.

    The “Disk Utility cannot repair the disk” section of the following article has some additional information you may also find useful:

    Resolving Disk, Permission, and Cache Corruption
  • Trevor Nomi Level 1 Level 1
    I ended up using Disk Warrior to repair my disk. Thank David for all the help and direction!