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

As the title implies, we're looking for an inhouse SMTP server to use for all our server applications that have Email Alert features (i.e. WhatsUp Gold, our Windows Storage Server reports, etc, etc). MOST of the program we use allow for basic authentication to an SMTP server. Other programs don't even allow the use of a user name (just a mail server address and that's it!). Our company mail servers (hosted exchange) require us to pay extra for SMTP and only allow it if SSL is enabled, which 95% of the programs that we want to send out emails don't have an SSL option so they're out of the question.

I've tried setting up some sendmail and postfix servers here in house, but whenever I try to send mail, our Exchange server rejects it because it can't verify the hostname. I'm guessing it's doing an MX lookup on the sender address, which is just the hostname of the machine, so it's coming from something like "servername.localhost" which obviously doesn't exist.

I think the biggest hurdling block here is my lack of how mail servers work. Is this something that I'll need to have my mail provider fix? Is it something I can fix by making configuration changes in postfix/sendmail? What's the best way to get this internal mail server set up and working?

share|improve this question
How about setting up a completely separate email domain for this? That way you don't have to deal with your hosted exchange provider at all. Send your alert mail to a server that sends it to the outside world, then back to your hosted exchange. – Phil Hollenback Aug 12 '11 at 19:48
up vote 3 down vote accepted

You can setup Postfix as a relay server for Exchange. A simple HOWTO can be found here:

But for the SASL part you probably need this, too:

Either way it is quite simple to set it up with the right HOWTO. But helping you is very hard if you just say "It does not work. What did I do wrong? Fix it". Please provide errors, configuration, logs and the like.

share|improve this answer
Sorry for not being clear enough. The error log on the postfix mail server showed that the outgoing message was rejected by the receiving end because it was an unknown host. This was a couple months ago, so I don't have the exact error message. I'm just bringing this up now because it's time to get the ball rolling and get this set up. – Safado Aug 11 '11 at 22:36
I had a Linux server that had postfix installed that was sending mail out for itself. I read through this guide and I was just missing one piece to allow relays so the other servers could use it as their mail server. Thank you. – Safado Aug 12 '11 at 22:53

You could use the SMTP service in IIS to relay email to your Exchange server. Note that I said relay TO, not THROUGH. If IIS relays to email addresses that the Exchange server is authoratative for then it should be a snap to set it up and configure your applications to use the IIS SMTP server to send email to your users or admins.

share|improve this answer
Will IIS allow me to use it as a relay without providing a username or password? I believe I only have one device that's like this. Some others allow me to put a user, but no password. And then the rest require a user and a password. – Safado Aug 11 '11 at 22:39
Yes it will. In the Relay Restrictions of the SMTP virtual server you can add the ip addresses of the systems that are allowed to relay through it. Essentially the applications relay TO exchange THROUGH iis. – joeqwerty Aug 11 '11 at 22:47
As a side note, this is exactly how I send email from applications to my Exchange email address. – joeqwerty Aug 11 '11 at 22:51

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.