How can I configure the IIS SMTP service to store all emails (regardless of domain) in the drop folder?
I'm trying to catch all emails sent to an SMTP server during testing. I don't want to relay the emails on to their final destination, I just want them to sit in the C:\inetpub\mailroot\Drop folder so that I can inspect them later on.
Is this even possible with IIS's SMTP server?
I'm using Server 2008 R2 Standard with just the SMTP feature installed.
There are probably a number of ways to do this, but I'm thinking that if you configure the SMTP server to use a smart host for delivery and plug in a bogus ip address that will keep it from being able to deliver any emails. I'm not sure if it will cause the SMTP server to move the emails to the badmail folder or not, but at the end of the day it will keep the emails from being delivered and they'll be available to you regardless of the folder they're in.
I tested this on a 2003 box and it worked. I did not specify a smarthost at all and what it did is keep the e-mails in the Queue folder. Since it can't connect to a smarthost it just holds onto them in the Queue folder. Standalone IIS SMTP doesn't do domain lookups AFAIK and needs a value for the smarthost to be able to send e-mail onward (I don't know if this changed in 2008 however). You may want to adjust your timeout settings if you want to hang onto them for awhile because it may delete them after the message expires.