Is there a way to peek or see a message before it hits the SMTP on IIS. This is not an Exchange Server, it's just running SMTP. I am trying to see if I can look at the message and then pass it to SMTP?
Edit ~ Instead of adding another listner, I am wondering if there is a way to bind to the default SMTP listner and intercept the message then pass it on.
2nd Edit~ Ok, here is my problem. I have a spam filter in front of my exchange box, unfortunately (due to software design) the filter is limited when it comes to "Directory Harvesting Loookup". This is the process where the email addresses are checked if they exists in AD and the mail is dropped if they don't. My current filter drops the mail if one of the addresses does not exists in AD which is not good. I spoke with the vendor and there is nothing they can do at this time. I am looking put an app in front of this filter which would intercept (open, read, parse) the mail, validate the addresses, and then pass on the email to the filter for additional scanning. I'll then trun off this feature in their software. Don't get me wrong, their filter works great with this one exception which I must fix since I have tons of emails send to nonexistent users in my domain.
detecting the presence and version of IIS using MSBuild
How to create a job in IIS capable of running an extended process
File Security (IP address access restrictions) in IIS7
You can forward all messages directly to your actual SMTP service and pass all responses back.
Windows IIS test server setup
Then you can evesdrop on all these messages and deal with them accordingly..
How to configure multiple intranet website on server 2003?
Might be a bit overkill for what you're after but it's fairly simple to code as you dont need to know anything about the protocol as all you're being is a proxy..
Dojo load time extremely slow on iis
bypass IIS xml file settings at file/folder level
Creating IIS Instance over network using MSBuild
SMTP messages aren't just monolithic fire-and-forget entities.
SMTP is session based and there is a conversation between client and server, of which, the message is just a part.
The tracing method (linked to above) will record the entire exchange between client and server and does intercept the whole message before passing it on.
The alternative, a proxy or mock server, will still require your application to engage in the SMTP client/server exchange.
The closest solution to your requirement would be to use something like Papercut which is linked to in the answer above.
That way you could check each message, then move it to the real pickup folder.
It's been many years since I've done this, but you may want to google for "exchange event sink" to see if that helps..
Its not clear to me what you mean by "intercept" and "pass on".
Do you want to filter some traffic or just delay traffic long enough for you to inspect before you pass it on, or both? .