You can find part of your answer here:
http://taksuyama.com/?page_id=20
Ignore the Debian Etch part - the rest should work on any distro. Might have to tweak some paths, but it's all basically the same.
Email content filtering is another beast. Do you mean anti-virus or do you mean actual content filtering, as with Dan's Guardian?
Another possibility is Untangle. I haven't explored it much, but it's worth taking a look.
http://www.untangle.com/