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 have IIS's SMTP server set up as a closed relay, and it's working nicely. I also have an application that writes EML files. If the EML files are written to a temporary directory, then moved to the server's Pickup directory, email is sent as expected. However, if I have the application write the EML files directly to the Pickup directory, the email will often fail to send.

This seems to be a race condition: the server starts processing the EML file as soon as it detects it in Pickup, even though the application hasn't completed writing it. The result is the server considers the EML to be malformed, and it punts it to Badmail.

While I very much appreciate the server's earnestness, it seems that I need to dial it back a bit for this scenario. Does anybody know if IIS's SMTP server's polling frequency can be configured?

I am using IIS7, Windows Server 2008 R2. The application that writes the EML cannot be modified.

share|improve this question

The IIS SMTP service will pick up the files as soon as the file system reports that they are there, so there is no interval to configure. We do the same thing with the pickup folder using SMTP and IIS6 on Windows Server 2003 without any issues. We've not tried with IIS7, but it sounds like they may have altered the way it watches for files. You might try writing the files to another folder and then scheduling a batch file to move them all to the pickup folder once per minute to see if that helps avoid the problem.

share|improve this answer

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.