Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I'm developing some HTML email templates and have a internal test tool that can send out test emails to my own email address for QA purposes.

Unfortunately this tool's settings page allows the mail server and port to be set but there are no username and password fields and would appear to rely on the mail server being an open relay.

I don't have access to such a server so I need to set one up maybe in a VM running locally. What's the quickest and easiest way to get this working? I've never installed or configured a mail server before although I'm used to using Linux from the command line and configuring/compiling from source or installing packages etc.


I got this working using Postfix running on a Debian VM in VirtualBox with the following changes made to my /etc/postfix/ file:

smtpd_recipient_restrictions =  permit_mynetworks, reject_unauth_destination
mydomain =
relay_domains =

..where is the domain name of the sending address used by the test client app (which is not possible to edit) and is the domain name of my personal email address to which the emails get sent.

share|improve this question
up vote 1 down vote accepted

No, a server that allows relaying without a username and password is not necessarily an open relay. You can use sender IP address restrictions to keep the relaying capabilities under control.

You'll get any number of recommendations for MTAs to install; I like Postfix, myself, which is available pre-packaged in every Linux distro I've seen, and it's pretty straightforward to set it up to relay or not, as you like (see the mynetworks configuration parameter).

share|improve this answer
Thanks very much - you pointed me in the right direction and I got it working after a fair amount of farting around. – Xoundboy Jun 26 '12 at 12:44

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.