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).


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 ./ 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 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.