Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

How to Blacklist by subject

I'm new to Exchange & AntiSpam/AntiVirus. We have implemented an IronPort C150 AntiSpam appliance. I have it set so that Spam gets deleted, but suspected spam gets delivered and my users can decide if they need it or not. Well, we're getting a lot of "medicine" emails that aren't getting deleted. I know how to blacklist by sender, but was wondering if I can blacklist by subject keyword. I would like to delete any emails that come in with Viagra or Cialis in the subject line. What's the best way to do this?

New Member

Re: How to Blacklist by subject

You can create an incoming content filter that looks for those keywords in the subject and then dropping the mail as the action. Here's a basic outline on how you should proceed.

1. Click on "Mail Policies > Incoming content filters". Click on Add Filter
2. Give the filter a name. For your condition, select "Subject Header"
3. Enter in this: (?i)(viagra|cialis|etc)
4. For your action, select "Drop (Final Action)"
5. Submit
6. Then click on "Mail Policies > Incoming mail policies"
7. For the "Default policy", click on Content Fitlers link.
8. Enable the content filters if it's not already enabled and then enable the new content filter that you created on Step #2.
9. Then, Submit and Commit Changes.

To test this, go to "System Administration > Trace" and send in a test message to verify that the new incoming content filter works.

For the IP and domain, you can use and

New Member


If you are going to have a lot of subjects, consider creating a dictionary and putting the subjects in there and then use subject-dictionary-match.

New Member

Re: How to Blacklist by subject

What's the benefit of the subject-dictionary match? For if the keyword is not in the subject but is in the body?

New Member

Re: How to Blacklist by subject

If there is a lot of terms that you want to compare to, it may be in your interest to add all the terms to a dictionary file (Mail Policies > Text Resources).

Then, once that dictionary is created, you can use either subject-dictionary-match() or body-dictionary-match().

The benefit of putting the terms in a dictionary file is that if there are a lot of terms, it is easier to manage and maintain in a dictionary file as oppose to adding all the terms to one line, separated by a pipe symbol "|".

New Member

Subject filtering

I have been using the Incoming Content Filtering / envelope sender and using the "contains" syntax that will block specific words or strings. I has been working quite well. You can also use this for blocking specific addresses that are coming in. I have the C160 appliance.

CreatePlease login to create content