The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WARNING: You only have 1 MX record. If your primary mail server is down or unreachabl

Discussion in 'E-mail Discussions' started by Bruce, Apr 15, 2004.

  1. Bruce

    Bruce Well-Known Member

    Joined:
    Oct 4, 2001
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Is it possible to have more than one mx record for the Main mail server EXIM that is set up to handle all e-mail for server ?
    Multiple Mail Servers or just add a new IP to the main mx record?
    Any help would be appreciated

    Thanks
     
  2. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    You can add as many MX records as you like, but that really isn't the point is it? Who are you trying to fool?

    The warning is pretty straightforward. Populating the zone file with redundant or bogus MX information is only surface dressing and does nothing to address the underlying issue.

    If you are taking these steps in a commercial hosting environment simply to prevent clients running various domain tests from seeing warnings, then you are doing your clients a disservice.
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Indeed. Either provide the service (backup MX on another server) or just leave it alone.

    IMHO, having 2 MX records point to the same server would be worse than having 2 NS records pointing to the same server, though that is bad enough.
     
  4. Bruce

    Bruce Well-Known Member

    Joined:
    Oct 4, 2001
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the reply.

    I needed it for strickly performance, not cosmetic.
    That's what I thought. You need a whole new server.
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I've been wondering about this, too. I assume if you're going to do this you have to go through and add it to each dns zone manually, right? That's a pain. I guess it can be added to postwwwacct for new accounts...

    But let's say I do add another mx record and this is one of my other servers. If the client's server goes down, mail will obviously be redirected to the secondary mx, right? So what then happens to this e-mail when I don't have the users' accounts on this server? Is all I have to do really simply add the mx record?
     
  6. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    The changes you have to make depend on what type of server/MTA you are running as a primary and secondary.

    The MX changes to the zone file only handle telling the sending server where to send the mail. How it is handled from there is subject to configuration.
     
  7. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Thanks. That makes sense. I'm a wimp, so I have cpanel and exim on all my servers. :)
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Backup (secondary MX) mail servers are actually quite cool :)

    What you do is create 2 MX records for the domain in DNS. You assign a lower number for the main server (primary) where the POP3 accounts are and a higher (obviously) number to the backup (secondary).

    If the SMTP server on the primary is unavailable for whatever reason, mail will be routed to the secondary. When on the secondary it simply sits in the outgoing mail queue waiting for the primary to become available. the mail waiting obeys the normal retry rules for any email in the mail queue.

    To setup the secondary on the backup server, if it's running cPanel, you simply add the MX records as above and then add the domain to the file:

    /etc/secondarymx

    That's it.
     
  9. peruda.com

    peruda.com Well-Known Member

    Joined:
    Aug 23, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the info, chirpy! One question: How does one go about config'ing the secondary (exim) server to queue the mail? Or are you saying that this is performed automatically *as long as the accounts are not duplicated on the secondary server*?

    Thanks,
    J
     
  10. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    I would like to draw your attention to the last 4 lines of the post prior to yours
    ;)
     
  11. peruda.com

    peruda.com Well-Known Member

    Joined:
    Aug 23, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Thanks; I did miss that the /etc/secondarymx was for the backup server - I thought it was to modify the DNS records on the primary server. HOWEVER . . . My /etc/secondarymx file is 0 bytes! I am running the latest stable cPanel on FreeBSD 5.2.1.

    So . . . If anyone does know the manual exim configuration that would be great. I don't like to rely on WHM/cPanel scripts; I try to document how to configure my server manually "just in case." Thanks so much! :D

    -J
     
  12. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    I imagine it would be if you have not added any domains to it yet.

    Just enter the domain name on its own line (look in /etc/localdomains for clues), save and close it.

    That is what this file is for! Why run cpanel if you do not trust it? Look for files that call this file if you want some insight on how it works.
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    What SarcNBit said :)
     
  14. peruda.com

    peruda.com Well-Known Member

    Joined:
    Aug 23, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Wow - thanks guys!! I didn't realize it was that simple. Perhaps I need reading glasses - I thought /etc/secondarymx was supposed to be a script to initiate exim to handle incoming e-mail as secondary mx rather than primary (similar to master/slave in BIND). Again, didn't realize it was so simple, but I'm very grateful! I will be config'ing my secondary DNS server to be secondary MX real soon now . . .

    Later.
     
Loading...

Share This Page