Apple Vision Pro is now available in the U.S.

Mail Rules (some) have stopped working

My 30, or so, Apple Mail rules have worked perfectly for years, but partially stopped working approximately three months ago. (iMac Retina 5K, 27-inch, Late 2014) 


Most still work, but a few just stay in the main inbox unprocessed; rather than ending up in their respective Rule mailboxes.  I’ve tried to rectify the problem using the following methods which I have read about in this forum; however, no success.


-I have restarted in safe mode multiple time, but no success.


-I have rebuilt those mailboxes multiple times in safe mode, but no success.


-I have reinstalled a fresh copy of macOS Big Sur (11.7.10), but no success


Note; might this have something to do with Mail Preferences; which I am reluctant to mess with without instructions?  I’ve noticed that when I delete obsolete rules in Mail App Rule preferences; upon closing and re-opening Mail, or closing Mail, restarting the computer and opening Mail again, the deleted Mail rules reappear, in Mail App Rule preferences.  I hope this gives someone a hint of what my problem might be.

iMac 27″, macOS 11.7

Posted on Oct 17, 2023 11:57 AM

Reply
17 replies

Oct 17, 2023 1:25 PM in response to JACKJUP

It may bee deeper than this, but Mail Rules look to Spotlight for info, so I'd start with this, though the deleted rules coming back may mean a corrupted .plist file...


Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes.


Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.


Manually Rebuilding Spotlight via Terminal

If the aforementioned Spotlight control panel approach doesn’t spur a reindexation of the drive, you may need to initiate it manually through the command line. Open Terminal and use the following command string to do so:


sudo mdutil -E /

This basically asks for temporary super user status, which is why Terminal may ask you for your password (it may not if you’ve used a sudo command recently or are already logged in as a super user or root. The command asks the unix tool mdutil to reindex the spotlight database for everything on the computer, including external drives, mounted disk images, etc. To re-index only for a specific drive, use the /Volumes path. For example, for an external drive named “MiniMe,” the command would look like this:


sudo mdutil -i on /


Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.


If still need be…


Open Terminal and run each of these one at a time


/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user


sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network


killall Dock


sudo mdutil -E /


sudo mdutil -i on /


Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.

Oct 23, 2023 11:10 AM in response to JACKJUP

I'm having a similar problem. I have one rule (not the only one misbehaving) that sits at the top of the rules list and punts anything from certain addresses directly to the trash. A couple of times over the past week or so I've added new addresses to that rule and noticed this morning that mail from those addresses is sitting in a folder created at the bottom of the rules list. There are just eight addresses in that top rule at the moment and these seem to work okay, but as mentioned additional "unwanted" addresses are disappearing from within that rule.


Based on responses I read elsewhere in the community about this issue, I suspected a possible corruption of my main user account. So I opened a new user account with sys admin privileges on my Mac Book Air a month or so ago. Everything was working well for a couple of weeks in Mail using the admin account, but again it's starting to go awry. I have not - but will today - tried rebuilding Spotlight. Will let everyone know how that goes as soon as it finishes.

Oct 23, 2023 3:06 PM in response to Mike Strohmeyer

Not that I'm aware of, other than at first a pulsating bar and then a steady progress bar next to Indexing will appear, but if you used the...


sudo mdutil -E /


sudo mdutil -i on /


Then doing a spotlight search should show some info, depending how far it's gotten.


Or in Activity Monitor>Show All Processes, find the mdworker name in the ProcessName column, as soon as the %CPU is above 0 it is "working" (even at 0% it is), it may be 50% or higher when indexing seriously... and enter index in the text area next to the icon. At first a pulsating bar and then a steady progress bar next to Indexing will appear.

Oct 31, 2023 11:49 AM in response to BDAqua

Hello BDAqua,


I’ve completed your entire sequence sent to me, and listed here:


Safe Boot


sudo mdutil -E /


/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user


sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network


killall Dock


sudo mdutil -E /


sudo mdutil -i on /


You weren’t clear about whether to do all those under safe boot or not; therefore, I did it under both safe and regular boots.


Unfortunately, those messages/mailboxes which have lost filtering have still not been straightened out.  


Additionally; the accompanying problem I mentioned about non-needed mailboxes REMOVED from Mail Preference Rule filtering, but which re-appear after the app is closed, and re-opened; is still present.


Thanks in advance for your additional analysis and suggestions please.


Thank you, JackJupe

Nov 6, 2023 8:34 AM in response to BDAqua

BDAqua, I’ve followed your latest instructions here:


<<<To find out if it's system wide or user specific, try this...


Open System Preferences>Users & Groups, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.


Does it work in the new account?>>>


The twinned admin test account works for all Mail IMAP accounts.  I see everything.  


Unfortunately; none of the ON MY MAC accounts, where all of my Mail rules are situated, are reproduced in the test account.  Therefore, I cannot complete your test.


On another track, in your original response; you suggested it might be a plist problem.  That suggests to me, possibly trashing all my rules and starting over.  If that’s the result, I am at the point where, if it comes to that; I don’t mind doing that, and slowly rebuilding my hundred-plus rules over several months; as emails come in.


What were your thoughts regarding Mail plists?


Thanks, Jackjupe

Mail Rules (some) have stopped working

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