You need to set cron job first cpanel >> cronjob and add the following command to run in cron.
/usr/bin/archivemail –quiet –delete –days 90 /home/{USER}/mail/inbox
This command will delete the 90 days old emails.
Note: Make sure to replace {USER} with actual cPanel account Username