Backup MX - DNS "Fallback"

Discussion in 'Server Operation' started by MaddinXx, Aug 14, 2012.

  1. MaddinXx

    MaddinXx Member

    Hello everyone

    Today I tried setting up a MX backup server running ISPConfig.

    I just created a regular "ISPConfig mailserver" and configured the mail transport according to posts found in the forums here, as well as relay access.

    However I don't get the point on how to configure the DNS.

    I have MX 1 with Prio. 10 and MX 2 with Prio. 20 as well as a CNAME mail.domain.tld pointing to MX 1.

    Sending mails through MX 1 FQDN or CNAME works well.
    Sending through domain.tld (without mail CNAME) doesn't work (no SMTP server found).

    So MX 2 doesn't work at all.

    Is their something I have to do with the DNS? Normally, it should work sending mails "to" domain.tld as it's suposed to lookup the MX records, or do I miss understand this?

    Thanks for your help!
  2. falko

    falko Super Moderator ISPConfig Developer

    You must not use CNAMEs for MX records. MX records must always point to A records.
  3. MaddinXx

    MaddinXx Member

    Hi falko

    Well, at the very end they do point to A records. What I have is:

    mail.domain.tld -> CNAME to -> mail.alpha.otherdomain.tld
    mail.alpha.otherdomain.tld -> MX -> Prio. 10
    mail.beta.otherdomain.tld -> MX -> Prio. 20

    mail.alpha.otherdomain.tld -> A -> to mailserver IP
    mail.beta.otherdomain.tld -> A -> to 2nd mailserver IP

    Both mailservers are running on other servers than the webserver.
  4. falko

    falko Super Moderator ISPConfig Developer

  5. MaddinXx

    MaddinXx Member

    Hi falko

    The CNAME is for the tld itself. I've attached the two DNS zones:



  6. falko

    falko Super Moderator ISPConfig Developer

    The DNS records look ok.

    For my understanding: sending mails or receiving mails - where is the problem?
  7. MaddinXx

    MaddinXx Member

    Like this, sending mails is only possible via the 1st mailserver and there is no fallback to the 2nd one, if the 1st fails.

    - Because it only works with the CNAME (which points to one server (1st))

    So the email client doesn't find out that there are two servers he can try.

    But, a question aside, because probably I misunderstood the functionality of a backup MX.

    Shouldn't it be possible with this setup to:

    - If someone sends an email to info[ @ ]rackster, his mailserver checks if my 1st server is up. If yes -> send to it, if no -> send to the 2nd. As soon as the 1st is up again, 2nd -> sending to 1st -> to the email address finally.

    - If I want to send an email, check if 1st server is up -> if not, send via the 2nd.

    Thank you falko :)
  8. falko

    falko Super Moderator ISPConfig Developer

    The backup MX is for receiving mails only. Your mail client will use the configured mail server for sending mails, it doesn't check if there's a fallback if the mail server is down.
  9. MaddinXx

    MaddinXx Member

    Ah and again we can see how wrong "knowledge" can lead to confusion.
    I'll retry than I guess :)

    Thank you falko!

Share This Page