Binary package “filter” in ubuntu trusty

A program that filters local email via forward/pipe

 filter is one of the original mail filtering programs written for UNIX.
 (originally a part of the 'elm' mailer)
 Install it via a pipe(|) reference in $HOME/.forward, and let it
 separate your incoming email into different personal mailboxes.