Find the answer to your Linux question:
Results 1 to 6 of 6
Hello Ok, so here's the story: 1 linux box mail server + 2 ISP I need to set up a mail server, i'm familiar with the usual ones (qmail, postfix, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    5

    Exclamation 2 ISP -> 1 email server/domain


    Hello

    Ok, so here's the story:
    1 linux box mail server + 2 ISP

    I need to set up a mail server, i'm familiar with the usual ones (qmail, postfix, sendmail), so to be able to obtain a higher uptime i've contracted another isp
    What are my options to use the second isp.
    This is what i want to do, please correct me if i am wrong, and other iddeas will be apreciated

    1.route the 1 provider to 1 ip (82.x.x.1)
    2.route the 2 provider to 1 ip (82.x.x.1)
    3. set up the mx record to 82.x.x.1

    In my oppinion this should work but i have just 1 issue:
    Let say that the ip 82.x.x.1 is routed by the ISP 1 , can i route this ip trough ISP 2?

    I hope that i am clear enough
    Thank You, any ideead will be apreciated.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,864
    If I understand you correctly, I think I'm already doing something similar to you.

    I have my 'regular' ISP who provide my internet connection with static IP address, this is really useful. They also provide a proper mail feed - i.e. the primary MX record of my domain supplied by my ISP points at my static IP address.

    I have a hosting company for my 2nd domain, with which I have complete control of my domain records. I pointed the MX record for the domain to my static IP address as supplied by my primary ISP (not by name, just the IP address).

    My domain names are the same, except my primary/ISP provided one is .net, and my other is .org.

    Then I configured sendmail to accept mail for both domains:

    /etc/mail/domaintable
    Code:
    [mydomain].org = [mydomain].net
    /etc/mail/local-host-names
    Code:
    mail.[mydomain].org
    mail.[mydomain].net
    [mydomain].org
    [mydomain].net
    /etc/mail/relay-domains
    Code:
    [mydomain].org
    [mydomain].net
    and my domain M4 config file contains:
    Code:
    ...
    define(`confDOMAIN_NAME',`[mydomain].org')dnl
    ...
    MASQUERADE_AS(`[mydomain].net')dnl
    MASQUERADE_DOMAIN(`[mydomain].net')dnl
    ...
    FEATURE(`always_add_domain')dnl
    ...
    which all seems to work nicely for me.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    5

    Question

    It is kinda similar ...but not really.
    You just use multiple domains on a single ip, i want the opposite

    ok, si i have just one domain [mydomain.com]
    I have set-up an dns server, to point out my mx records

    So here is my situation now, working perfect

    eth 0 LAN
    eth 1 ISP1 -> 81.x.x.1 -> mail.mydomain.com

    To provide a good email flow i've contacted another ISP so my situation is now:

    eth 0 LAN
    eth 1 ISP1 -> 81.x.x.1 -> mail.mydomain.com
    eth 2 ISP2 -> 85.x.x.1 -> i need that also to point to mail.mydomain.com

    I think that you can't have multiple ip addreses that resolves a host, please correct me if i am wrong

    So i've thinked that i can route the ip's from the bouth providers via a new IP address lets say 81.x.x.9 (this ip is provided by ISP1)
    The question is if i can route the 85.x.x.1 ISP2 's ip trough the ISP 1 routed ip

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,864
    You can set multiple IP addresses for one hostname, but it's more complicated than you need, I think.

    Just point the MX record for your 2nd ISP to the static IP provided by your 1st ISP.
    Linux user #126863 - see http://linuxcounter.net/

  5. #5
    Just Joined!
    Join Date
    Jan 2005
    Posts
    5
    Thank You for the reply
    Setting up an second mx record will do just the job.
    I have a few more concerns about this whole thing

    I've research and found out that i need an ip class and also an AS-number to set up BGP to manage the email flow to various hosts

    I also need this box to masquarade the lan, or squid it

    the big question is:
    1.what rules make the decision of traffic via the first or the second isp?
    2.this solution just adding a second mx -> traffic will continue to flow via the first isp, and just in case the 1 isp is down the second route will come up ?

    I need to know this because i can make the second isp contract a traffic based contract!

    Looking forward for an answer
    Thanks

  6. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,864
    The routing table set up by the sysadmin tells the computer where to send IP packets based on their IP address.

    Looks like you have two interfaces on this computer each running to a different ISP. That isn't a problem, but you should put some thought into how you do routing. You might, for example, want to run all normal traffic via the 1st ISP, and point your squid proxy to your second, so all proxied web requests go to the 2nd ISP, leaving the 1st connection free for all your important traffic.

    If you set up the MX records for each of your ISPs to look the same, something like this in your zone file:

    Code:
             MX      10       [ISP1_staticIP].
             MX      20       [ISP2_staticIP].
    when people try to send email to the domain, they'll try the MX with the lowest index, and if connections fail, will try the next one up until a connection is established. So you end up with the fail-over you want automatically.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •