One domain and multiple mail servers
I would like two email servers with one domain.
How to handle it? Is it possible to do this in easy way?
I'll describe what I would like to achieve.
I have a domain called domain.com I have a normal mail server, my own, called MAIL1, which can receive and send email (I use poste.io as mail server). This mail server use for standard mails like [email protected], [email protected] etc. This mail server is configured to use A (mail.domain.com) and MX record (MX shows on "mail.domain.com" value).
For now, I would like to create a second mail server (called MAIL2) on a different host and IP address. This mail server I would like to use as server for clients like [email protected], [email protected].
How to configure this case?
The perfect solution is possible to receive and send emails from both servers, but good enough for me is to receive and send email from MAIL1 and only receive email on MAIL2 (I will not send emails from MAIL2).
This depends on what mail server software do you use. You have to configure the MTA on your MAIL1 server so that it forwards messages for selected recipients to MAIL2 server. It also depends on how many these addresses you have. If you have only a few, you can eg. set up an alias for any of these addresses that just redirects mail to MAIL2. For a large number of addresses, you need to set up some general rules and maybe use custom transports (this is how Postfix calls it; other MTAs may use completely different language). Usually there are multiple methods of achieving that, each of them has its pros and cons. It's best to ask on a forum/mailing list that is dedicated to the particular MTA software you are using - and doing this, provide more details on your configuration etc.