Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 run a small server hosting sites for around 100 unique clients. I've had issues with my legitimate mail server showing up on DNS Blacklists, so I need to find out if one of my many clients has a bad script somewhere sending junk through my SMTP Virtual Server in IIS6.

I have email sending out correctly, I have relaying set to only allow for, so I know that someone somewhere on this box is allowing bad mail through the service. I've enabled all logging on the SMTP service, but it doesn't give me any clue as to which script (most likely a Classic ASP VBScript application) is the culprit.

share|improve this question
I'm using SmarterMail as my proper mail server, and I don't have access to cPanel :/. Definitely a sticky situation, since many of the apps o this server are years old, and haven't been touched in ages. If I touch something server-wide now, I'm likely to break all of the apps... – Dan Short Sep 28 '11 at 19:34

With IIS6 and the built in SMTP server, I think you're going to be out of luck. The built in SMTP server is pretty limited in its functionality. Outside of writing some kind of plugin (which you can do) or buying a plugin that can implement scanning and logging of the SMTP message envelopes, you're not going to get much more information that what you have now.

As mentioned by jdw in his comment; I have used exim in the past for this specific purpose, and I find the linux based MTA's much more flexible and powerful for this kind of thing. But that doesn't help you if all you have is an IIS box.

share|improve this answer
+1 for pointing out it's not possible to scan easily – Joel Mansford Sep 28 '11 at 19:33

Since classic ASP is plain text you could do a text search across the server for common ASP commands for sending mail such as


From there you should be able to see how the script is setting up the 'from' address. I'd say that any scripts that have a dynamic FROM value or alternatively if you have known junk consistently from the same email address just search for that email address.

Going forward I'd strongly recommend only using authenticated SMTP.

share|improve this answer
Absolutely on the authenticated SMTP. That's my end goal here. I just started searching for the "CDO" string before I saw your answer, but I think that may be my only way to make this happen. Will mark this as the accepted answer if it does indeed do the trick. Thanks. – Dan Short Sep 28 '11 at 19:38

This is strictly theoretical but I read an article on a similar situation a while ago. You should be able to use a Wireshark type product configured on the loopback address to get a packet capture containing all the references to your default SMTP connector. Might be worth looking into.

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.