Help - Search - Members - Calendar
Full Version: Using a separate mail server
The Planet Forums > System Administration > HOWTOs
DaGeek
Hello all:

I've been with the planet for many years, now. I am far from a Linux pro, but know enough to get by!

I've always used WHM w/CPanel because I find it easier to keep server software up to date.

I have never had a problem with customers sending too much mail, but it seems I'm finally approaching a point where it may be wise to consider a separate mail server.

Can anyone suggest a tutorial or overview on how I should go about this? In other words, what changes need to be made to DNS to have the MAIL SERVER send mail instead of my WEB SERVER? How does that work with local PHP script using sendmail?, etc.

Thanks in advance for any suggestions!

Brian
James Jhurani
QUOTE (DaGeek @ Apr 30 2009, 03:53 PM) *
Hello all:

I've been with the planet for many years, now. I am far from a Linux pro, but know enough to get by!

I've always used WHM w/CPanel because I find it easier to keep server software up to date.

I have never had a problem with customers sending too much mail, but it seems I'm finally approaching a point where it may be wise to consider a separate mail server.

Can anyone suggest a tutorial or overview on how I should go about this? In other words, what changes need to be made to DNS to have the MAIL SERVER send mail instead of my WEB SERVER? How does that work with local PHP script using sendmail?, etc.

Thanks in advance for any suggestions!

Brian



Changing the MX record in DNS would cause email sent to your domain to go to the mail server instead of your webserver. But this has no influence on sending.

In regard to sending... You will need to synchronize your email accounts/passwords between both servers, as well as have your synchronization script create all necessary Exim configuration to relay/deliver for each domain.

For the php scripts, you would not simply call mail() anymore. You would have to open a socket, authenticate, and relay the email through a remote smtp server(your mail server). This functionality is implemented in http://pear.php.net/package/Mail if I recall correctly.

dredding
QUOTE (James Jhurani @ Apr 30 2009, 04:33 PM) *
Changing the MX record in DNS would cause email sent to your domain to go to the mail server instead of your webserver. But this has no influence on sending.

In regard to sending... You will need to synchronize your email accounts/passwords between both servers, as well as have your synchronization script create all necessary Exim configuration to relay/deliver for each domain.

For the php scripts, you would not simply call mail() anymore. You would have to open a socket, authenticate, and relay the email through a remote smtp server(your mail server). This functionality is implemented in http://pear.php.net/package/Mail if I recall correctly.



Yep, the Mail.php script in the pear repository is much more simple to use than Net_SMTP. It has built-in functionality for smtp and smtps and is pretty simple to get started with.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.