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.

secondary mail server

Discussion in 'E-mail Discussions' started by d3fault, May 14, 2006.

  1. d3fault

    d3fault Member

    Joined:
    May 14, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have 2 servers, server1 and server2. Server1 = Cpanel +exim, server2= non-cpanel + exim

    I want to configure a secondary mailserver in server2 for the domain hosted in server1, such that the mails should be queued on the secondary if primary is down and requeue it to the primary when primary is up. I dont want to configure email accounts on the non-cpanel server (server2).

    I know to setup MX entries in DNS zone file of the domain.

    Please let me know whether my steps to configue it is correct.

    1) Setup secondary MX entry pointing to server2 in DNS settings
    2) Create a file /etc/secondarymx in server2 and add the domains in it.

    Is that the only thing I want to do? there is no file named /etc/secondarymx in non-cpanel server (with exim mailserver). just creating a file manually is enough? Also, there is nothing to configure on the mailserver settings on both the servers to requeue to the primary when the primary is up?

    I am sorry if my above steps are wrong. Please guide me for the above scenarion.
     
  2. d3fault

    d3fault Member

    Joined:
    May 14, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Anybody, please help me :(
     
  3. d3fault

    d3fault Member

    Joined:
    May 14, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    any ideas? anybody?
     
  4. Kerstin

    Kerstin Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Berlin
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I think you need to step back and think about why you're doing this. If you're adding a secondary MX server to try and prevent mail loss in the event of an outage, you may want to reconsider for the simple reason that mail is not lost during an outage, it simply queues up on the sending end, which attempts to re-send until your server comes up again. This is all part of the Internet RFCs which specify the standards by which email is sent on the Internet.

    A secondary server becomes a prime target for spammers, who recognize that secondary servers usually have weaker security measures on them, and target them hard. Same goes for virus authors. This can become extreme to the point of crippling the secondary server so it's a real issue. You can see some real examples here by searching for "secondary" (also on WHT).

    So, your backup server could actually cause you (and your users) more problems than you had in the beginning, without really solving a problem. Just some food for thought. You will actually get a better result putting the effort you'd put into this into something else.
     
    #5 brianoz, May 16, 2006
    Last edited: May 16, 2006
  6. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
  7. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    wow!! I don't know why i miss that topic but it's very useful.
     
    #7 abubin, May 16, 2006
    Last edited: May 16, 2006
  8. Kerstin

    Kerstin Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Berlin
    I think so abubin.

    Some interested links.
    It is surely possible when adding a secondary MX entry ;) send
    not reachable IP´s to other servers. :rolleyes:
     
  9. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Set aside the security issues, I'm sure if it needs to, it can be secured very well.

    I have a different question though, let's say my server does go down, none of my user can email out. Would / could a secondary mail server help for this purpose?

    Does one need to re-create all the email accounts on the secondary server? Or is there a way, like with MySQL to recplicate the whole thing?

    I'm about to read the thread, linked above....
     
  10. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18

    that's actually a process I've been researching, and it's a bit tricky. I have exactly this type of service contracted, and it works thusly:

    1) domain.com has two MX entries: mx1.domain.com with a value of 5 and mx2.backupdomainprovider.com with a value of 20

    2) user@domain.com exists on primary server. user@backupdomainprovider.com exsits on the backup server

    3) a logical mapping is made on the backup server that associates user@domain.com with the user@backupdomainprovider.com account.

    4) when the primary is down, mail is routed to the backup. It is stored for later delivery to primary server. It is also delivered to the mapped account on the backupserver.

    This means that users have access to read emails that are sitting on the backup server, as well as having those messages delivered to them when the primary is back.

    There are some other small issues, but that's it in a nutshell. You can't simply recreate on the backup the accounts and domains that exist on the primary because then it would be considered a localdomain and not a remotedomain.
     
  11. maheshkasbe

    maheshkasbe Registered

    Joined:
    Aug 26, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Make DNS entries

    There sould be entiries of your two mail servers in DNS . nothing at all

    First mail server MX 0 mail1.domain-name.com
    second mail server MX 1 mail2.domain-name.com:)

    By doing this entries it will automatically contact to u r secondary mail server if firstr get down!
     
Loading...

Share This Page