This can be accomplished by adding appropriate entries to the /etc/mail/mailertable file. This file allows you to specify a domain, and where you want all email for that domain sent to. In the example below, all email destined for mydomain.com will be automatically forwarded to a mail server that resolves to backend.mail.server. Additionally, all email received from the 192.0.0.0 network will be forwarded to a mail server that resolves to outbound.mail.server.
After your modifications to /etc/mail/mailertable are complete you will need to run the following command:
makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable
Then restart sendmail: service sendmail restart