I want to set up multiple mail servers within one dedicated virtual server in Mediatemple.
For example, my server's primary ip address is 203.156.0.xx. My server has another IP address 203.156.0.yy. The server's outgoing mail server is 203.156.0.xx.
Currently, all domains regardless of which IP address they use have 203.156.0.xx as their mail server. Is it possible that the domains under 203.156.0.xx use 203.156.0.xx for their mail server and domains under 203.156.0.yy use 203.156.0.yy for their mail server?
Any advice will be appreciated.
Yes, just point the MX records for the respective domains to their respective mail servers.
While you can set up multiple IPs & domains and have mail sending through them, the (dv)'s configuration (and most servers) will handle all mail by default through one IP. Trying to set up multiple mail servers is very complicated & requires altering the core qmail configurations. I'm curious as to why you're wanting/needing to have this sort of set up? The best way to achieve something like this is to just set up a completely different server for the domain(s).
Multi-homed hosts are in the majority; it is straightforward to implement qmail or any other MTA to implement a system where a IPs and certificates are specific to a vdomain.
Qmail is not an elegant system nonetheless it can be retrofitted - there are some patches floating around.