Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And the sever hosting the website is running which EXIM or Sendmail ? I was confused because both are listed next to the web server.
And what distribution of Linux is the Web server running ? might be a simple way to make the configuration change. Debian / Ubuntu for installce allows you to run dpkg-reconfigure <packagename> to configure smarthost settings for exim or postfix.
a smarthost is a type of mail relay server which allows an SMTP server to route e-mail to an intermediate mail server rather than directly to the recipient’s server.
don't you need sendmail for the php mail() function? reason i have it listed. sendmail sends the mail to exim and then exim sends it to exim on the mail server to be sent out?
I think you should change the MX handlers in DNS to point to the mail server you want to use. That's how you would seperate the hosting from mail. Or wait did you say relay mail. You are trying to seperate the services right?
I see the word "relay" had some of us confused. A relay would be the server1 accepting the mail for the domain(s) and redirecting or relaying it to server2.
What you should do to seperate it is set the CNAME for mail.domain and MX records to point to the mail server you would like to use. This is done by configuration of named (DNS). Does this make sense?
farslayer: wouldn't this just cause more traffic to the webserver when you want the mail server to handle all the requests? I mean if server1 is handling web and server2 is handling mail why relay from on to the other when you can skip the relay part with DNS. I guess there is still DNS traffic (I don't see a way around it) but both DNS & smtp relay traffic seems like it would be heavier or redundant.
The purpose of a SMTP server on the Webserver box is to handle email being sent outbound from the website. Like when a user registers for the website, wiki, or Forum the web server would email a confirmation to the user. it is not to handle internet mail for the domain. Most web packages (Joomla, Drupal, wikis, CMS Sites, forums, etc..) use the local sendmail binary to send email. Postfix and Exim simulate that binary so they can also send email in this fashion.
Several reasons you would use a smarthost to actually deliver the email.
1. You are hosting at home and your provider won't allow your systems to send email directly except via their servers. so your web server can use your ISP's SMTP server to actually deliver email to your websites visitors..
2. Corporate environment, wants ALL internet mail to enter and exit the network via ONE mail server. So having the web server hand off it's email to the primary mail server means less ports to open to less machines through the firewall.. Simplifies the firewall configuration and leaves fewer internet facing ports open.
3. Mail from your site will be coming from the Smarthost (Primary SMTP Server) which is a valid SMTP server for your domain it has all the proper MX records and rDNS configured already.. theres no need to add additional records for the webserver, because you are using infrastructure and configurations that are already in place.
Not really an additional DNS load on the webserver, since the SMTP config file tells it exactly where the SMTP server is that it is forwarding the mail to. for delivery. and you are not trying to steer incoming mail. all incoming email will be going to the primary SMTP server as it should, it would not be destined for the web server.
Hope that helps to explain some of the reasons for this configuration, and the use of a smarthost.
It does explain the reasons and your are right my solution does not handle the local mail (realized this right as my head hit the pillow) and issues revolving around home hosting or many other specific setups. I was not thinking ahead' I hope MikeQ is following all this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.