POPFile is a tool to classify your E-Mails [1]. It runs as proxy server, which enables you to still use your favourite E-Mail client. POPFile is written in Perl. Behind a firewall one needs to enable Perl to have access to the network. POPFIle is welldocumented and offers a userforum for individual questions.
[1] http://popfile.sf.net