i use sendmail with Cyrus-imapd installed as the local delivery agent. This combined with Clamav+Spamassassin running in the Sendmail Queue , to do this you will need spamass-milter and clamav-milter. This will scan the mail before it is delivered to the inbox. You don't necessarily need to use Cyrus-imapd, as it is Sendmails feature that you are implementing the scanning mail in the Queue. Combined with a Blacklists such as spamhaus and spamcop, you will see many rejects in your maillog
heres an example of the configuration needed in your /etc/mail/sendmail.mc
dnl # ANTI-VIRUS CLAMD , CLAMAV-MILTER CONNECT LOCAL SOCKET
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')
INPUT_MAIL_FILTER(`clamav', `S=local:/var/clamav/clmilter.sock, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `spamassassin,clamav')dnl
dnl # Abuse-lists
FEATURE(`dnsbl', `list.dsbl.org', `"550 Mail from " $`'&{client_addr} " refused - see
http://dsbl.org/"')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"550 Mail from " $`'&{client_addr} " refused - see
http://spamcop.net/bl.shtml"')dnl
FEATURE(`dnsbl', `sbl-xbl.spamhaus.org', `"550 Mail from " $`'&{client_addr} " refused - see
http://www.spamhaus.org/SBL"')dnl
Make sure of course when you install spamass-milter and clamav-milter that they have correct local socket, that your sendmail.mc points to the proper socket or else they will be bi-passed and no scanning will be done. I have set Spamassassin to run as a non-priviledged user, although i see documentation mentioning otherwise. It is important that the user, who run spamassin, have access to ~/.spamassassin as it will attempt to find the user you are sending mail to.