Relating to the issue with thunderbird and compacting this piece from help support might help.
How can I configure compaction?
menu, you can:
- disable automatic compaction (which is not recommended because your folders won't be regularly cleaned of deleted messages)
- change the compaction threshold (for instance if you deal with a large volume of messages, you may use a larger threshold)