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.

(Help) Exim as Backup MX Server

Discussion in 'General Discussion' started by spsellars, Feb 7, 2004.

  1. spsellars

    spsellars Member

    Joined:
    Nov 30, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    What I would like to do is set up exim so that is will act as a secondary mail transport in the event my local Exchange server goes down. I would like it to hold the emails until it is able to relay them to my local Exchange server. I only need this for specific domains I will be hosting.

    I know I need 2 mx records for this with the local Exchange server mx having higher priority, but I'm confused as to how I set exim up to do this.

    Any pointers will be greatly appreciated! Sorry if I didn't explain my situation well.

    Thanks in Advance everyone!
     
  2. Stenny Chong

    Stenny Chong Well-Known Member

    Joined:
    Jun 12, 2002
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    add the remote domain in /etc/secondarymx and /etc/remotedomains.

    Modify dns zone file as below

    domain.com. 14400 IN MX 0 domain.com.
    domain.com. 14400 IN MX 10 mx.domain.com.

    Add an A entry for mx.domain.com. point to the secondary mx server's ip.

    That's all.
     
  3. spsellars

    spsellars Member

    Joined:
    Nov 30, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Thanks a lot, I'll give it a shot, I guess I was making things harder than they had to be. Much appreciated!
     
  4. magnus

    magnus Member

    Joined:
    Jun 22, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    did worked ok?

    i wanna know if that's all to get a backup MX server... :confused:

    did i need to create that domain at backup server (dns zone)?

    it's necessary to edit etc/localdomains

    Thanks 4 your help
     
  5. spsellars

    spsellars Member

    Joined:
    Nov 30, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I did exactly as stated above and it has been working perfectly. Just try what it says above and if you have problems maybe I can help. (If not I'm sure there's hundreds of people on this board willing to help you)
     
  6. steve-UK

    steve-UK Registered

    Joined:
    Mar 7, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    how does the secondary handle mail? will it handle it automatically and redeliver when the main server is back on without intervention?

    say i had two servers, could i set the accounts at one server to to have a secondary at the other server and the other way around?

    what would the dns setup look like?
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, that's exactly how it works. The mail is held in queue by Exim (in the same way that it does for normal outgoing email that is deferred) and then delivers it to the lower priority mail server at the next batch run (usually once per hour).

    I'm not sure what you mean be accounts here. You can certainly have MX entries for each domain on each server pointint to itself and the other server with a higher priority, such that they will queue email for each other of one goes down.

    Same as Stenny Chong said earlier.
     
  8. steve-UK

    steve-UK Registered

    Joined:
    Mar 7, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    yep thats what i meant :D

    thanks for the quick reply. been looking around here for a few weeks now and found everyone very helpful. Im not the most technical person and DNS stuff has caused me a headache. I've just about figured single server DNS but now im looking into multiple server DNS its back to the start again :p
     
  9. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    I would think that this configuration would simply hold mail on the cpanel server. Is this really working for people?

    I typically assign the cpanel server the lower MX priority (a higher number), remove the domain from /etc/localdomains, insert the domain into /etc/remotedomains and /etc/secondarymx and it seems to work.
     
  10. jacob

    jacob Member

    Joined:
    Jan 30, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    We have 9 domains hosted on a random box. That box's IP must change tomorrow, and we have some critical emails going through it.

    We're trying to use one of my cpanel servers for a backup MX. We edited the dns entries for all of the domains earlier this week (on the existing DNS server, not the cpanel server), and added the cpanel server as a lower priority MX server for each of the domains.

    I added the domains in /etc/remotedomains and /etc/secondarymx . Do I need to do anything else? If I understood correctly, I don't need a cpanel account or a DNS zone for any of the domains?

    Thanks much!!
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's all you need to do.

    All that Exim is actually doing is what MTA's do all the time in relaying email for domains, but instead of passing it off to the mailfile for POP3, it's holding it in its queue to forward onto the lowest number MX record when it is available.

    One important thing to note. If you use this facility be very careful about using the WHM > Manage Mail Queue > Delete all messages in Queue, as this is where they will be waiting!
     
Loading...

Share This Page