Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

August West

macrumors 6502
Original poster
Aug 23, 2009
342
389
Land of Enchantment
I have a new M2 mini that I just set up over the weekend but I get no notifications for incoming mail. Neither the sound nor the banner are working. The unread message count on the Mail icon is working though and the outgoing mail sound is also working. I've playing with all the Mail setting, Notification settings and Focus but nothing seems to work. Any ideas?
 

jcscol

macrumors regular
Sep 26, 2018
158
83
I've had problems with the New Message Sound after system upgrades in the past, which I've fixed by deleting that particular setting by doing the following:

1) Close Mail
2) Open the Terminal in Applications/Utilities
3) Type the following to reset the NewMessages Sound option:

Code:
defaults delete -app Mail NewMessagesSoundName

4) Open Mail and select your desired sound

Hopefully that will fix it. Not sure about the notification messages though.
 

jcscol

macrumors regular
Sep 26, 2018
158
83
That's strange! What does the following show?

Code:
defaults read -app Mail NewMessagesSoundName
 

adrianlondon

macrumors 603
Nov 28, 2013
5,030
7,604
Switzerland
That's strange! What does the following show?

Code:
defaults read -app Mail NewMessagesSoundName
My mail notification sounds work perfectly (Ventura 13.3 beta, but also worked fine in previous releases) and the above command returns a "does not exist" message.
 

jcscol

macrumors regular
Sep 26, 2018
158
83
13.3 b4 here too, and it returns the expected value for me. Does the following return anything at all?

Code:
defaults read -app Mail
 

jcscol

macrumors regular
Sep 26, 2018
158
83
OK, I'm rather stumped! Do you have a com.apple.mail.plist file buried somewhere in your Home Directory's Library/Containers folder:

Code:
find "$HOME/Library/Containers" -type f -name "com.apple.mail.plist"
 

August West

macrumors 6502
Original poster
Aug 23, 2009
342
389
Land of Enchantment
OK, I'm rather stumped! Do you have a com.apple.mail.plist file buried somewhere in your Home Directory's Library/Containers folder:

Code:
find "$HOME/Library/Containers" -type f -name "com.apple.mail.plist"

Not to my knowledge.

james@Jims-Mac-mini ~ % find "$HOME/Library/Containers" -type f -name "com.apple.mail.plist"
find: /Users/james/Library/Containers/com.apple.archiveutility: Operation not permitted
find: /Users/james/Library/Containers/com.apple.Maps/Data/Maps: Operation not permitted
find: /Users/james/Library/Containers/com.apple.Safari: Operation not permitted
find: /Users/james/Library/Containers/com.apple.CloudDocs.MobileDocumentsFileProvider: Operation not permitted
find: /Users/james/Library/Containers/com.apple.mail: Operation not permitted
find: /Users/james/Library/Containers/com.apple.Notes: Operation not permitted
find: /Users/james/Library/Containers/com.apple.news: Operation not permitted
find: /Users/james/Library/Containers/com.apple.corerecents.recentsd/Data/Library/Recents: Operation not permitted
find: /Users/james/Library/Containers/com.apple.stocks: Operation not permitted
 

jcscol

macrumors regular
Sep 26, 2018
158
83
I don't know why things are so different from my set-up here. It's possible the preference file I have is left over from a previous install, but changing a setting in Mail results in the com.apple.mail.plist file I have in my Library/Containers folder being modified, so it is (still) being actively used.

I also don't know why you appear to have so many 'Operation not permitted' responses to your Find query, when I get none. Without necessarily posting the results here (it will be a long list!), does the following show any strange ownership/permission responses?

Code:
ls -al $HOME/Library/Containers
 

IncreasinglyFrustrated

macrumors member
Sep 22, 2020
37
94
Following...

Last month, I set up an M1 Mini, an M2 Mini and an M2 MBP. All from scratch, all linked to the same Apple ID. Mail notifications on my MBP don't work, (the notification sound still works though), but everything works fine on the 2 minis. Bizarre and annoying.

Edited to add I get the same "Domain com.apple.mail does not exist" & "Operation not permitted" errors as the OP when trying to read the defaults and find the plist; (even running under sudo).
 
  • Like
Reactions: August West

jcscol

