Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

My mail box has almost 25000 messages. It looks too heavy. It seems slow. Is there any thing that I could do to speed it up ?

I have connected my mail box with my gmail address. I bought the macbook air in January 2014. I need to keep many messages, so I have around 25000 of them in my mail box. The mail software seems to have trouble with that because is getting slower and sometimes it closes down. Is there any thing to do: I was wondering if it is possible to separate the old messages ? This was a recommendation when I was using windows and the office.

MacBook Air (13-inch Mid 2013), iOS 8.3

Posted on Nov 30, 2015 5:11 AM

Reply
6 replies

Nov 30, 2015 6:25 AM in response to nafilho

Please quit Mail if it's running. This procedure will have no effect unless you quit Mail when you begin.

Back up all data.

Triple-click anywhere in the line below on this page to select it:

sqlite3 L*/C*/*.mail/*/L*/*/*/C*.db vacuum; sqlite3 L*/M*/*/*/E*ex vacuum

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

Paste into the Terminal window (command-V).

You should see a new line ending in a dollar sign ($) appear below what you entered. If not, press return. You can then quit Terminal and relaunch Mail. Test.

Nov 30, 2015 8:40 AM in response to nafilho

Hello again nafilho,

Unfortunately, you are getting results from Apple Support Communities that are becoming all too common. Many of the self-taught anonymous strangers you might encounter just repost command line hacks they find elsewhere on the internet. They may not have real understanding of how the operating system is designed to work and Apple doesn't document the internals. Those hacks may be years old, from Linux, or just never tested - certainly not on your e-mail. Apple made certain directories hidden for a reason. These internal databases are not meant to be modified by hand.


These internal databases are not like regular files. The standard, cover-your-butt advice to "back up all data" is insufficient. Time Machine does not back up files that are open and in-use. These internal databases are usually always open. They may even be open when their main application doesn't appear to be running.


And ultimately, even if you are lucky and the above command just rebuilds the database like it is supposed to, why take that risk? Apple Mail already has a rebuild command. Just go to Mailbox > Rebuild. I didn't bother to suggest that because, at best, rebuilding will just delay the problem. The only safe and effective, long-term solution is to move old messages to "On My Mac" mailboxes.

My mail box has almost 25000 messages. It looks too heavy. It seems slow. Is there any thing that I could do to speed it up ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.