Mail storage settings (download number of days, all mail, etc.)

A number of users (at least 14) have requested the ability to specify how much mail to store, up to all mail. Right now, this is only for the last three months, except for Spam and Trash.

hyviquel provides a major use-case for this:

I often use my laptop without internet access and there is a lot of information/documents stored in my mailbox.

This is an important enough issue that some users (including me!) have to use additional mail clients besides Mailspring just to patch this behavior. Most other popular email clients also expose this setting.

Logistically, this may be low-hanging fruit: one configuration setting, replacing the hard-coded three-months with that setting, and adding the option to the interface. There seems to be enough common use cases to justify the addition to Preference.

(Side note, would it be worth making this a per-account setting?)


Related Issues:

@bengotow Can I get a pointer where the ā€œ3 monthā€ configuration ([Feature Request] Mail storage settings (download number of days, all mail, etc.) Ā· Issue #473 Ā· Foundry376/Mailspring Ā· GitHub) is hardcoded? Then I would give this a shot. Unfortunately, I was not able to find this in the code.

1 Like

I’m sure they’ve already found it but in case someone else is curious: It’s maxAgeForBodySync in the SyncWorker of Mailspring-Sync (As seen here).

2 Likes

Brilliant! Thanks @westonmyers. No, I don’t think it had been found yet. Heads up, @Phylu.

1 Like

@westonmyers Thanks for the hint!

@CodeMouse92 I will going to work on this issue for now as this needs to be resolved in the Mailspring-Sync engine. This is nothing that I currently plan to familiarize myself with.

For building, is it as simple as ./build.sh? I’m on Pop OS. Thinking about giving this a large number like return 24 * 60 * 60 * 240 * 3; (20 years). Not sure if the output mailsync binary is a drop in replacement though? I don’t want to have to reconfigure and resync the last 3 months.

It is ā€œas simpleā€ as that, yes. Unfortunately, it also doesn’t build on Linux outside of Ubuntu 16.04 very reliably. I’m trying to fix that build system, although it’s been hard finding the time.

I mean, at least the ā€œStarredā€ messages should go back no? There’s quite important information there that goes back way more than 3 months, but the entire folder doesn’t even reach 100 emails. Seems like a no-brainer to have a quantity OR time limitations per folder no?

I would pay for the subscription if search were properly implemented - I want advanced search functionality (all emails, fast, AND/OR, wildcards etc). I have found no other email client that does this for macOS.

1 Like

+1 for being configurable per Account.

Some Accounts would need download of all E-Mail, some would need to download ā€˜starred/marked’ ones, some some would be great to have 300 and for some to have the last three Months :wink:

Thanks in advance.

1 Like

Why is this feature a MUST HAVE? Because without it I am also unable to search my mailbox!!! How do you think (maybe hope?) people will migrate to Mailspring if you dont allow them to search through their mailbox? Well, you do allow that, but only for 3 months back… Maybe, because you have Mailspring for all the time, you dont have problem with that. But without downloading all the mails and being able to search through it, migrating to Mailspring is extremely painful, for some maybe a dealbraker. Cmon, we live in 2025, we have years and years of e-mails to search through every now and then and you give us only 3 months and no way to change that :person_facepalming: I don’t need that option in visual settings, i can edit some config file, just let us download all the mail localy somehow and index it then!