Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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

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

share|improve this answer

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.

share|improve this answer
Postfix is quite secure by default, so even if you open port 25 to the world, there's no harm. Just make the mynetworks option is limited to your LAN, since this setting determines which hosts Postfix will relay for. – Martijn Heemels Jul 20 '09 at 12:22

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.

share|improve this answer

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!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.