Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
0
votes
0
answers
28
views
Automatically copy a message in Mail.app to a directory
If I drag an e-mail to a directory, Finder makes a copy, so that the message also remains in Mail.app. I would like to make this happen automagically when the mail matches certain criteria (for example, all messages from John.Doe@ISP.net). The criteria is easy, but the action not so much. The only t...
If I drag an e-mail to a directory, Finder makes a copy, so that the message also remains in Mail.app.
I would like to make this happen automagically when the mail matches certain criteria (for example, all messages from John.Doe@ISP.net).
The criteria is easy, but the action not so much.
The only thing on the action menu that seems like it might work is "Run Applescript" but I know nothing about Applescript.
In the "good old days", I'd use
procmail
but I suppose that's considered a dinosaur now even in the Linux world.
WGroleau
(5370 rep)
Jun 8, 2025, 03:55 AM
0
votes
0
answers
74
views
Mail Rules for Hide My Email?
How can I make a Rule in macOS Mail app (Version 16.0) to filter messages sent to any "Hide My Email" address?
How can I make a Rule in macOS Mail app (Version 16.0) to filter messages sent to any "Hide My Email" address?
5260452
(2188 rep)
Sep 16, 2024, 11:12 PM
• Last activity: Sep 17, 2024, 04:21 PM
40
votes
5
answers
114953
views
outlook: apply rule to past messages
I use outlook as client for an exchange server. I created several rules that are local to the mac (as opposed to server side rules), and I want to apply them for past messages. I can't find a way. - Even when I create the rule, I don't see any option to apply it to past messages. It would be fine al...
I use outlook as client for an exchange server.
I created several rules that are local to the mac (as opposed to server side rules), and I want to apply them for past messages.
I can't find a way. - Even when I create the rule, I don't see any option to apply it to past messages.
It would be fine also to be able to move several selected messages to a folder, but when I create a filter it seems also difficult!!!
If I select all messages in the filter, upon right click on one of them, the selection goes away (because of the message preview I think)
If I select multiple messages in Inbox, right click is working and I could move all of them, but I must perform multiple selection manually...
Is it that difficult on Outlook 2011 overs 14.3 ?
Glasnhost
(765 rep)
Jul 6, 2016, 11:45 AM
• Last activity: May 1, 2024, 01:29 PM
5
votes
1
answers
8599
views
What is the ‘has list-id containing’ iCloud Mail rule?
[ ][1] What is the “has list-id containing” drop down option mean, how do I use it, and what does it do? [1]: https://i.sstatic.net/UBNns.png

