Clarification on MTA "Mirroring"

Discussion in 'Installation/Configuration' started by thewoj, Jan 22, 2024.

  1. thewoj

    thewoj New Member

    Can someone either explain or point me to documentation of what exactly the "this server is a mirror of" option does vis a vis the mail service? I walked through the setup in the documentation to configure my MTA and the mirror, and as far as I can tell, it is configured correctly. I think a major part of my question is, when configured in this manner, does this make a fail over or load balanced set up? How is the failover accomplished in the case of an outage of the primary server?

    TIA!
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ahrasis likes this.
  3. thewoj

    thewoj New Member

    Thanks for the pointer, these are the documents we used when I set up the servers. In particular, the second email server section. I guess my question is does this set up result in two servers that can be used, for example, as a set of incoming/outgoing email servers that can just be set in a round-robin DNS entry that users can use in their email client configurations, and to set (for example) the IP addresses as a round-robin MX record? Or is there some sort of manual failover that would need to take place?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    No.
    For incoming e-mails, failover works. Both e-mail servers are in MX record, so whichever is running gets the e-mails. For name service, it works as long as at least one of the ns hosts is running.
    If you have read the multiserver setup, you must have noticed there is no round robin DNS or load balancing. If you need those, they can be configured but this document does not tell how. Try Internet Search Engines with
    Code:
    site:howtoforge.com failover
     
    ahrasis likes this.
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    I can give at least some insight on what i did. We have 2 mailservers, one is mirror of the other and they are at 2 different locations.
    As @Taleman already explained incoming mail "failover" is handled by the two MX records.

    So we need to handle the services, or more or less, the hostnames that the clients use to connect to the different services e.g. smtp, imap, pop. The domain that we use for the FQDN names of these servers is handeled by cloudflare. They offer a service called "Monitors" which make it possible to check if a host or a special port is reachable and depeding on wether that's the case or not take some action.

    In our case it looks something like this:
    Monitor mail01 services, if they are down change the global DNS records for mail.domain.tld, smtp.domain.tld, imap.domain.tld etc. to the mail02 server. As the TTL of these records is set to 60 sec, most clients should only expirience a small amount of downtime if any.

    Sure this is not a perfect or in-time solution but it is sufficient for my case and it is a cheap setup.
    You could build your own setup with HAProxy to handel the balancing, but that comes with 2 main issues, one is that this HAProxy is now your single point of failure and you need to think about things like SSL termination, source IPs etc.

    Just my 2 cents
     
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As an additional note to what @pyte mentioned, some datacenter providers also provide load balancers with active health checks. For example, you get them from Hetzner (Hetzner Cloud), and I'm sure other cloud providers offer similar services.
     
    pyte likes this.

Share This Page