Binary package “filtermail” in ubuntu noble

utility to filter incoming e-mail as accepted, spam, or ignored

 filtermail inspects received e-mail and uses a rule set to filter it into
 the standard mailbox, a spam-box or an ignore-box. It is intended to be
 used with Mail Transfer Agents (MTAs) that invoke a Local Delivery Agent
 (LDA) via a 'forward' file specifying a program to process incoming e-mail.
 .
 It is an alternative to procmail.