macrumors regular
Sep 26, 2018
158
83
If you feel like investigating, you could try dumping your defaults to a text file and searching for anything Mail related. This will save the (long) list to your Home directory.

Code:
defaults read > defaults.txt

Edit: I have just remembered that I have Terminal set for 'Full Disk Access', so that may explain why I don't get the permission errors with the Find command described earlier.

But it still raises the question that if you don't have a com.apple.mail.plist file, where are your Mail preferences being stored?
 
Last edited:

August West

macrumors 6502
Original poster
Aug 23, 2009
342
389
Land of Enchantment
I don't know why things are so different from my set-up here. It's possible the preference file I have is left over from a previous install, but changing a setting in Mail results in the com.apple.mail.plist file I have in my Library/Containers folder being modified, so it is (still) being actively used.

I also don't know why you appear to have so many 'Operation not permitted' responses to your Find query, when I get none. Without necessarily posting the results here (it will be a long list!), does the following show any strange ownership/permission responses?

Code:
ls -al $HOME/Library/Containers

drwx------@ 4 james staff 128 Mar 11 12:39 com.apple.mail
drwx------@ 4 james staff 128 Mar 11 11:10 com.apple.mail.MailNotificationContentExtension
drwx------@ 4 james staff 128 Mar 11 11:16 com.apple.mail.MailQuickLookExtension
drwx------@ 4 james staff 128 Mar 11 11:10 com.apple.mail.SpotlightIndexExtension

This seems to be a sporadic problem. While I was typing this an email came in and I got both notification sound and banner??? But if I send an email to myself I get nada.

"com.apple.mail" isn't listed in Finder when I look in $HOME/Library/Containers/ but if I navigate there in a terminal window it shows up with "ls -la". I can "cd" to "com.apple.mail" but once there any listing command returns "Operation not permitted". This seems to be the case with all of the "com.apple.xxx" containers. Containers for apps I have installed I am able to navigate to and open files.
 

jcscol

macrumors regular
Sep 26, 2018
158
83
find: /Users/james/Library/Containers/com.apple.mail: Operation not permitted

Sorry, I didn't spot this earlier. It looks like your search was indeed blocked due to permissions.

Perhaps try again after temporarily granting the Terminal 'Full Disk Access' under System Settings -> Privacy & Security -> Full Disk Access (like I have here), and then try the defaults command again

Code:
defaults read -app Mail NewMessagesSoundName

Don't forget to disable Full Disk Access for the Terminal afterwards.
 

jcscol

macrumors regular
Sep 26, 2018
158
83
"com.apple.mail" isn't listed in Finder when I look in $HOME/Library/Containers/ but if I navigate there in a terminal window it shows up with "ls -la". I can "cd" to "com.apple.mail" but once there any listing command returns "Operation not permitted". This seems to be the case with all of the "com.apple.xxx" containers. Containers for apps I have installed I am able to navigate to and open files.

Yes, they appear strangely in Finder windows here as well: I have several Mail containers, one of which is the 'true' com.apple.mail container we're looking for.
 

IncreasinglyFrustrated

macrumors member
Sep 22, 2020
37
94
I was able to execute "defaults read -app Mail" after granting full disk access to Terminal. Likewise, the "Operated not permitted" errors are gone too. Nothing jumps out in the Mail defaults regarding notifications (or lack thereof).
 

rob2bob

macrumors member
Oct 26, 2021
59
47
I know this is an old thread but any solutions.. mine was making the sound for new mail on a new iMac M3 with Sonoma but has stopped. The setting is still ticked for new mail sounds. Grrr
 

adrianlondon

macrumors 603
Nov 28, 2013
5,030
7,604
Switzerland
You may notice the sounds come in a minute or so before or after a new mail actually shows in Mail.

It's bordering on funny that Apple don't seem to have the skills necessary to fix this or properly put Mail notifications inline with every other app's notifications.
 
  • Like
Reactions: rob2bob

rob2bob

macrumors member
Oct 26, 2021
59
47
You may notice the sounds come in a minute or so before or after a new mail actually shows in Mail.

It's bordering on funny that Apple don't seem to have the skills necessary to fix this or properly put Mail notifications inline with every other app's notifications.
Nope nothing even within t plus or minus a minute (or so). But you are right, such a simple thing and they have not sorted it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.