I'm trying to route in and outgoing mail through sendmail (where mailscanner scans it for viruses and spam)
Incoming mail is then to be delivered to a exchange system, outgoing mail is originating from exchange aswell.

RedHat 8.0 system installed with default sendmail (8.12.5/8.12.5)
All configurations to sendmail done with Webmin 1.020
Sysadmin quite a novice with linux and sendmail

One domain (lets call it "mydomain.com")

Incoming mail delivered to sendmail.mydomain.com as it has the lowest MX for the mydomain.com
Sendmail.mydomain.com has exchange.mydomain.com as a "smart host" (I belive its called) and forwards all mail to it.
Exchange.mydomain.com delivers the mail to the recipient. Works fine.

Now for the problem...
I want exchange.mydomain.com to send all its mail to sendmail.mydomain.com for processing. I put sendmail.mydomain.com as a "smart host" in exchange.mydomain.com
This of course creates a loop for all outgoing mails as sendmail.mydomain.com forwards everything to exchange.mydomain.com etc etc.

I set up exchange.mydomain.com with the lowest MX for mydomain.com
The firewall denies anyone from outside my network access to it, mail gets forwarded to the higher MX which happens to be sendmail.mydomain.com
Sendmail.mydomain.com processes the mail, looks up the MX (no smart host defined) for mydomain.com and delivers it to exchange.mydomain.com (no firewall filter between the two)
Outgoing mail from exchange.mydomain.com is, through a "smart host" entry, forced to deliver its mail to sendmail.mydomain.com who then processes the mail and delivers it.

While setup2 works, it strikes me as a very crude and ugly way.

My ideal solution would look like this:
sendmail1.mydomain.com = MX preference = 10
sendmail2.mydomain.com = MX preference = 10
(only these visible in DNS, two machines for redundancy)

Incoming mail gets delivered to sendmail1 or 2, who processes it, looks up mydomain.com somewhere (not DNS) and delivers it to exchange.domain.com (or exchange2.domain.com if the first is unavailable, you get the idea)

Outgoing mail gets sent from exchange.mydomain.com to either sendmail-machine, who processes the mail and delivers it

Is it possible to make sendmail ignore the DNS MX for mydomain.com and enter your "own" MX for this domain?

If there is another, less obvious, solution I'm all for the aswell!