Install sortmail by entering the following commands in the terminal:
sudo apt update sudo apt install sortmail
Description:
simple mail sorter
sortmail is a simple mail sorter you can use in your .forward to sort your mail into folders automatically, delete unwanted mail, etc.
Homepage: http://sortmail.sourceforge.net/
Version: 1:2.4-3
Section: universe/mail