IIS/SMTP - unable to move emails from inetpub/mailroot/Queue due to file lock
Posted
by
Bryan Roth
on Server Fault
See other posts from Server Fault
or by Bryan Roth
Published on 2012-05-30T16:25:20Z
Indexed on
2012/05/30
16:44 UTC
Read the original article
Hit count: 332
I have a listener that processes emails in the inetpub/mailroot/Queue
directory. Once the listener is done processing an email it proceeds to move the email to another directory. However, moving the email is not possible due to a file lock by the process inetinfo.exe
. I have noticed that this file lock is released after a period time that ranges from several hours to several days. You can see that the Queue
directory can get pretty full over time.
The only way I have been able to work around this is by manually stopping and starting my SMTP virtual server in IIS.
Is it possible to release this file lock programmatically? If not, is it possible to expedite releasing this file lock?
© Server Fault or respective owner