Shrink footprint of SpamSieve without losing rules

This is probably a question previously answered here, but my searching attempts have not uncovered exactly this – apologies if I missed it.

I’ve been using SpamSieve for well over a decade, first with Apple Mail, now with MailMate. It currently has a 1.9GB folder in ~/Library/Application support, and I am looking for ways to shrink this, without disrupting what it’s learned over the years. I’ve now set it to prune log entries after 30 days, but I guess that does nothing about stuff from the past, right?

About half of the bloat appears to be in the hidden folder ‘~/Library/Application Support/SpamSieve/Corpus.spamsieve-corpus/Messages.spamsieve-messages/V2/.Messages_SUPPORT/_EXTERNAL_DATA’ , which is almost 1GB in size.

Anything I can safely do to shrink things?

I doubt it. I thought this would matter to a lot of people, but only a few have ever asked about it.

The Prune full message data in log setting does make it delete the message data (i.e. the original source of the e-mail downloaded from your mail server) from the past (not all at once; it will prune it in batches after a bit of a delay in case you clicked the box by accident). This is the bulk of the data stored with the log entry. It does still keep the old log entries themselves. This includes metadata such as the sender, subject, and information about how SpamSieve analyzed the message.

If you want to delete whole log entries, you can do that by selecting them in the Log window and pressing Delete. This would remove those log entries from SpamSieve’s accuracy statistics and make it impossible to search for old log entries or correct old mistakes, but it would not affect the normal filtering of new messages. The training data for that is stored in the Rules and Words databases.

This folder is storing data from your SpamSieve 2.x corpus as well as the full message data for messages that you trained. (The message data for smaller messages is stored directly in the Messages.sqlite3 database file.) This is not actively used for filtering new messages, but it is useful for searching the corpus and may be used by future versions of SpamSieve if we improve the algorithms and want to extract better training data out of old messages.

I’m working on an auto-prune feature that would make it possible to reduce the size without (much) impact on those benefits.

If you need to free up space now, you could quit the app and delete the _EXTERNAL_DATA folder for the Messages. This would probably cause some minor inconsistencies in the user interface, i.e. it would allow you to try to open messages that aren’t stored but then report that the message is missing, but it’s safe and would not affect the current filtering accuracy.

3 Likes

Very helpful, thank you!