in reply to Email filtering
I use mailscanner on all of my incoming mail. Mailscanner uses Mail::SpamAssassin, which does precisely the sort of thing you're looking for, and supplements it with things like RBL and Vipul's Razor. (These are both ways of detecting spam by checking against known spam-senders and known spams out there.) Mailscanner is written in Perl, and is very actively supported. It also will scan your incoming e-mail for viruses, which is a big help.
I've been running this setup for about three months, and I've found it works very well. I use fetchmail to download my mail to my internal mailserver (an old Pentium Pro machine), then scan everything with mailscanner. (I also pipe my outgoing mail through mailscanner... if I get a virus through some other means, I will infect no one else.) I use procmail to sort my mail into different folders, including a Spam directory for all autodetected spam. Then I access this from my desktop machine over IMAP.
As for the best way to run a firewall and mail services on the same machine-- the various Linux howtos I read indicated that this was a Bad Thing To Do. I'm not an expert on the subject, though. Is there a LinuxMonks out there?