Count the number of rules in Apple Mail

To get a handle on junk mail, a few months ago I started making up rules to send to trash any e-mail in the future from the server of the last piece of Junk Mail. It only takes like 10 seconds to make a new rule. I have collected quite a few. Out of curiosity, it would be interesting to count the rules. I thought I was able to do that not too long ago, but I don’t see where/how now.

Monterey OS, up to date.

If you have a rule that will, for a message from a particular address, mark the message as read and move it to the trash, please share it. Although I can set the conditions for a rule such that I think that should happen, the execution has always failed. This is typically for mail arriving at a Gmail address.

see screen shot. It’s not that hard at all. With the message selected, go to mail prefs, ‘rules’ tab, click new rule, then the’ From’ pull down should be default, ‘contains’ I change to ‘ends with’, but it sounds to me you want ‘is equal to’, most of the time the e-mail address is entered, about 1/10 of the time it is not. I chop off the user (stuff before the @ symbol, and use ‘ends with’, as that trashes everything from that domain/smtp server, and I figure ‘ends with’ would work faster than any of the other choices.

Next down below choose “Move Message” then “Trash”. I don’t think this flags the message as read, as you requested.

I just leave the ‘rules’ window open now, so I just click on that window.

Also note, not too long ago you didn’t have to re-select ‘Trash’ it just remembered it. A little while ago that changed and you have to re-select ‘Trash’ every time, although it is showing that selection. I put in a request to change that back.

2 Likes

Moving an unread message to the Trash automatically removes the unread status. I would expect a rule to do the same.

Oooh, I succeeded in his request!

Thank you. I have followed your instructions and hope for the best, but I think I’ve done it in the past without success. (Perhaps in the past, I tried to mark it as spam, mark it as read, and move it to the Trash, and that’s what failed.)

Is that dependent on the version of macOS? I believe I’ve had unread messages in the Trash (Big Sur), and I know someone who has many many unread messages in the Trash that were moved from the Inbox by clicking the trash icon (Mojave). (On the other hand, I just clicked on the trash icon with an unread message selected; it moved to the Trash and the unread status was cleared, just as you said.);

I followed your instructions to create a rule, but today, a message was in the Junk folder rather than Trash.

In more detail, I created the rule with an offending message open (should it have been closed but selected in the enclosing mailbox?) and left the From address unchanged. I then chose the action move message to Trash. I did not select Trash from the list that included All Trash (that’s what failed to work in the past); I selected the account and then chose Trash from the pop-out menu. (I have no reason to believe this behaves any differently, and in this case, it didn’t.) Today, a message from the same address was sitting unread in Junk rather than sitting read in Trash. Any suggestions?

Chances are that Apple’s Mail server put it there. Rules only apply to your Inbox folder.

1 Like

Thanks, @alvarnell. Should I have mentioned that this is in a gmail account? Does that change your answer. (I don’t know if the Apple Mail client would interact with the Apple Mail server when downloading mail from gmail, but I guess it would surprise me.) Might the gmail server be putting it there?

If a server is putting it there, would marking the message as Not Junk train the server not to put the message in Junk, so the client could move the message from the Inbox to Trash?

For gmail, that does help train the spam detection. No guarantees that it will only take one message so moved from spam back to the inbox, but gmail does use that as an indicator going forward. (Honestly though I wonder if it might be better to use gmail on the web, go to the spam folder, and mark the message not spam there.)

Thanks. The few times I have used gmail in a browser, I have been surprised by the number of options available. Maybe I could implement my own rule at the web site to move the offending messages to the Trash before my client even downloads them.

Yes, I do have a few gmail filters set up (their version of rules) that are set to never send certain messages to spam.

Today, it didn’t. I had two messages that were moved to Trash (by two different rules, one for each message) and they were both unread. In case it matters, these messages were in a Google Mail account.