Super User is a question and answer site for computer enthusiasts and power users. 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

Our mail server manages to filter a lot of spam, but the spammers seem to be finding ways to get around it. I am finding that much the current crop of stuff that gets through could be filtered on my end if only I could make a rule that could clue in on stuff that a regular expression could ferret out. Here's a very consistent thing in the message body of a large number of messages:

<!--  -->

I look in the list of conditions in the Rules Wizard and I see nothing that helps, but perhaps I don't see something that could work?

This is Outlook 2007.

share|improve this question
I'm going to recommend moving this to StackOverflow, since this involves a fair bit of programming. FOr RegEx & VBScript reference, have a look at – Sathya Sep 14 '10 at 18:06
See my comments to your answer, below. – Cyberherbalist Sep 14 '10 at 18:36
up vote 2 down vote accepted

I replied to your stackoverflow question. Hopefully that will help. Keep in mind that using the 'run script' action is just an action, and not a condition. To be effective, it'll have to be in the top rule handling all incoming messages, and then the script just inspects the contents and moves/deletes the message item or just skips over it letting the next rule in line take it from there.

You could also manage this through item/application events. See Microsoft Outlook Programming: Jumpstart for Administrators, Developers, and Power Users: Section 11.5.3 for an example.

share|improve this answer

Possibly not the answer you are looking for, but since you have a mail server then I presume you have > 1 people on your network picking up their mail from it?! In this case, having regular expressions on each client PC that will need regular tweaking seems to be tackling the problem at the wrong end and creating one heck of a support burden.

If your mail server is not performing all the filtering you need, I would suggest you start there and see what can be done about it.

What's your mail server running? (Exchange?)

share|improve this answer
Yes, it's Exchange. They've got some 3rd party anti-spam solution in there, too. It catches a lot of stuff, but lately there seems to a lot getting through, more than before. I've talked with them; they're not particularly helpful. – Cyberherbalist Sep 14 '10 at 20:18

There is a rule where you can check for specific words in the body, perhaps you could try that ? alt text

share|improve this answer
Sigh. I have already been using it for some of the spam that kindly misspells the words "viagra" "cialis" and "replica" -- you know, leet-speak misspellings, presumably to deceive heuristics. It's easy to catch "v1agr4", "c14lis". There's only so many ways to misspell these words before they become unintelligible. But other kinds of things, like the one I mention in the question, are too complex. I can't catch on a particular domain link, for example, because they use so many. It would be a full time job keeping track of them all. – Cyberherbalist Sep 14 '10 at 17:33
@Cyberherbalist You can use Macros & VBA in Outlook. VBA can support RegEx. Here's a link documenting that - – Sathya Sep 14 '10 at 18:04
I'm aware of this, @Sathya, but I have never been able to find documentation on how to make a VBA script operate to check for certain properties in a message and take some action on it. A VBA script would have to run for every message arriving in Outlook, but there is no option that I can discover to make it so! I am asking here because maybe there is some obscure setting that I know nothing about that would enable what I am trying to do. If there is none, then so be it. – Cyberherbalist Sep 14 '10 at 18:33
In fact, I have a question out on StackOverflow asking how to get a VBA script to run (for another purpose than that mentioned here), and it has gone unanswered for over a year.… – Cyberherbalist Sep 14 '10 at 18:35
@Cyberherbalist Let me try to have a crack at it. Will update my progress probably tomorrow. – Sathya Sep 14 '10 at 18:43

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.