Using rules on mailboxes in Mail

I am trying to set up Mail so that mail of a certain age and that are located in a certain mailbox / folder are removed, i.e. emails in the Newsletters mailbox and that are more than 30 days old are moved to trash.

Is that possible to do?


This is for Mail on Mac. I am using MacOS 14.4.1.

Posted on Apr 28, 2024 10:04 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 30, 2024 5:01 PM

ceeace wrote:

Thanks, yes you are right of course.
But even if you were to run the rules manually, there are not options to do what I am after, from what I can see.
Anyone know if there is some way to do this using Automator for example?

If you mean that there are no rule actions to isolate a mailbox, then that is true. Rules are not designed to function on mailboxes. They are designed to work on messages passed in through the Inbox.

You can apply rules manually to a selected messages, but it would apply all rules to those messages.


The only way I see this working in any manner is to create a Smart Mailbox that gathers all messages in the newsletter mailbox whose date received is not in the last 30 days. You can then periodically open that mailbox, select all, and delete.

Similar questions

8 replies
Question marked as Top-ranking reply

Apr 30, 2024 5:01 PM in response to ceeace

ceeace wrote:

Thanks, yes you are right of course.
But even if you were to run the rules manually, there are not options to do what I am after, from what I can see.
Anyone know if there is some way to do this using Automator for example?

If you mean that there are no rule actions to isolate a mailbox, then that is true. Rules are not designed to function on mailboxes. They are designed to work on messages passed in through the Inbox.

You can apply rules manually to a selected messages, but it would apply all rules to those messages.


The only way I see this working in any manner is to create a Smart Mailbox that gathers all messages in the newsletter mailbox whose date received is not in the last 30 days. You can then periodically open that mailbox, select all, and delete.

May 7, 2024 10:27 AM in response to ferdberfel89

ferdberfel89 wrote:

how does one apply a rule manually?

I can’t remember which menu it is in, but you have to have messages selected as rules apply to messages, not mailboxes. In the Help Menu, enter “Apply Rules” and it will show you where it is.

You can selectively apply individual rules. All rules apply to the selected messages.

When you create a rule, it allows you to run it on the inbox, individually that one time.

May 7, 2024 8:07 AM in response to ceeace

how does one apply a rule manually? the only time I see the dialog box that says "apply rules?" is when I create a rule, and that doesn't actually move messages in the inbox after they've been received. I'm thinking the idea in this thread is that I can choose any of my rules and somehow force them to run on existing messages. Am I being dense, not seeing an obvious button that says "run now" ?


I've done the "duplicate rule" tactic to no avail, and I've edited my rule and added conditions just to try to get it to run again, but I haven't figured out how get a rule to fire manually (or see it work...)


thanks

May 7, 2024 2:32 PM in response to Barney-15E

Thank you for your response. I was able to get it to work but in the most unintuitive way possible…


When I followed your instructions, I found the ability to apply rules, but it still did not work. So then I created a new rule with the one message selected, and in the email address field that I am targeting it rewrote it for me.


Instead of "newsletters@e.xyz.com"

It created the address.

"newsletters_at_e_xyz_com_s4s5d23aty5fb8_baz74009@icloud.com"


this is not something I could ever dream up myself, but I'm curious if it has something to do with this sender being sent to a "hidden email".


That's kind of weird and a little little bit disconcerting.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Using rules on mailboxes in Mail

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