Help with DNS

Discussion in 'General' started by Jean-François Questiaux, Mar 15, 2021.

  1. I implemented a mail server as a mirror of an existing one following the instructions in the ISP Config manual. The idea is to have 2 mail servers in case of one is going down.
    The Dovecot sync seems to work fine but now I'm puzzled about how to set the DNS.
    • My domain name is : mydomain.tld
    • The hostname of the first mail server is : mail1.some-domain.tld and its IP address is 1.2.3.4
    • The hostname of the second mail server is : mail2.some-domain.tld and its IP address is 5.6.7.8
    In the some-domain.tld DNS zone, I set a A and AAAA record for mail1 and mail2. I think that's all that should go there.
    But what do I add in the mydomain.tld DNS zone?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I would advice you to set up the following:
    example.com -> your main domain
    customerexample.com -> domain of a random customer

    - Set up mx1 and mx2.example.com
    - Set up smtp.example.com pointing to one of your mailservers, and imap.example.com pointing to one of them.
    - Set up MX records for customerexample.com, it should look like this:
    upload_2021-3-15_17-1-4.png
    (the same for mx2, but with mx2.example.com. ofcourse. Don't forget the trailing dot!

    Let your clients connect to imap.example.com and smtp.example.com.
     
  3. Thank you for your response but if imap.example.com points to mx1.example.com and smtp.example.com points to mx2.example.com, does not that mean that if mx1 is down, you can still send mail but not receive, and vice cersa for mx2 (given you use imap. for incoming mails and smtp for outcoming ones)?
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, if you want to resolve this, you need a load balancer in front of it. Then you can point imap and smtp to the load balancer and let that handle distributing traffic over the servers that are online.
     

Share This Page