FYI, CNAMEs are prohibited in MX records, according to RFC1912 2.4, and RFC2181 10.3.
From: sylikc [mailto:sylikc at gmail dot com]
So, assuming you are serving your own DNS, add a priority 5 entry in
your MX record for @domain_A.com to CNAME mail.server_A.com and do the
same for @domain_B.com -> mail.server_B.com
So, as a recap, add MX records with CNAMEs that will resolve to
external IP from outside and internal IP from inside. Your servers
are the ones that will actually be "sending" the mail, so those are
the ones that need the correct DNS resolution.
The information in this e-mail and any files transmitted with it is confidential
and may be legally privileged. It is intended solely for the addressee and
others authorised to receive it. If you are not the intended recipient, any
disclosure, copying, distribution or action taken in reliance on its contents
is prohibited and may be unlawful.
The opinions expressed in this message are that of the sender and not
necessarily those of Aaland Limited. If you have received this e-mail in
error please notify postmaster at aaland dot co dot uk