Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    75

    External Mail Server

    I have a web server and two DB servers. I use a third party DNS solutions. I would like to move mail to a totally separate server.

    My question is... How exactly would I do this? I assume that I install something like exim and then use the PHP mail function like normal except configuring it to send via the new servers IP address.

    Then I suppose I would create a record for mail.mydomain.com pointing to the new server and then create an mx record to use mail.mydomain when receiving mail from mydomain.com.

    Do I have the right idea or am I totally off?

  2. #2
    Join Date
    Jun 2004
    Location
    San Diego, CA
    Posts
    137
    First, setup the new server so that it functions perfectly for your mail. PHP can be configured with a default SMTP host (which you would set to the IP of your mail server), and you can also configure sendmail / postfix / whatever to route all mail (no matter what the destination) to the other server. This will ensure that all outgoing mail gets checked through your dedicated mail server and shouldn't fill up the web server's mqueue (unless the dedicated mail server isn't responding).
    Matt Bloom
    AngryHosting - Load balanced/redundant shared hosting solutions

  3. #3
    Quote Originally Posted by MarcRubeus
    I have a web server and two DB servers. I use a third party DNS solutions. I would like to move mail to a totally separate server.

    My question is... How exactly would I do this? I assume that I install something like exim and then use the PHP mail function like normal except configuring it to send via the new servers IP address.

    Then I suppose I would create a record for mail.mydomain.com pointing to the new server and then create an mx record to use mail.mydomain when receiving mail from mydomain.com.

    Do I have the right idea or am I totally off?
    It depends on if you are hosting mailboxes for the domains hosted on your server or not?

    If you host mailboxes then the best way would be to:
    1. disable SMTP for the outside(make sendmail/qmail/postfix/exim LISTEN only on localhost). This is needed for PHP to be able to send mail without the use of SMTP authentication
    2. set up the mail server and transfer all the mailboxes to it
    3. Change the mail.domain.com A record(or whatever subdomain is used by the MX record) to the new mailserver.

    If you just want to use another server to send the mail using your PHP scripts then you will need to use SMTP authentication with the mail() function and configure it to send with the new server's IP

    So yes, you have the right idea
    Server Surgeon George
    http://www.serversurgeon.com
    Linux, BSD and Windows Administration Services
    Toll Free US 877-378-7436 International +1-213-291-9191

Posting Permissions

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