archivemail is a tool for archiving and compressing old email in mailboxes. It moves messages older than the specified number of days to a separate mbox format mailbox that is compressed with gzip. It can also just delete old email rather than archive it.
Extracted automatically from Archivemail homepage
brew install archivemail
The following dependency will be installed if you install Archivemail: