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

I have a slightly odd requirement, in that I need to setup a Windows Server to recieve emails to a certain sub-domain. I just want the raw messages to end up in a folder on this server, so don't need a pop3\imap server or anything like that. A custom developed windows service running on the server in question would then pickup the messages from said folder and process them automatically (essentially just extracting some information from them and inserting into a database)

My question though is what is the best way to setup the server such that emails will end up arriving at this particular server and go into a particular folder. My current thought is:

1) Setup an MX record for sub-domain in question e.g. pointing to my server

2) Setup SMTP server on the server in question.

Will this do the trick, or am I way off here? Please be gentle, this is not something I have much experience with :)

share|improve this question
Are you asking for recommendations for an MTA or do you already have the SMTP server software figured out? You mention a custom developed Windows service so I assume you've already hacked something together. In which case, my rather simple answer is all you need to hear. =) – Wesley Feb 27 '12 at 3:59
up vote 3 down vote accepted

Yes, that will work.

share|improve this answer
Very accurate and completely unhelpful. Just the sort of thing I might have posted. :) – John Gardeniers Feb 27 '12 at 4:29
bows Thank you. Thank you. blows kisses – Wesley Feb 27 '12 at 4:30
Actually, this is essentially the sort of answer I was looking for :) - I just wanted some confirmation that it would work before I setup SMTP and request MX record.... while these are both fairly simple I didn't want to waste time on them if it definitely wouldn't work. See my comment to John's answer though - I am still interested in potential gotchas to this approach – mutex Feb 28 '12 at 19:36

What you're proposing is adding an extra and unnecessary layer to the system. It's far easier to create a system to fetch messages than it is to create one to receive them. I've had to do the same kind of thing before and found the easiest way was to use a regular mail server, such as whatever you're currently using for your normal email, and having a service periodically poll that server for messages. Those messages are then retrieved using POP/IMAP or whatever other method is available to you and processed immediately.

share|improve this answer
But then I need to poll for the emails, whereas having a service with filesystemwatcher sitting waiting requires no polling - SMTP gets the messages to the server and as soon as they arrive they're there ready to process. Or is this not quite the case? Sorry, I probably should also have mentioned that we have an existing service that watches a folder for files FTP'd onto this server then processes them - the proposal is to allow data that would normally be in text files and FTPinstead be embedded in an email and then with some slight modifications the existing service will process them. – mutex Feb 28 '12 at 19:32
@mutex, I still think that's the hard way around but if you're really set on it you may want to look into how and where various mail servers store messages, which in most cases will be as files. – John Gardeniers Feb 28 '12 at 20:27

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.