ClamSMTP is an SMTP filter that allows you to check for
viruses using the ClamAV anti-virus software. It accepts
SMTP connections and forwards the SMTP commands and
responses to another SMTP server. The 'DATA' email body
is intercepted and scanned before forwarding.
It aims to be lightweight, reliable, and simple
rather than have a myriad of options. It's written in C
without major dependencies. If you need more options then
you could use something big like AMaViS which is written
in PERL and can do almost anything.
Written with the Postfix mail server in mind it can be
configured as a Postfix Content Filter. It can also
be used as a transparent proxy to filter an entire network's
SMTP traffic at the router.