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.

Local DNS, first mx remote and second mx local

Discussion in 'Bind / DNS / Nameserver Issues' started by Tagor, Apr 3, 2006.

  1. Tagor

    Tagor Well-Known Member

    Joined:
    Mar 6, 2004
    Messages:
    193
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I have a server 1 running DNS and secondary MX. Server 2 runs the first MX. I added two MX records to my DNS (MX 10 ip.ad.re.ss / MX 20 ip.ad.re.ss).

    If server 2 goes down all mail stays in the queue for some time. But I would like server 1 to deliver the mail locally if server 2 goes down.

    I put the domains in /etc/secondaymx and /etc/remotedomains.

    Any idea how to fix this?
     
  2. MattGetWeb

    MattGetWeb Well-Known Member

    Joined:
    Aug 4, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Currently, your mail is held up because the MTA must try the next highest MX. To short circuit this behaviour, you need to set some kind of transport map on the server. Ie. "When I get email for <somedomain.foo> I should deliver it directly to <some server>, bypassing the default mechanism." You'd need to do this for all domains that this needs to happen for. This way, you can still use your MX records to control where email comes into your network (ie. server 1 & 2 may be in different locations from each other), but you can still deliver the mail once you have it regardless of the state of the other mail servers (ie. you get fault tolerance).

    Sorry, I don't know how to do this in exim as I use a pair of postfix servers as my mail gateways. In postfix you'd add something like "foobar.com smtp:[ip.of.cpanel.box]" to /etc/postfix/transports.
     
Loading...

Share This Page