Apple Event: May 7th at 7 am PT

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

Mail problems with El Capitan (10.11.6)

I just upgraded to El Capitan from Mavericks (yes, I know, it's been a long time... there were reasons). Anyway, I'm having a number of problems with Mail:


1. I have multiple accounts, using multiple servers. It used to be that when I got a message that was sent to account A, if I hit "Reply" the "From:" field would be set to the correct account. This is now broken. There are two things that I am aware of: By default, Mail uses the first account in the account list (on the left pane in classic mode) for the "From:" field. This is not working any more - it doesn't matter what account is there, Mail chooses only one account and the same account every time. There is also a field under Mail->Preferences->Composing called "Send new messages from" and allows you to set a default account for the "From:" field. That is not working either. Again, it doesn't matter what I use there, Mail uses only one account for the "From:" field.


2. There used to be a checkbox in the preferences that forced Mail to use specific servers for specific accounts. This appears to be gone. As a result, the wrong servers are sometimes used.


3. The icon on the dock used to display a badge that showed the number of new mail messages. That badge is still there but tends to have the wrong number. It seems to exclude some accounts (for some reason). Oddly, the account that is most often excluded is the one that Mail seems to want to use as the default for the "From:" field!


Some problems that are holdovers from Mavericks that I'd hoped were fixed:


4. I have a bunch of filters that I have built up over the years for dealing with junk mail. Whenever I get junk mail that is identified as junk by one of these filters (because the mail passed through Mail's normal junk filters as "ok") I move the message into the junk folder, and mark it as read. Mail insists on notifying me that I got new mail for some of these messages, but not all, and not any of the messages identified as junk by Mail's normal junk filtering process. What's worse is that it counts the message as new mail, making the problem in #3 above worse because now, sometimes, the badge shows the number of new mail messages which include some of these junk mail messages.


5. Although I have the Mail preferences set to delete junk mail periodically, it doesn't. In fact, it hasn't deleted junk mail automatically on exit despite the settings, since about March 2014.


If anyone can help me with these problems I'd appreciate it. The most important one is #1. I'm tired of having to fix this manually for each message when I reply to a message and this is important. Some of my accounts don't have my name in them and if I reply to a message to someone expecting to see my name and they get this mail from some mysterious person they don't know it could be viewed as junk. Also, I participate in a number of mail lists that are configured to auto-reject messages from non-subscribers and my alternate ids are not subscribe so my messages would get bounced. Using the wrong "From:" address is a somewhat serious issue for many reasons.


Thank you in advance.

MacBook Pro with Retina display, OS X El Capitan (10.11.6)

Posted on Jul 25, 2016 3:22 PM

Reply
14 replies

Jul 25, 2016 6:59 PM in response to sauljaffe

Please take these steps to delete the Mail "sandbox" folders.

Step 1

Back up all data.

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

~/Library/Containers/com.apple.mail

Right-click or control-click the highlighted line and select

Services Reveal

from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder—not just its contents—to the Desktop. Leave the Finder window open for now.

Log out or restart the computer. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. Any custom stationery that you created may be lost. Ask for instructions if you want to preserve that data. You can then delete the folder you moved and close the Finder window.

Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.

Step 2

If Step 1 doesn't solve the problem, repeat with this line:

~/Library/Containers/com.apple.MailServiceAgent

*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select

Go Go to Folder...

from the menu bar and paste into the box that opens by pressing command-V. You may not see what you pasted because a line break is included. Press return.

Jul 27, 2016 3:55 AM in response to Linc Davis

Ok, before I do this, a few questions:

1. What do you mean by "sandbox" folders?

2. What is the best method of backing up the data to preserve it? Is Time Capsule sufficient of should I use "tar" to gather up all the mail messages? I don't want to lose any messages!!

3. You say something about, if the contents of the sandbox are changed Mail might crash - do you mean I have to disconnect from the net and not get any mail? (This question is probably because I don't know what you mean by the term "sandbox").


Thanks.

Jul 28, 2016 6:47 AM in response to Linc Davis

Well, I followed your instructions in the first step... up to restarting the computer and then restarting Mail. Now, all of the "On my Mac" mailboxes are gone, along with almost everything else. The files appear to still be on the disk in ~/Library/Mail but the mailboxes don't appear in Mail. How do I get them back, and make sure that all the messages that should be in each of those folders get into those folders??? I can't test anything to see if this resolved any of the issues until I actually have messages in Mail to reply to....

Jul 28, 2016 6:58 AM in response to sauljaffe

Ok, sorry, I may have jumped the gun a tad. The mailboxes are all still there... just hidden. It wasn't obvious and I didn't see it until I scrolled over the "On my Mac" folder and a box that said "Show" appeared. Clicking that brought it all back....


But, the problem is not resolved. When I reply to mail, or go to compose new mail, Mail still selects the wrong account to use. The other issues cannot be checked since some of them only trigger on receiving junk mail, or exiting mail, or some other condition that doesn't exist right now... but it DEFINITELY does not use the correct account when I reply to mail or compose a new message, unless I'm sending mail or replying to mail to the default account.

Jul 28, 2016 8:37 AM in response to sauljaffe

And now, something new is broken. It used to be that when I manually clicked "junk mail" for a message in one of the account's mailbox, the message would be marked as junk and moved to the junk folder. It no longer does that. It did that before I followed the directions you gave me. I can't find any option in Preferences to turn this on again.

Jul 28, 2016 11:29 AM in response to sauljaffe

A

Please back up all data before proceeding.

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

~/Library/Mail/Bundles

Right-click or control-click the highlighted line and select

Services Open

from the contextual menu.* A folder may open, or you may get an error message that the item can't be found. Either result is normal. If the folder does open and has contents, move the contents to the Desktop. Relaunch Mail and test. If there's no change, put the contents of the folder back and quit Mail again.

2. Repeat with this line:

/Library/Mail/Bundles

This time you may be prompted for your administrator login password when you remove the items. Make sure they're removed from the folder and not just copied to the Desktop. If necessary, copy them first and then move the originals to the Trash.

*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select

Go Go to Folder...

from the menu bar and paste into the box that opens by pressing command-V. You may not see what you pasted because a line break is included. Press return.

B

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.

Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem.

Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.

The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

Test while in safe mode. Same problem?

After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Jul 29, 2016 3:45 AM in response to Linc Davis

Ok, ran your tests:


~/Library/Mail/Bundles does not exist

/Library/Mail/Bundles does not exist

Booted in safe mode, started mail (no wifi so no new mails were downloaded):

Mail thinks my primary account is A and defaults to that so:

When I click "Reply" to reply to a message sent to Account B, mail uses Account A as the default "From:" address.

When I'm reading mail to/in Account B, and I click "New Message", mail uses Account A as the default "From:" address

Furthermore, when I exited mail, old "Junk" mail was still not deleted so I'd say that even under Safe Mode, it's broken.

Jul 29, 2016 8:01 AM in response to sauljaffe

Please test after taking each of the following steps that you haven't already tried. Stop when the problem is resolved.

Back up all data before making any changes.

Step 1

If you use iCloud Drive, please open the iCloud pane in System Preferences. There is a checkbox marked iCloud Drive, and next to that, a button marked Options. Click that buttion, and in the sheet that drops down, uncheck the box marked Mail if it's checked.

This Mail checkbox is not to be confused with the one, also marked Mail, that appears when you first open the iCloud preference pane. They have different effects.

Step 2

If Mail crashes or freezes immediately on launch, try the steps suggested on this page. Sometimes a corrupt message on a mail server can be deleted by logging in to the server through its web page.

Step 3

If Mail still won't launch, or if you can't take this step for any other reason, skip to Step 4.

There are three types of mail account: IMAP, Exchange, and POP. You can determine the type of each account by opening the Mail preferences window, selecting the Accounts tab, and then selecting Account Information.

Export all POP mailboxes to the Desktop folder.

If you have IMAP or Exchange accounts, and you don't store sent, deleted, and junk messages on the server, export those mailboxes the same way. You can determine whether the messages are on the server by selecting Mailbox Behaviors in the Accounts tab.

Also export all mailboxes in the On My Mac category.

You don't have to export the other mailboxes, because the messages are stored on the servers.

Quit Mail.

Step 4

In System Preferences, open Internet Accounts (OS X 10.9 or later) or Mail, Contacts & Calendars (OS X 10.7 or 10.8). Make notes of the settings for each mail account (all types), then delete the accounts.

Step 5

Quit Mail if it's running. In the Finder, hold down the option key and select

Go ▹ Library

from the menu bar. Move the following items (some may not exist) from the folder that opens to the Desktop:

Application Support/AddressBook/MailRecents-v4.abcdmr

Containers/com.apple.corerecents.recentsd

Containers/com.apple.mail

Containers/com.apple.MailServiceAgent

Containers/com.apple.share.Mail.compose

Mail

Note: you are not moving the Mail application. You’re moving a folder named “Mail.”

Step 6

Launch Mail. It will behave as if you were setting it up for the first time. Go through the setup process with one account, using the information from Step 4. Test. If Mail works now, recreate the rest of the accounts (if you have more than one) and other settings.

Any custom stationery that you created may be lost. Ask for instructions if you want to preserve that data.

If there’s no improvement, quit Mail and put back the items you moved to the Desktop, replacing any newer ones that may have been created in their place. Stop here and post your results.

Step 7

If you took Step 3, import the mailboxes you exported (see the support article linked to Step 3 for instructions.) Typically, the process takes a few minutes, but it may take hours if you have gigantic mailboxes. In that case, you may be able to speed things up by temporarily adding your home folder to the Privacy list in the Spotlight preference pane. Remove it when Mail has finished importing.

The mailboxes that you didn't export should synchronize automatically with the server. Again, if the mailboxes are very large, downloading them may take quite some time, and network performance will be slower than usual during that time.

If you skipped Step 3, look inside the Mail folder on the Desktop for a subfolder

V3/Mailboxes (for OS X 10.11 or later)

or

V2/Mailboxes (for any older version of OS X)

Import the mailboxes it contains.

Test. If Mail is still working, delete the items you moved to the Desktop in Step 5.

Re-enable the Mail option in the settings for iCloud Drive, if you disabled it, and test again. If you weren't already using iCloud Drive with Mail, there is no need to enable it now, unless you want to.

Jul 29, 2016 9:07 AM in response to Linc Davis

Ok, I'm calling a halt to this. First of all, it's clear that you have no clue what the problem is and are just parroting something you are reading somewhere else. That's proven by the statements in Step 6 that says to create an account and try Mail with that account to see if the problem is gone. The problem I'm having is clearly due to having multiple accounts so that statement just doesn't work.


Secondly, after following previous directions, I'm now WORSE off than I was before because now all junk mail is coming in and being marked as "unread mail". It didn't use to do that before. Junk mail would simply go into the junk folder and the sound will chime saying that I have new mail, but the messages were marked as read. However, it's now more broken than that because now the messages are being marked as unread, despite the fact that the filters clearly contain the instruction to mark the mail as read.


Third, I'm not deleting the accounts. It took a long time to get them set up, to find all the right ports, parameters, server names, and other parameters necessary to work with my ISPs and I'm afraid that no matter how hard I try, some fiddly bit is going to be missed when I try to recreate them and that will just create more aggravation and who knows how long it will take to be able to read and send mail again. I cannot afford that.


Fourth, the last time I exported the messages from *one* account, and then imported it again, to fix a problem at the direction of an Apple Support person, it took nearly a week to get all the messages back in the right place(s) and to fix all the problems that were caused by exporting and importing. And that was only one folder in one account. I have many more messages now in that one folder, and about 8-10 more accounts/folders (all POP accounts). I do not have that kind of time to waste.


Fifth, one of the problems I have is that the junk mail isn't being deleted on exit according to the settings. Recreating everything from scratch will certainly delete the junk mail. But, doing so won't tell me if the problem is *fixed* - the problem just won't be there because the junk mail won't be there.


It's clear you don't know what the problem is but I just don't have the time to waste doing all of this. If you have a fix, fine. But if you continue to post "try this and see what happens" kind of stuff, no, I'm just not doing it any more if it's going to take me weeks to recover like this last batch of "suggestions" will take. It's less trouble and less aggravation to just leave things "broken" the way they are. Yes, it's annoying and a pain but at least I can send and receive mail, find what I'm looking for in the folders, and do all the things I need to be able to do.

Jul 30, 2016 5:44 AM in response to sauljaffe

Well, I figured out one of the problems, anyway, on my own - the new one, where junk mail was not being marked as "Read".


In Mail->Preferences->Junk Mail there is a button marked "Advanced" that gives you the junk filter that Mail uses. This used to be the same filter that you would see if you went to Mail->Preferences->Rules and opened the "Junk" filter there. With this new version of Mail, after all the stuff that you had me do, these were now two DIFFERENT filters. The one at Mail->Preferences->Junk Mail did not have the command to mark the messages as "read".


I've verified this by modifying both filters and having one make the background color of the message one color, and the other a different color. Both filters are active - some junk mail was going into the junk mail folder with one color - the ones being marked as "unread" and other junk mail was going into the junk folder with the other color and those messages were being marked as "read". So, I changed the junk filter at Mail->Preferences->Junk Mail to be identical to the one at Mail->Preferences->Rules and the new problem went away - now all junk mail is being marked as "read".


However, the other problems remain:

1. Mail uses the wrong account for new mail and replies in all account mailboxes, except the ones that match the account it's using as the default where, naturally, it's using that account as the "From" address.

2. Junk mail is not being deleted despite the fact that under "Mailbox behavior" for each of the accounts, junk mail is set to be delete "when one month old". I've tried "when quitting mail" and other settings, but none work.

3. There used to be a checkbox in the preferences that forced Mail to use specific servers for specific accounts. This appears to be gone. I'm not sure if the wrong servers are sometimes used or not - I would suspect I'd be seeing "authentication failed" errors if Mail was trying to send mail being sent from Account A through Account B's servers. However, setting this checkbox *used* to fix the problem in #1. That is, I had this problem of Mail choosing the wrong default account in the past and setting this checkbox fixed that problem in the past. I don't know what that means.

4. The badge that displays the number of unread messages is sometimes wrong. Randomly. Without any pattern i can discern. Sometimes it ignores mail in one account, sometimes in another, sometimes it ignores mail in a folder not tied to a specific account (not smart folders).


Any fix for any of these issues?

Mail problems with El Capitan (10.11.6)

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