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:
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
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.
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
You shouldn't need any SMTP service running on the Windows box; you should connect to the SMTP server on the Linux box.
For Postfix, it's a simple config to open up the server to a host or a network segment and accept connections. As long as the mail server isn't outwardly public-facing (you're not exposing open port 25 to the world), there's no worry about open relays and such.
From memory, you'll set up the mynetworks parameter in the postfix config file to include your Windows box and exclude the rest of the world. This should stop the postfix server from acting as an open relay.
Use one of the free email servers for Windows, e. g. Mailenable or Hmail.
They work reliably and make setting up your own server a snap!