GNOME Bugzilla – Bug 766581
Geary clean up database and attachements over time
Last modified: 2019-06-02 10:10:05 UTC
In geary we have an option for how far back we would like messages to be retrieved per account, however once a message is downloaded it seems to reside on the system even when it falls outside of the pre-defined range. Which means that the pre-defined range only really applies to initially setting up the account. Now, I could be wrong, but I initially set my Gmail account to retrieve "everything", which left it's footprint on my system to be about 3.7GB. Now, if I go in after it has fully synced and set it to "2 weeks" (as is the default), no messages are purged from my database nor attachments deleted from the system. Instead, the footprint stays at 3.7GB. Perhaps the functionality of this option could be improved to have some sort of a pruning-over-time aspect, such that over years of use the database size doesn't grow to unwieldy proportions. Unless, of course, the user specifies "everything", in which case it would disable any pruning of the database. Further, this same cleaning/pruning should apply to attachments as well. (though attachments perhaps should not be auto downloaded, see bug 714094)
It would be good to get a survey of how other common clients handle this (TB, Outlook, OSX Mail, KMail, Evo, etc) - do any periodically delete attachments over time? IIRC Thunderbird lets you delete attachments manually, but that's pretty onerous. Perhaps a LRU cache for attachments would be the way to go, but then we need to make sure that people who want them all downloaded and permanently kept are also accounted for. Between this and Bug 714094, the per-account pref could be something like: > Attachments: > > (o) Automatically download and keep all > ( ) Automatically download and keep recently used > ( ) Manually download and keep
After thinking about this a bit, if Bug 714094 or something similar was fixed, then we could just automatically download attachments for recent messages and/or as needed, just use a LRU cache here.
*** Bug 714101 has been marked as a duplicate of this bug. ***
Closing this in favour of https://gitlab.gnome.org/GNOME/geary/issues/453