0

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. myservice.example.com 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 :)

1
  • 1
    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, 2012 at 3:59

2 Answers 2

3

Yes, that will work.

2
  • 1
    Very accurate and completely unhelpful. Just the sort of thing I might have posted. :) Feb 27, 2012 at 4:29
  • 1
    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, 2012 at 19:36
3

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.

2
  • 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, 2012 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. Feb 28, 2012 at 20:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .