Setting up a dedicated mail server

emailpostfix

We have three dedicated servers:

  • One is a Windows web hosting server
  • One is a Redhat server, intended for mail
  • One is a MySQL database server

On the Windows web server, we do not have the SMTP services installed. However, we have the need to send transactional (registration, email verification) emails to members.

Here are my questions:

  1. In order to relay mail to our dedicated mail server, do we need to set SMTP up on the Windows server. We do not want the Windows server to deliver ANY email to ISP's – it should only route messages to our dedicated mail server

  2. How do you go about setting up postfix to be ready to receive messages like these from this Windows box? There are a lot of security concerns – obviously it will not be open relay.

Best Answer

No SMTP Server is required on your Windows Web Server.

Your Web App on the Windows Server should use the 'smtp' protocol to send email directly to your Redhat mail server. The smtp functionality should be part of the framework/libraries used by your web application, and may already be implemented as such (and just waiting on you to specify the IP Address for the mail server.

Your Postfix server (on your Redhat Server) should handle all transactions from there onwards (i.e. ISP and the rest of the world, including email back into the office.)

This obviously implies that there is a route for the Web Server to talk to the Mail Server (whether directly or through a firewall/gateway.)

Restricting mail 'clients' in Postfix

If your Web Server is using a Public IP address, or in a DMZ, then you will need to add this server IP to Postfix mynetworks configuration in main.cf.

If your Web Server is using a Private IP address within your firewalled/NAT'd LAN then it may already be factored for in your standard configuration (just confirm the server IP and the above mynetworks option in main.cf

Related Topic