Q:

SMTP relay for multiple subdomains

here is my situation:
I have a few subdomains: x1.example.com, x2.example.com.. IP adresses for these subdomains in local network : 192.168.1.1, 192.168.1.2.. They are not reachable from internet.
I want all the emails for these subdomains to be sended first to the one other subdomain like relay.example.com which is reachable from internet (it has external ip like 213.x.x.x), and then it will relay mails to the right subdomains.As I understand I should specify MX records like this:
X1.example.com     mx     10   relay.example.com
X2.example.com     mx     10   relay.example.com
…

So I will have multiple smtp servers attached to the one external ip, Is it normal?
But my main question is as follows: When smtp session is established, server sends something like:
220 relay.example.com Glad to see you!

But client is sending email , for example, to the somebody@x1.example.com .  So domain in the server's 220 response (relay.example.com) doesn't equal to the destination domain (x1.example.com), how will client react?

A:

So I will have multiple smtp servers attached to the one external ip, Is it normal?

No, you have only one smtp server that is reponsible for the mail of multiple hosts. This is perfectly normal. The MX ("Mail eXchange") record only states "To send mail for x1.example.com, please contact relay.example.com.

But client is sending email , for example, to the somebody@x1.example.com . So domain in the server's 220 response (relay.example.com) doesn't equal to the destination domain (x1.example.com), how will client react?

The client will expect this to happen as your MX record explicitly told him to contact relay.example.com to send mails for x1.example.com and he will happily drop off his message.

