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.

Setting up an account to act as backup MX?

Discussion in 'General Discussion' started by SarcNBit, Oct 17, 2003.

  1. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    How would you go about configuring a web hosting account so that the web server is acting as a backup mail server.

    I have a situation where a local Exchange server is the primary mail server, but due to the potential of power outtages, system reboots, DSL circuit outtages, or whatever other occurances might happen to take the server out of commision, we would like to setup a backup mail server.

    I understand the concept from the DNS point of view. The Exchange server IP is configured with a priority 10 MX record, and the backup server will be priority 20. My question relates to how the actual mail is handled. Do I need to setup the server (other than creating an account in CPanel) to allow the mail to come into the server? Will the mail automatically be sent to a que and then delivered to the primary mail server when it becomes available? How would I go about setting the retry schedule? Is the size of the que limited to what is available in their account? If not, how can I limit the size and/or expire the mail after a certain storage/retry period?

    I apologize for the number of questions in this post. I really have no idea where to start to answer these questions. I did run a search and could not find a thread that fully addresses these issues.

    BTW it is very difficult to search for concepts such as Backup MX records when the search function rejects words of less than three characters.
     
  2. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Any help on this would be greatly appreciated. I have a potential client who has this configured with their current host (who tells the client they are running a program called postoffice) and is asking the same from me.
     
  3. 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
  4. palash

    palash Member

    Joined:
    Aug 27, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    yes you can

    yes you can, there is a section undercpanle-> mail
    --> modify mx entry
    put your desire value.
    before do so you need to point dns.
     
  5. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Thank you for the link casey. I do not want to point them to another service provider. I am certain that exim can be configured to handle this. I just am not sure about the particulars or how it can be done "automagically" through CPanel.

    palash thank you for the reply but you did not really answer any of my questions. From my original post
    ;)
     
  6. palash

    palash Member

    Joined:
    Aug 27, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    yes, i read your original post.
    you can change mx entry in cpanel to 20,
    then when mx=10 server down ,this backup server will
    responce for your domain.
    sumple and easy.
     
  7. palash

    palash Member

    Joined:
    Aug 27, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Email Delivery
    How does an email travel from the sender to the addressee?

    The sender's mail client sends the email to its SMTP server. The server checks the recipient's address and if the domain contained within the address is qualified as local the email is saved directly into the appropriate mailbox. If the domain is not local the SMTP server finds the name of the primary mailserver (SMTP) for the target domain from the DNS (by sending a DNS request) and sends the email to this server. This saves it to a mailbox from which the recipient downloads it using his/her email client.

    If the primary mailserver for the target domain is not accessible, the sending SMTP server tries to contact the secondary server (the server with the next priority) and send the email there. If no server listed in the MX record for the target domain is accessible the SMTP server will try to send the mail again repeatedly in defined intervals. If it does not succeed after a certain time the email is returned to the sender as undeliverable.

    If, for example, only the secondary server is accessible the email is sent to this secondary server. This server then tries to send the email to the primary server in certain time intervals. In principle, any SMTP server can function as a secondary (tertiary, etc.) server for a domain.
    -------------------------------------------
    hope this will help you to understand basic.
     
  8. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Thank you for the reply. I have not tested it yet, but that is what I assumed would happen. I still have the following questions:

    I am also interested in knowing how I can limit the domains whcih my server ques mail for. I wouldn't want just anyone to be able to setup a backup MX pointing to my server. Is there a (mail) config file that explicitly lists the domains my server will accept/que mail for? Is so, where is this config located?
     
  9. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Here is the answer to some of my own questions for the benefit of others who may be searching for these answers in the future.

    The mail config file which contains the information I was looking for is /etc/exim.conf

    In order to limit the domains for which mail is accepted/qued, set the 'domainlist relay_domains' value in the exim.conf. By default in CPanel installations, this value is set to check a file named /etc/localdomains which CPanel updates when new accounts are configured.

    You can set the retry/timeout interval for mail received on a per domain basis by editing the exim.conf file and entering domain specific information under the 'begin retry' section. If you wanted to retry delivery of mail sent to example.org every 30 minutes for 2 days and then every 2 hours for the next 5 days before expiring the messages you would enter this line under begin retry

    example.org * F,2d,30m; F,5d,2h;

    I am still not sure if the que size is limited by their account quota or how to set it to be if it is not.
     
Loading...

Share This Page