How to make Apple Mail download only recent iCloud emails
Short answer: Apple Mail does not provide a supported setting to download only the last few months of messages from an iCloud Mail account.
The Download Attachments setting controls certain attachment types, not message retention. Images and PDFs may still download, and Mail continues synchronising messages.
Why all 15,101 messages appear
iCloud Mail is a server-synchronized account. Mail can synchronise message headers, cache message bodies, download attachments, and maintain local indexes.
The Download Attachments setting does not limit the number or age of messages synchronized. Setting it to None will not prevent Mail from downloading message content.
Older versions of Mail offered a “Keep copies of messages for offline viewing” option, but there is no equivalent supported age-based retention setting for current iCloud accounts.
Is there a hidden preference?
There is no documented or reliably verified preference that tells Apple Mail:
“Keep only the last 90 days locally, but leave older messages on iCloud.”
I would avoid Terminal commands or edits to Mail's preference files unless they have been tested on your exact macOS version. An undocumented preference may be ignored or stop working after an update.
Workarounds
1. Enable Optimize Storage
Check:
System Settings >> General >> Storage >> Optimize Storage
If available, this allows macOS to manage certain local content when storage is needed. It is not a strict age-based retention policy and does not guarantee that older messages will remain only in iCloud.
2. Create a Smart Mailbox for recent messages
In Mail:
- Choose Mailbox >> New Smart Mailbox.
- Name it “Recent Mail.”
- Set Date Received >> is within last >> 3 >> months.
- Save.
This provides a convenient recent-mail view, but it does not prevent older messages from synchronizing or being cached.
3. Rebuild a mailbox if storage is already excessive
Select the mailbox and choose Mailbox >> Rebuild.
This may help with corrupted indexes or search problems, but it is not a storage-retention feature. Mail may download the same content again.
Avoid manually deleting files from ~/Library/Mail/ or editing Mail's database.
4. Avoid moving old messages to On My Mac
Moving messages to local mailboxes removes them from iCloud. Since you want older messages to remain accessible on iCloud.com, this is not a suitable solution.
Recommendation
For your MacBook Pro running macOS Golden Gate 27.0.1:
- Set Download Attachments to None or Recent.
- Enable Optimize Storage if available.
- Create a Smart Mailbox for the last three months.
- Avoid undocumented preference edits and manual database deletion.
Bottom line: Apple Mail does not currently offer a supported, reliable way to enforce a local message-retention window for iCloud Mail. You can reduce attachment storage and use macOS storage optimization, but you cannot guarantee that only recent message bodies will be stored locally.
Apple documentation:
Change Account Information settings in Mail on Mac - Apple Support (CA)
Set up iCloud Mail on all your devices - Apple Support (CA)
Change Mailbox Behaviors settings in Mail on Mac - Apple Support (CA)