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

zach-coleman

macrumors 65816
Original poster
Apr 10, 2022
1,188
2,106
Is there a way to do this? I have these settings but they don't work. I don't want a useless badge that tells me I have junk mail, it's just clutter...

1711948486394.png
 

GlenK

macrumors 65816
Aug 1, 2013
1,455
904
St. Augustine, FL
I hope someone knows how to to this too. I've been trying to make some rules that deal with junk mail and can't get anything to work either.
 

zach-coleman

macrumors 65816
Original poster
Apr 10, 2022
1,188
2,106
I don't care what I have to do, block them and do some kind of logic with that, auto move all junk to trash, whatever. I will do anything to get rid of the junk mail badge on the sidebar of mail. I have no idea why they think I care if I have 30 spam emails that I didn't look at. If I feel like I missed something, I'll check myself.

Still have not found any way to get this to work consistently, any set of rules I attempt to add only seem to run when I hit apply and then never work again.

1712415622801.png
 

gilby101

macrumors 68030
Mar 17, 2010
2,649
1,415
Tasmania
I have been putting up with this annoyance.

Plus (much more concerning) photos inside junk mail messages are all extracted and put into Mail folders as individual images - I would prefer not to have many of these images on my Mac.

I am pretty sure the answer lies in creating an AppleScript to do what is needed. With my skills this is possible but difficult to get right - need to commit to the effort.
 

ipaqrat

macrumors 6502
Mar 28, 2017
334
353
I couldn't test, no junk incoming at the moment. Have you tried this subtle variation? Notice the slight indent for the "Mark as read" action, implying the actions are chained.
1712451789277.png


As for images accumulating, I set my mail NOT to download external content at all. I click to load content if I'm interested, so I guess I haven't noticed that particular problem.
 

gilby101

macrumors 68030
Mar 17, 2010
2,649
1,415
Tasmania
Is there a way to do this? I have these settings but they don't work.
I hope someone knows how to to this too. I've been trying to make some rules that deal with junk mail and can't get anything to work either.
I couldn't test, no junk incoming at the moment. Have you tried this subtle variation? Notice the slight indent for the "Mark as read" action, implying the actions are chained.
I have found that Apple Mail's rule only apply to messages delivered to the Inbox. Most spam is detected by the mail server and placed in a Junk (or similarly named) IMAP folder. So Rules never see the spam messages.

Hence my thinking that it needs some AppleScript (run regularly) to mark messages in Junk folder as read.

As for images accumulating, I set my mail NOT to download external content at all. I click to load content if I'm interested, so I guess I haven't noticed that particular problem.
I have that set. But that is for external content linked (with URL) in the mail message.

My issue is with images which are imbedded in multipart MIME messages. As soon as the message arrives Apple Mail unpacks all the MIME components and stores them as separate files. This is true even if the mail server has already identified the message as spam and placed it in the Junk folder. So I end up with pornographic JPEG images within my Mail folder hierarchy.
 
Last edited:

Apathist

macrumors newbie
Jan 29, 2024
21
17
I have found that Apple Mail's rule only apply to messages delivered to the Inbox. Most spam is detected by the mail server and placed in a Junk (or similarly named) IMAP folder. So Rules never see the spam messages.

Hence my thinking that it needs some AppleScript (run regularly) to mark messages in Junk folder as read.

This Stack Exchange post indicates this has been more or less confirmed by Apple support. Mail that fails Apple's spam policy is said to be effectively quarantined and thus not subject to filtering by user-defined rules.

https://apple.stackexchange.com/que...nd-filters-not-work-on-emails-that-fail-apple

I'm guessing junk mail left in the inbox (Settings --> Junk Mail --> When junk mail arrives ...) won't be filtered by inbox rules either, but might be worth a try.
 

zach-coleman

macrumors 65816
Original poster
Apr 10, 2022
1,188
2,106
This Stack Exchange post indicates this has been more or less confirmed by Apple support. Mail that fails Apple's spam policy is said to be effectively quarantined and thus not subject to filtering by user-defined rules.

https://apple.stackexchange.com/que...nd-filters-not-work-on-emails-that-fail-apple

