Compacting your mailboxes
When you compact a mailbox, your e-mail client (Thunderbird, Apple Mail, Eudora, etc.) deletes mail messages that were hidden after they were moved or deleted, but were never cleared off the mail server from that original location. Compacting your mailboxes should be done regularly to ensure optimum performance and to reduce space used on the server, which may be useful if you are experiencing problems related to e-mail quota.
To compact mailboxes in Thunderbird go to File > Compact Folders.
To have Thunderbird compact your mailboxes automatically go to Tools' > Options> Advanced > Network & Disk Space > Disk Space > Compact folder when it will save over 100 kB > OK.
If you would like Thunderbird to automatically compact folders every time you exit Thunderbird you can go to Tools > Account Settings > [account name] Server Settings, check Clean up ('Expunge') Inbox on Exit. You may also choose to select Empty Trash on Exit to compact your trash folder. Warning, doing this will cause the data in your trash folder to become unrecoverable.
Compacting your mailboxes in Apple Mail depends on the configuration of your Trash folder. If your mail goes to the Trash mailbox when you delete them then you do not need to do anything extra to delete messages off the server. After clearing the trash, deleted messages are permanently erased after one week by default.
These settings can be changed in the account options under Mail > Preferences. Then under the Accounts tab you find options regarding Trash in the lower part of the window. If Move deleted messaged to the Trash mailbox is unchecked then clicked Advanced in the top of the accounts window and make sure the Compact mailboxes automatically is checked
If you are using only webmail as your e-mail client you will not need to do anything extra regarding compacting mailboxes.