Server Fault is a question and answer site for system and network administrators. 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

I have an sendmail server, sitting in front of my Exchange server. This server filters spam with SpamAssassin (and does it incredibly well!), but it merely tags spam messages with appropriate header flags and by modifying the message subject. When such a message arrives a to user mailbox on the Exchange server, where it is examined by Exchange/Outlook junk e-mail filter, which puts most of the spam in the junk message folder.

And that is my problem: most, but not all! To put all spam in the junk mail folder the user has to define an rule, saying e.g:

"If header contains text 'X-Spam-Flag: YES' then move it to 'Junk e-mail messages' folder".

Fine, but it has to be done on every user (for some users, this task is too "complicated" to do for themselves. :-)

So, I want to know, how could I modify the message header in such a way, that the Exchange junk e-mail filter will recognize this message 100% for certain as spam, freeing the user from the task of defining his own rule.

A solution could result from defining such a rule by using AD and group policy, but I wan't to avoid this due to many possible caveats. There are so many combinations of different operating systems and different Outlook versions, and to be honest, I doubt if it is even possible.

share|improve this question
What version of Exchange? – Ben Pilbrow Mar 5 '11 at 18:13
Exchange is 2003 but clients uses various versions of Outlook: 2000, 2003. 2007 and 2010 - what a mess :-) – user71061 Mar 5 '11 at 18:43
up vote 1 down vote accepted

You'll want to use group policy to push out rules. Yes you don't want to do it, but do it once and you'll never have to touch it again.

We do something similar - install a default rules to handle spam as flagged by our gateway.

Here are some articles to get you started: Outlook 2003 Outlook 2010.

You could also write some exchange server side rules. Exchange 2010 would use EWS. But I think that would be more work, unless you're already familiar with it.

share|improve this answer

Consider using spam arrow:

The only other options I believe would be outlook rules, a group policy specifying specific settings (might not be ideal across outlook versions), or installing and configuring IMF to work with your server.

I would highly recommend taking an initiative to get everyone on the same outlook version as well. Large deployments of office upgrades can be relatively painless if coordinated and setup properly.

share|improve this answer
I wanted to avoid necessity of configuring simple rule on every user computer and as an alternative you are proposing to install on every computer quite new piece of software ...It means more work and troubles then I have now ... – user71061 Mar 5 '11 at 21:51
How many users/conputers is this solution for? – pablo Mar 5 '11 at 22:01
About 50, but does it really matter how many? I'm looking for header field, which when added to message header will cause for 100% classifying this message as a spam and thus moving it junk e-mail folder. I don't want any new anti-spam solution, as existing one (spamassassin running on another server) is working good enough. Junk e-mail filter is already available on every client computer and I only want to give this piece of software small hint: "Hey, this message was already checked and it is definitively a spam". – user71061 Mar 5 '11 at 22:14
50 compared to 1000 can make a big difference and in my experience installing a software package across 50 machines would be easier than an outlook rule. Unfortunately I do not know of a simple way to fix what you require. – pablo Mar 5 '11 at 22:17

With all your client limitations (different OS's, different Outlook versions) to me trying to manage Outlook is out of the question unless you want to undertake that effort to unify on one version (which I highly recommend).

Best option is to upgrade Exchange where you can have better control over this in 2010.

The next best option is Exchange 2003 Event Sink's which you can create a script to do what you want before they hit the mailbox. Google is your friend.

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.