You should use procmail.
On the PCN mail server, procmail is used as the local delivery agent, and is run every time a message is delivered to you. To filter, just create a file named .procmailrc in your home directory, and place the rules you want procmail to follow in there.
-------
Please visit the source wiki page for the rest of this article.
