Configure a second MX server to relay mail to the first one

Hi,

I would like to have a setup with 2 MX server to ensure that I can receive mails if the main server is inaccessible for some reason. How can I achieve that with axigen? I wasn’t able to find a documentation for this.

My domain will have 2 MX records:

The mainMX. will be with the main instance of axigen.

The secondMX. should only relay the received mails to mainMX. . Nothing more. I don’t need IMAP, POP3, WebMail and etc. on the second instance. It will be used only to receive mails and redirect them to the main server without saving them.

Thanks!

Hello,

You are right, we do not have a specific documentation related to this setup.

In the first place, may I ask you the reason you like to implement it? I mean, why do you like to handle messages on your secondary (backup) SMTP gateway instead of leaving the messages that could not be delivered into the queues of the sender’s mail servers?

I understand that you may have devices (like printers/scanners) that may deliver messages without authentication and those messages may be lost. In my opinion, for such situations, you may use a cluster setup (where you are using multiple active FrontEnd nodes) instead of using the setup you have described above.

Also I have found this quite old resource discussing the possible negative aspects of using a decoupled backup MX gateway.

HTH,
Ioan

Hi Ioan,

Thank you for the reply. Apologies for not replying earlier, however there was a bug in the community forum and I was not able to log in. I am glad that the bug has ben fixed :slight_smile:

I found the solution.

The reason I want such setup is, because my main mail server is self-hosted on my network and does not have a good IP as it is coming from a non business ISP and does not have R-DNS. For that reason I created another mail server on DigitalOcean, which I use only for sending mails and for redundancy. The redundancy is when my main mail server is down, the second mail server to get all my mail and then relay it when the main server is up again.

For anyone else, who wants a similar setup, here is the solution I made.

In the secondary mail server go to Acceptance & RoutingADVANCED SETTINGS and create a new rule (Add Acceptance / Routing Rule)
For Conditions add Recipient Domain is yourdomain.com.
For Actions add Relay host to smtp.yourdomain.com.

The condition clause is telling the secondary mail server to relay any mail addressed to yourdomain. com and to send it to the main mail server (smtp.yourdomain. com).

With such setup you don’t need any accounts on the secondary mail server. It will act as a relay only.

Regarding the question why I don’t leave the sender’s mail server to resend the mail when my primary mail server is up, first I don’t want the sender to receive NDR (notification for temporary non delivery) and second I want to receive all queued mail the moment the main server is up again. This I can do from the queue from my second mail server. The sender’s mail server will probably try the next retry in several hours, which is not ideal for me.

1 Like