Questions about setting up a backup email server

Hello everyone,

Trying to set up a backup email server and am a bit confused…here’s some background:

Setup: SERVER A is a mail server using iredmail and serves 4 domains:

  1. - main domain for iredmail (not sure what the official name for this account is but it’s the one I used to set up the server initially)
  2. - add-on domain
  3. - add-on domain
  4. - add-on domain

I have another server, SERVER B, that hosts the websites for the domains listed above using CyberPanel.

Here’s my goal: To set up a back-up email server on SERVER B.

I already have Postfix running on SERVER B (I think it was set up when CyberPanel was installed)

I read through the excellent tutorial by Linuxbabe but given that I have multiple domains am confused on how to set up the mx records and edit the file.


  1. Do I set all the mx records for each domain to point to and then it will deliver to the subdomains? Or… do I set each DNS mx record to go to its respective mx2 domain (ie.
  2. How do I configure the file for myhostname and mydestination?
  3. I have an entry in the file for relay host =…do I need to change that?

Thanks for taking the time to read this long-winded email…thanks in advance for your assistance!


  1. both options are fine.
  2. Choose whatever hostname you like, as long as it has A record and the PTR record resolves back to the hostname. You don’t need to edit the mydestination paramter.
  3. That’s why I don’t recommend mixing up different roles on one server. Your server B is configured to relay emails to server A for the websites to send emails. It’s not a good practice to use it as a backup SMTP server. I never do so. It probably can work if you try to figure it out by yourself.
1 Like