Mozilla Thunderbird

The idea is identical to my post Firefox databases VACUUM and REINDEX. For some time now, Debian has lost the rebranded versions of Mozilla products. When I migrated from Icedowe to Thunderbird, I thought about it, that I have not defragmented my database, and so far a serious amount of letters have leaked through my email client, email accounts and servers, users and passwords. The script is identical to the one from my previous post only with a slight modification for where to look for the files 🙂

Linux version

for db in $(find ~/.thunderbird/$(grep Path ~/.thunderbird/profiles.ini | cut -d'=' -f2) -maxdepth 1 -name "*.sqlite" -type f)
do
echo "VACUUM ${db}"
sqlite3 ${db} VACUUM
sqlite3 ${db} REINDEX
done

Mac os version

for db in $(find ~/Library/Thunderbird/$(grep Path ~/Library/Thunderbird/profiles.ini | cut -d'=' -f2)  -maxdepth 1  -name "*.sqlite" -type f)
do
echo "VACUUM && REINDEX ${db}"
sqlite3 "${db}" VACUUM;
sqlite3 "${db}" REINDEX;
done

Unlike Firefox's profile folder, Thunderbird's is in a pretty good way (without space) and no change to the delimiter is required.