Jazzfess
(51 rep)
Mar 15, 2021, 09:13 PM
• Last activity: Apr 21, 2024, 10:03 PM
0
votes
0
answers
50
views
Where do emails go if a rule sends them to "No mailbox selected"
For some reason a Mail rule was unintentionally set to send emails to "No mailbox selected". This rule has been repaired; however, I do not know where those emails are now! **Does anyone know if there is a default folder or someplace emails are sent to if a rule sends them to "No mailbox selected"?*...
For some reason a Mail rule was unintentionally set to send emails to "No mailbox selected".
This rule has been repaired; however, I do not know where those emails are now!
**Does anyone know if there is a default folder or someplace emails are sent to if a rule sends them to "No mailbox selected"?**
Parapluie
(519 rep)
Feb 27, 2024, 01:15 AM
0
votes
0
answers
68
views
Mistake in writing rule; Mail trying to move all junk mail to inbox
Today I wrote a rule in Mail to move email of a certain address from Junk to Inbox. While writing I accidentally forgot to change *If any of the following conditions are met:* to *If **all** of the following conditions are met:*, and now it's trying to move all the junk mail to Inbox, even those tha...
Today I wrote a rule in Mail to move email of a certain address from Junk to Inbox. While writing I accidentally forgot to change *If any of the following conditions are met:* to *If **all** of the following conditions are met:*, and now it's trying to move all the junk mail to Inbox, even those that have already been moved or deleted which leads to a bombardment of errors. I quickly fixed the rule, but the bad one is still going. I also tried to restart the app as well as the laptop to no avail. What should I do?
Muctar Diaoune
(1 rep)
Jan 16, 2024, 11:00 PM
• Last activity: Jan 30, 2024, 07:27 PM
0
votes
0
answers
29
views
Mail App rules and iOS/iCloud clients
Suppose I configure a rule in the MacOS desktop mail App that puts messages from one sender into a special folder. I observe that this rule does not sync with the iCloud mail rules (which are also more limited), and I see that there are no rules at all supported in iOS. Therefore I assume that if my...
Suppose I configure a rule in the MacOS desktop mail App that puts messages from one sender into a special folder. I observe that this rule does not sync with the iCloud mail rules (which are also more limited), and I see that there are no rules at all supported in iOS. Therefore I assume that if my desktop computer is asleep the rule will have no effect on how an arriving message is treated.
What happens when I wake my desktop computer up? Will a previously-received message then be moved into the designated folder, with the same change now visible in the iOS and iCloud mail clients?
Similarly, what happens if the message arrives while my desktop computer is awake? Will the message be immediately into the designated folder, with the change immediately visible in the iOS and iCloud clients?
user515176
Jan 21, 2024, 09:06 PM
1
votes
1
answers
68
views
Reverting an inversion bug in Apple Mail Rules
Sometimes I observe a strange inversion bug in my incoming mails : the sender and title listed in my mailbox do not correspond to the content when I open the mail. Usually it is inverted with the mail before or after. When I open mail title A, I get content B. When I open mail titled B I get content...
Sometimes I observe a strange inversion bug in my incoming mails : the sender and title listed in my mailbox do not correspond to the content when I open the mail.
Usually it is inverted with the mail before or after. When I open mail title A, I get content B. When I open mail titled B I get content A.
Also, mail Title A, sender A appears with prefix B in the mail list. And conversely
This happens in mailboxes I use to automatically sort incoming mails.
I have quite a long legacy rules list (~40 rules, each doing 10 to 50 tests) to handle my incoming mails, dating back decades. There must be a bug in how Apple executes the rules there.
I have little hope to fix the inversion bug, but maybe there is a way to exchange the content of inverted mails when the bug has been observed ?
PS: OS is Monterey 12.7.1, language is French, on Intel i9 8cores; this has happened for years, frequency is quite rare, maybe 1 in 1000 messages. It is not linked to the sender, mails substituted have no relation whatsoever, except for the mailbox where they are sorted to.
Hugues
(653 rep)
Nov 12, 2023, 06:43 PM
• Last activity: Nov 13, 2023, 06:27 PM
2
votes
2
answers
950
views
Why doesn't Apple Mail let me move a message when viewing it in a Smart Mailbox?
I use Apple Mail as an IMAP client for my Gmail account. I have a few Smart Mailboxes that I use regularly, e.g. "Today", "Yesterday", etc. If I'm browsing the contents of a smart mailbox and mark a message read / unread or delete it, the change is immediately visible in the smart mailbox and also i...
I use Apple Mail as an IMAP client for my Gmail account. I have a few Smart Mailboxes that I use regularly, e.g. "Today", "Yesterday", etc.
If I'm browsing the contents of a smart mailbox and mark a message read / unread or delete it, the change is immediately visible in the smart mailbox and also in the original folder.
But if I try to move a message to a folder while browsing in a smart mailbox, it has no effect. The message briefly disappears from the smart mailbox, and then immediately reappears. It remains in the original folder, as if the move had no effect.
I thought this was just an unfortunate limitation of smart mailboxes, but then I found this quote in [Apple help](https://support.apple.com/guide/mail/use-smart-mailboxes-mlhlp1190/mac) :
> If you change an email while viewing it in a Smart Mailbox—such as marking the email as read or unread, or **moving** or deleting it—the change is reflected in the mailbox where the email is stored.
So what's going on? Is there a setting I need to adjust to get this to work? Is it a limitation of using Apple with Gmail / GSuite accounts?
Or, is there a workaround for this? Some way to jump to a message in its original folder, so I can move it from there?

Bill
(442 rep)
Jul 21, 2023, 12:25 PM
• Last activity: Oct 14, 2023, 11:42 PM
2
votes
2
answers
1156
views
How do you set a rule to move sent items in Mail?
I've got a rule set in my Apple Mail app to move email older than 90 days out of my inbox to a separate local mailbox (to free up some space on my server – I use imap). My inbox rule is If [all] of the following conditions are met: Account [My Main Account] Date Received / Is Greater Than / 90 days...
I've got a rule set in my Apple Mail app to move email older than 90 days out of my inbox to a separate local mailbox (to free up some space on my server – I use imap).
My inbox rule is
If [all] of the following conditions are met:
Account [My Main Account]
Date Received / Is Greater Than / 90 days
Perform the following action
Move Message to mailbox: [My Local Backup Mailbox]
That works well, but I want to do the same for sent items.
I can't see any rule options that affect the Sent items folder (or any other specific mailbox for that matter)
Any idea?
I'm on El Capitan 10.11.6
Ben
(295 rep)
Oct 18, 2016, 04:32 AM
• Last activity: Sep 8, 2023, 03:23 AM
0
votes
0
answers
136
views
Custom actions to filter junk mail arriving in Junk mailbox aren't executed
I receive a lot of junk mail that is sent to hms92@mac.com. I’ve found that I can set up a rule based on the Original-Recipient header that matches with “rfc822:hms92@mac.com” to delete most of these emails. This rule works perfectly when invoked manually. What I would like to do is have these email...
I receive a lot of junk mail that is sent to hms92@mac.com. I’ve found that I can set up a rule based on the Original-Recipient header that matches with “rfc822:hms92@mac.com” to delete most of these emails. This rule works perfectly when invoked manually.
What I would like to do is have these emails sent to the trash *before* they arrive in my Junk folder. This should be possible, because according to Mail > Settings > Junk Mail, if I set up a custom action with this rule (and with the setting checked “Filter junk mail before applying my rules”), I would expect the very same rule configured as a custom action to do this.
However, it doesn’t work. The spam with this Original-Recipient header “rfc822:hms92@mac.com” arrives normally in my Junk folder without being sent to the Trash or deleted.
Do custom actions work for anyone? I've filed FB12213605 with Apple.
odysseus
(1025 rep)
May 31, 2023, 03:52 PM
0
votes
1
answers
671
views
Setting Mail app rules when using gmail account AND iCloud account
I'm having a problem. I recently subscribed to a *daily newsletter* of the MIT. Added to that I have some other newletters from news websites. Resulting in an average of 10-20 Mail messages per day. I want to set up mail rules for Mail on iPad. I have a quite specific account configuration on Mail,...
I'm having a problem. I recently subscribed to a *daily newsletter* of the MIT. Added to that I have some other newletters from news websites.
Resulting in an average of 10-20 Mail messages per day. I want to set up mail rules for Mail on iPad.
I have a quite specific account configuration on Mail, I have one gmail account which is the one concerned with the newletters and one iCloud one on which I get an email every 3 years (not really but I got about 1-2 emails since 2019).
I have tried **going to gmail.com** to add rules for incoming emails, but, ***it doesn't work***, I added the rules, seemed alright, it showed the emails in question when searching for what I wanted (ex. Searching for subject containing "MIT", it shows all the newletter emails I have received including the most recent ones). But it doesn't seem to work at all, not even on the gmail.com website.
I have also tried **modifying Mail rules on icloud.com**, following tutorials I've found. I don't know if this worked because I haven't received emails on iCloud for a year or so. And I don't think setting Mail rules for iCloud will be useful since I haven't subscribed to newsletters on it.
That's quite a big problem because I need to spend time each day to sort manually all the newsletters in separate mailboxes and if I don't do this, the emails will accumulate and saturate my inbox and I will need to spend a lot of time searching for important emails. I read my newsletters about every weekend but haven't found a way to send all of them directly on Saturday for example (setting up in websites that are originating newsletters), but that's not the problem.
My question : **How to set Mail rules for Mail app (iPad) when connected to two accounts, one gmail receiving tons of newsletters and one iCloud receiving very few emails?**
*Note: I am on iPad 6th generation running iPadOS 16.2*
**Edit** : The gmail rules I've set (all of them are using the same parameters except the one for wordoftheday@vocabulary.com which is using the sender) :
When clicking on "edit" for "MIT" :
(Click on the images to open fullscreen (better resolution))


Thinkr
(4062 rep)
Mar 25, 2023, 10:31 AM
• Last activity: Mar 28, 2023, 11:01 PM
2
votes
1
answers
409
views
Script to run Apple Inbox Rules
**Note:** I am *not* asking how to create a rule which runs an Applescript. I want to go the other way around: run a script that will apply existing rules to all the messages in the inbox. That is, simulate 1. Select Inbox 2. Select All messages 3. Menu Message/Apply Inbox Rules I have ActOn rules t...
**Note:** I am *not* asking how to create a rule which runs an Applescript. I want to go the other way around: run a script that will apply existing rules to all the messages in the inbox. That is, simulate
1. Select Inbox
2. Select All messages
3. Menu Message/Apply Inbox Rules
I have ActOn rules that purge certain old messages, and I'd like a script I can set to run, say, nightly.
**EDIT:** My Google search turns up only people doing this by hand or with Keyboard Maestro . Rather discourgingly, I don't see any verb exposed in the Apple Mail script dictionary to run the rules, only to make or edit them. (See screenshots.)
Is this really so difficult?


Andrew Lazarus
(626 rep)
Feb 17, 2023, 07:05 AM
• Last activity: Feb 18, 2023, 02:49 PM
13
votes
6
answers
13828
views
Where are Mail.app rules stored? They got deleted and I want to restore them
Since Mail.app had trouble connecting to the various accounts, I tried to 'reset' it by removing all accounts and the stored passwords in Keychain Access.app. Then I re-added all the mail accounts. However, for some reason all configured **rules** were deleted too, even though they are not directly...
Since Mail.app had trouble connecting to the various accounts, I tried to 'reset' it by removing all accounts and the stored passwords in Keychain Access.app. Then I re-added all the mail accounts.
However, for some reason all configured **rules** were deleted too, even though they are not directly tied to a specific mail account.
### Where are these rules stored so that I can restore them from a time machine backup?

gentmatt
(50540 rep)
Mar 3, 2013, 08:25 AM
• Last activity: Jan 18, 2023, 10:31 AM
1
votes
0
answers
43
views
Mail rule to move messages with all-capital subject to Junk
I would like to create a rule on Mail that automatically moves any new e-mail message to the Junk folder if the subject contains all capital letters. I do not think that thanks to the Mail Rules it is possible to do that, but I am aware that it is possible to run an AppleScript for every new message...
I would like to create a rule on Mail that automatically moves any new e-mail message to the Junk folder if the subject contains all capital letters.
I do not think that thanks to the Mail Rules it is possible to do that, but I am aware that it is possible to run an AppleScript for every new message (see screenshot below).
Since I am not an expert with AppleScript, I was wondering whether it is possible to trigger an AppleScript that checks for any newly-arrived e-mail message subject and, if all uppercase, moves it to the Junk folder of the e-mail address.

AlessioX
(1324 rep)
Nov 26, 2022, 11:53 AM
4
votes
0
answers
505
views
Can't forward emails using rules in Mail.app
None of my Mail.app rules seem to be working to forward any emails even though they are working normally for other things: moving into folders, marking as read, etc. I'm using macOS Big Sur Version 11.6.2. Here's an example of a simple test rule that isn't working: [![enter image description here][1...
None of my Mail.app rules seem to be working to forward any emails even though they are working normally for other things: moving into folders, marking as read, etc. I'm using macOS Big Sur Version 11.6.2.
Here's an example of a simple test rule that isn't working:
When I receive a test email with that wording in the subject, nothing seems to happen. The email lands in my inbox but I don't see anything that indicates anything was forwarded, in the sent folder or otherwise. This seems to be the same behavior as found on this unresolved Apple discussions thread .
Here's what I've tried to resolve this so far:
1. Varied **any** and **all** in the if statement.
1. Used **Redirect Message** instead of **Forward Message**.
1. Added in an **Every message** condition.
1. Made sure there there were no **Stop evaluating rules** actions before this rule (by making it the first rule).
None of the above works. How to get it working?

Vincent
(827 rep)
Feb 11, 2022, 02:00 AM
• Last activity: Nov 23, 2022, 10:02 PM
19
votes
3
answers
1728
views
Set "Load remote content in messages" per sender?
In the `Mail` setting (under Viewing) tab, there is a option `Load remote content in messages` which I **unchecked**, so for each email that contains remote content, I need to click the `Load remote content` button. Is there anyway of a setting (probably not) or plugin that does this automatically f...
In the
Mail
setting (under Viewing) tab, there is a option Load remote content in messages
which I **unchecked**, so for each email that contains remote content, I need to click the Load remote content
button.
Is there anyway of a setting (probably not) or plugin that does this automatically for senders you would approve?
Roger
(1200 rep)
Mar 6, 2018, 02:10 PM
• Last activity: Nov 2, 2022, 01:10 AM
1
votes
0
answers
277
views
I am trying to create a script with a keyboard shortcut that will move the selected message in Mail to a specific folder
I have certain emails that come in from various sources, and I need to file them away for future reference. Yes, I can drag and drop it into the folder, but I would like to create a keyboard shortcut to do this more easily. This is my first attempt at Apple Scripts/Script editor. Here is the code I...
I have certain emails that come in from various sources, and I need to file them away for future reference. Yes, I can drag and drop it into the folder, but I would like to create a keyboard shortcut to do this more easily.
This is my first attempt at Apple Scripts/Script editor. Here is the code I pieced together from several google searches to move the selected email. The end result is error "" number -1721.
Running MacBook Pro (13 inch, M1)
MacOS: Monterey 12.6
Mail: 16.0
Script Editor: 2.11 (227) AppleScript 2.8
Any suggestions and ideas are welcome.
Thanks in advance!
on run {input, parameters}
set target_account to "Gmail"
set target_mailbox to "Inbox/Jobs"
tell application "Mail"
set theSelectedMessage to selection
tell application "Mail"
move the theMessage to mailbox target_mailbox of account target_account
end tell
end tell
return input
end run
Kyddrivers
(11 rep)
Sep 27, 2022, 03:26 PM
2
votes
1
answers
1082
views
Apple Mail rule that combines "all" and "any"
I would like to create a rule for Apple Mail that combines "all" and "any". Specifically, I need to do a rule where I have a group of "any" criteria, "Message content contains X" OR "Message content contains Y" (and potentially some more ...) but I would like this to only apply to one of my email ac...
I would like to create a rule for Apple Mail that combines "all" and "any".
Specifically, I need to do a rule where I have a group of "any" criteria, "Message content contains X" OR "Message content contains Y" (and potentially some more ...) but I would like this to only apply to one of my email accounts, so the condition "Account is iCloud" must always be met. Somehow along those lines
In the Rules
I could, of course, create multiple "all"-rules and have them perform the following action, but that is cumbersome. Any suggestions?
**EDIT:**
The action I would want to attach is to move the matching messages to a designated "On my Mac" mailbox/folder and at the same time moving them to the IMAP trash so they'll get deleted from the server.

jan
(842 rep)
Apr 20, 2019, 08:25 AM
• Last activity: May 15, 2022, 11:05 PM
1
votes
0
answers
84
views
Why does an email rule testing for "<>" in header "Return-Path" not work?
I found that a good fraction of unwanted emails have the header "Return-Path" equal to " ", so I thought that I could have an email rule to test for this and then move the email to a junk folder. However, this rule does not work. As a test--for one such email--I looked for another header that had a...
I found that a good fraction of unwanted emails have the header "Return-Path" equal to "", so I thought that I could have an email rule to test for this and then move the email to a junk folder. However, this rule does not work.
As a test--for one such email--I looked for another header that had a short value. In that case email header "X-Originatororg" had the value "norcalasa.org", so I added a test for that value, which moved the email to junk. That test worked.
What am I not understanding?
I am using a MacBook Air 2017 running MacOS Big Sur 11.6, with Mail version 14.
Alan Wehmann
(121 rep)
May 2, 2022, 09:41 AM
Showing page 1 of 20 total questions