Relyaing all inbound e-mail to your exchange server is the easy part. Simply add a mailertable entry to /etc/mail/mailertable:
Code:
mydomain.com esmtp:[exchange.mydomain.com]
-or-
mydomain.com esmtp:[192.168.1.10]
Take your pick.
As for running a filter program like spamassassin against each inbound e-mail (prior to relaying), checkout "sendmail milter" using your favorite search engine. There are many available.
Also, once you configure sendmail to use the mailertable feature, it will relay *all* e-mail for mydomain.com to your exchange server. This is great!, until an e-mail arrives with a bogus address. Your exchange server will bounce this e-mail back to what will probably be a bogus return address. So its queues get clogged. To fix this annoying problem you will also need to configure sendmail to check whether or not the e-mail/mailbox exists on your exchange server prior to relaying. This can be done in one of two ways:
1) Statically - add each e-mail address/mailbox on your exchange server to /etc/mail/access
2) Configure sendmail to issue an LDAP query against your exchange server to verify the e-mail address. Unfortunately, I don't have any examples of sendmail/LDAP, but if I remeber correctly, the sendmail site has some links on configuring sendmail to use LDAP.