I'm guessing junk mail left in the inbox (Settings --> Junk Mail --> When junk mail arrives ...) won't be filtered by inbox rules either, but might be worth a try.
The thing is even those don’t work, that’s what I’m using in the OP. It lets you attach a custom rule to junk filtering via the junk tab but it doesn’t actually do anything. I also have "Filter junk mail before applying my rules" disabled.

1712510043008.png

1712510083390.png


The stack exchange post makes this even dumber, why does it even go to my mailbox if Apple already knows it’s absolutely spam?

If I go to Mail>Prefs>Rules and then add the following rule, then hit apply on the popup, it works a single time and then never again until I manually do something. Is there maybe a way for me to make a mail extension instead to deal with this?

1712510223636.png


There has to be some combination where this works, even if it requires an extension.
 
Last edited:
  • Like
Reactions: GlenK

Apathist

macrumors newbie
Jan 29, 2024
21
17
The thing is even those don’t work, that’s what I’m using in the OP. It lets you attach a custom rule to junk filtering via the junk tab but it doesn’t actually do anything. I also have "Filter junk mail before applying my rules" disabled.

Sorry, I had meant to suggest using the "Mark as junk mail, but leave it in my inbox" option and then creating a generic rule (Settings --> Rules) to filter the messages there. As I said, I doubt it will work, but might be worth at least trying.

Post-processing, such as gilby101 suggests, might be the only possible workaround.

AppleScripts can be attached to Mail rules, for instance, but running them against junk mail might simply fail for the same reason the rules themselves do.

 

gilby101

macrumors 68030
Mar 17, 2010
2,649
1,415
Tasmania
It lets you attach a custom rule to junk filtering via the junk tab but it doesn’t actually do anything.
Such a rule applies to mail arriving in your Inbox and being detected by Apple Mail as junk. It does not apply to junk which has already been detected by your mail provider, placed in its Junk folder, and delivered via IMAP to the Junk folder in Apple Mail.
This Stack Exchange post indicates this has been more or less confirmed by Apple support. Mail that fails Apple's spam policy is said to be effectively quarantined and thus not subject to filtering by user-defined rules.
https://apple.stackexchange.com/que...nd-filters-not-work-on-emails-that-fail-apple
Thanks, I didn't know that. So the DMARC policy is another reason for junk not being detected by the user supplied rules.
AppleScripts can be attached to Mail rules, for instance, but running them against junk mail might simply fail for the same reason the rules themselves do.
The script would need to run either a) regularly on a time basis or b) attached to an Inbox rule which is fired every time a message arrived, but which scans all existing Junk folders. Seems messy.
 

zach-coleman

macrumors 65816
Original poster
Apr 10, 2022
1,188
2,106
The script would need to run either a) regularly on a time basis or b) attached to an Inbox rule which is fired every time a message arrived, but which scans all existing Junk folders. Seems messy.
I'd take it.
 

Forum-User

macrumors member
Jul 8, 2009
48
40
I use an older version of the Mac OS, but have used the following Junk Mail settings and Junk rule for years. I almost never have unread messages in my Junk folder, while Mail does a decent job of detecting actual junk/spam to move into the Junk folder. I configured the junk email settings at my email provider to deliver all messages to my Inbox, so Mail can use the attached rules accordingly.

JunkMailOptions.png
JunkRule.png
 

zach-coleman

macrumors 65816
Original poster
Apr 10, 2022
1,188
2,106
I use an older version of the Mac OS, but have used the following Junk Mail settings and Junk rule for years. I almost never have unread messages in my Junk folder, while Mail does a decent job of detecting actual junk/spam to move into the Junk folder. I configured the junk email settings at my email provider to deliver all messages to my Inbox, so Mail can use the attached rules accordingly.

View attachment 2367093 View attachment 2367096
Trying this. I'm not hopeful though. I looked into making a mail extension but it seems like it would have the same issue of not being able to intercept things already sent to Junk. Might look into persistently running AppleScript next.

I know this is a minor issue in the grand scheme of things, but I really don't get why if apple is sure enough something is spam that they make it skip my inbox that they think I should care if its unread.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.