James,
It is under Account Settings, click around Advanced Settings and look for Leave messages on Server for xxx days. That is Outlook, but Thunderbird is similar. Email goes through the servers anyway, so this isn't any more or less secure than not doing it.