You can be sure that old messages in the Spam and Trash folders won't take up too much disk space in your email account, as all emails are automatically deleted from these folders after 30 days.
If you wish to keep a message marked as spam for longer, or recover a deleted message, open it on Webmail, click on More, and choose to Move to any other inbox:
You can also delete emails from these folders manually at any time by selecting the message and clicking on the Delete button:
This will permanently delete the message from your email account.