POPFile is an tool to classify email with a Naive Bayes classifier, a POP3 proxy and a web interface. It runs on most platforms and with most email clients. It's not only useful to filter spam, but also to sort legitimate mail into different folders. POPFile can be trained to recognize and sort mails even when no regular mail rules based on header can be made. POPFile can be used also for IMAP. It will move messages into folders and re-classify mails after they have been moved.