Mail Archiver can archive all emails or it can archive in a range of date or days. You can do the same with deleting emails. Either no emails are deleted/moved to the trash. Or you can set a range of dates or days. The deletion range can be different than the archiving range.
Here are 2 examples:
The emails from the last week are archived and emails older than a year are deleted/moved to the trash:
Emails from the year 2021 are archived and emails from 2019 are deleted/moved to the trash:
Important: Before emails are moved to the trash for email clients and deleted for IMAP accounts there is a check that the email is in the archive. The archive is NOT affected by moving emails to the trash for the email client/deleting emails from IMAP. In the archive you have to manually drag emails to the trash and empty the trash.
Update from 11-Apr-2021 with new information from version 6.