How To Fix Apple Mail When It Slows Your Mac
Has your Mail slowed to a crawl? Has it become so greedy for memory your system hangs when it tries to send or receive an email?
I have endured this frustrating problem from time-to-time so thought I’d put together a few different ideas that may help you fix this problem if it ever happens to you.
Which I hope doesn’t.
If it does, try these approaches first:
Activity Monitor
First, let’s take a quick look to confirm Mail really is the miscreant. Launch Activity Monitor (Command-Space and type Activity Monitor and it should launch immediately), and watch its data as you try to use Mail.
Is Mail using waaaay too much memory? If the answer is ‘Yes’ then perhaps it’s time to try these strategies out:
Start here
Delete spam messages, delete deleted messages, delete messages you don’t need to keep and make sure your Mac is up to date with current system software. Now grab a cup of tea, and let’s begin.
1. Rebuild
The first stop when you are having Mail problems is to Rebuild your Mailbox using the Mailbox>Rebuild command.
Depending on how large your mailbox is this can take a while, but you can still make use of Mail while the operation takes place.
2. Don’t Download Attachments
In my experience when I’ve encountered this kind of poor Mail behavior, attachments may be to blame.
To help mitigate this problem it sometimes helps to access your Mail account data and change the way your email accounts handle attachments. Launch Mail>Preferences>Accounts and set the Download Attachments drop down menu to Recent or None. Now your system won’t try to download any attachments until you ask it to do so.
3. Remove Attachments
This step isn’t for the faint-hearted. It really is best to save your attachments (probably to an external backup drive) first.
To save them just select all the mail in your Mail app, and then File>Save Attachments. You’ll get the chance to choose where to save too and to create a folder to pop all the attachments inside).
Once you’ve saved your attachments (which will also take a while), you can select all your email messages and then use the Message>Remove Attachments command to delete them all. This will slim the size of your mailbox(es), and will reduce the time it takes to launch and use the app.
4. Clean The Database
It is possible you may see some improvement if you take a moment to clean up Mail’s SQL database. Doing so is pretty simple (if you know how it is done). On Sierra it means launching the Terminal app and typing (exactly as you see, including the semi-colon):
sqlite3 ~/Library/Mail/V4/MailData/Envelope\ Index vacuum;
There is an excellent account of this at the App Factor. That useful guide includes instructions with which to create an Automator action to do this for you in future. Read it here.
If none of these steps has worked you may need to reindex your messages. I explain how to do this here.
Good luck!
I’m keen on including the above command in an ASObjC app.
Is the correct terminology…
tell application “System Events” to do shell script (“sqlite3 ~/Library/Mail/V4/MailData/Envelope\”Index vacuum;\””)
Here is a good way to speed up your older Mac.
https://jmmxtech.wordpress.com/2016/10/17/how-to-get-a-new-macbook-pro-for-124/
(NOT a scam)
In some cases when you “Remove Attachments” they are removed from the imap server and cannot be easily restored. https://apple.stackexchange.com/questions/252354/accidentally-removed-attachments-via-mail-app
Is there a fix for this with Mojava
sqlite3 ~/Library/Mail/V4/MailData/Envelope\ Index vacuum; gives me an error message.
Error: unable to open database “/Users/caseyshomefolder/Library/Mail/V4/MailData/Envelope Index”: unable to open database file
sqlite3 ~/Library/Mail/V4/MailData/Envelope\ Index vacuum; gives me an error message.
Error: unable to open database “/Users/caseyshomefolder/Library/Mail/V4/MailData/Envelope Index”: unable to open database file
>>>>>Go to the folder location. Check the database is V4. Mine were V2 & V6.
e.g. sqlite3 ~/Library/Mail/V6/MailData/Envelope\ Index vacuum;
Thanks for the article. Running the vacuum on my email database saved me over 140MB.
I am running MacOS 10.15 and I checked and the database is V7. When I execute:
sqlite3 ~/Library/Mail/V7/MailData/Envelope\ Index vacuum;
I still get the “unable to open database file” error. I had quit the Mail app first. Is there something that still could be hanging up this database?
Thank you