Due to the lack of specifics in the question, this will be a generic overview of how this is done.
- Mail will be sent to the servers listed in the MX record of the domain.
- This server will be a Message Transfer Agent (MTA) that is a Smart Host.
- This MTA will then check the recipients against an internal list of where the recipients specific mailboxes reside.
- This MTA will then relay the incoming message to the internal MTAs where its list says to forward them.
- The second MTA will recieve the message from the first MTA and forward as needed. If the recipient is local to that MTA, it will forward it to the Mail Delivery Agent for storage in the actual mailbox.
To answer your question of, "Is it possible to filter e-mail to different IP addresses based on the recipients address." the answer is a qualified "yes". All mail will be delivered to the mail-servers listed in the MX record. Those servers then deliver the email based on routing policies.
For a specific example, if you have one group of users in Postfix on a VPS somewhere and another group of users in Google Apps, you will have to list your own MTA server (probably the Postfix server in this case) as the server in the MX record. Those servers will then provide the custom routing you're looking for.
The biggest hazard of this approach is that it makes spam-filtering harder. The most effective spam-filtering technique these days is IP reputation, and for that you need to be the first hop in the mail-chain. In this case it would be your MTA server, which means you need to put your best anti-spam software on that first server. Servers further down the relay chain have to rely on less robust lexical scanning.