Setting up Spam filter on Dragon.rutgers.edu Mail server
Copyrights © 2002 Hanz Makmur - Rutgers University
All mail delivered to username@cs.rutgers.edu is now checked for spam. The system we use to tag spam email is called SpamAssassins. It marks email as spam based on a scoring system. The SpamAssassins adds anotations to email headers but does NOT perform any filtering; instead, the filtering option is left to individual users preference.
In order to install a spam filter on your dragon.rutgers.edu mail, there are two options that you can choose:
A. Setup a filter to store spam email on a different mailbox. (recommended)
B. Setup a filter to delete spam email immediately.
The SpamAssassins program is not perfect. It is possible that you will have false positive where a valid email is tagged as spam. As a result, option A above is the best option to follow. This option will allow a user to examine email that is tagged as spam and delete it at a later time.
No matter which option you choose, you need to login to the server first. To login, you need to open your browser and connect to: http://dragon.rutgers.edu. Enter your username and password to login. You will be taken to the window shown in Picture 1.
Picture 1.
A. Setup a filter to store spam email on a different mailbox. (recommended)
To setup a spam filter to store spam email, you need to:
1.Create a Mailbox and name it: spam.
To create a Mailbox, enter the name of the mailbox, in this example we call it spam. Click on the Create Mailbox button to create the mailbox.
Picture 2.
2. Add a Rule.
To add a rule, you will need to click on the Rules link along the top of the window. The window shown in Picture 2 will open. To add a rule, follow the following steps:
Step 1. Enter filterspam the name of the rule.
Step 2. Click on the Add Rule button. Once you click on the Add Rule button, the window shown in Picture 3 will show.

Picture 3
3. Edit a Rule
To create the rule, click on the Edit link shown in Picture3 and the window shown in Picture 4 will open.

Picture 4
4. Create the filter spam rule by selecting items from the menu. Follow Picture 4 above as your guide.
Step 1. Select: Header Field from the popup menu in Data field.
Step 1a. select "is"from the Operation field.
Step 2. Enter exactly: X-Spam-Flag: YES in the Parameter field.
(notice a space before the word YES and capitalization of the words)
Step 3. Select Stored in from the popup menu under Action header.
Step 4. Enter spam in the Parameters field.
Step 5. Click on the Update button to save your changes.
Picture 5.
As soon as the Update button is clicked, the window shown in Picture 5 will open. Continue your setup by following steps below:
Step 6. Select Discard from the popup menu under Action header
Step 7. Click on the Update button to save your changes
5. Logout by clicking on the Logout option and quit from your browser.
6. Refresh your Mailbox list.
In order for the spam mailbox to show up on your Mailbox list you will need to refresh your mailbox list.
Run your mail client. Depending on the mail client the steps to refresh the mailbox list is different.
For Outlook Express 5 on MS Windows,
-you will need to click using using your right mouse button on dragon.rutgers.edu mailbox
-Select Reset List from the popup Menu to reset the mailboxes.
For Netscape 4.x,
-Click on the File Menu and select Subscribe.
-A Window will open with a list of all your mailboxes. Click on the Refresh List button.
-A list of all your mailboxes will show up. Check on spam to subscribe the spam mailbox.
For Outlook Express on the Macintosh
- Go to the View menu and select Get Complete Folder List
For Entourage for the Macintosh,
-Click on the dragon.rutgers.edu mailbox. A list of your mailboxes will open on the right window pane.
-Click on the Update List button to update your mailboxes list.
-Click on Spam in your mailbox list and click the Subscribe button.
If you are using other programs, please look at your online help or manual to find out how to reset the Mailbox list.
7. Testing your spam filter
To test the filter above, simply forward yourself an email you think is spam. When the email is classified as spam, it will be stored into your spam folder.
B. Setup a filter to delete spam email immediately.
This option is not recommended. Support staff WILL NOT be able to recover email deleted by this filter. If you still prefer to delete all spam mail immediately, follow steps below:
1. Follow choice A step 1 to 3.
1a. Create the filter spam rule by selecting items from the menu. Follow Picture 4 above as your guide.
2. Make sure to change your filter spam rule as shown in Picture 6 below.

Picture 6.
Step 1. Select: Header Field from the popup menu in Data field
Step 1a. select "is"from the Operation field.
Step 2. Enter exactly: X-Spam-Flag: YES in the Parameter field.
(notice a space before the word YES and capitalization of the words)
Step 3. Select Discard from the popup menu under Action header
Step 4. Click on the Update button to save your changes
Header Field is X-Spam-Flag: YES Store in spam Discard
5. Logout by clicking on the Logout option.
Testing your spam filter
To test the filter above, simply create a new mail containing this string:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
and send it to yourself. This mail will arrive as spam. When the email is classified as spam, you will not see the forwarded email arriving in your Inbox.
There are situation when you just DO NOT want certain email address to be classified as spam no matter what the reason. For this situation, you should modify the spam rule above to look like below:
To prevent email from certain email address be stored in your spam folder, simply modify the above rules to look like
Header Field is X-Spam-Flag: YES From not in *username1@hostname1.com*, *username2@hostname2.com* Store in spam Discard
There are situation when you just want certain email address to be classified as spam no matter what the reason.
To always store email from certain email address into your spam folder, you simply create a new rule like below.
From is in *username1@hostname1.com*, *username2@hostname2.com* Store in spam Discard
Many users do not speak Russian, Chinese or Arabic language but there are so many spam that come in different languages which should automatically be tagged as spam. At the same time, some users would like to see certain languages be exempt from spam check. Luckily, there is a way to tag email based on the language it is written on.
To implement language tagging, you need only to modify step 1a and step 2 above.
For example:
To have all Spam, Rusian and Chinese email routed to your spam folder, make a rule to look like below:
Header Field in X-Spam-Flag: YES, X-Spam-Language: *ru*, X-Spam-Language: *zh* Store in spam Discard
To have all Greeks and Hebrew email to always go to your INBOX folder, make a rule to look like below:
Header Field is X-Spam-Flag: YES Header Field not in X-Spam-Language: *el*, X-Spam-Language: *he* Store in spam Discard
If you would to filter other languages, simply add more of the header and separate then by a comma. Note: the asterisk(*) is required to detect the occurance of the language in cases of multiple languages are detected in one email.
Here are a list of other languages:
af - Afrikaans am - Amharic ar - Arabic be - Byelorussian bg - Bulgarian bs - Bosnian ca - Catalan cs - Czech cy - Welsh da - Danish de - German el - Greek en - English eo - Esperanto es - Spanish et - Estonian eu - Basque fa - Persian fi - Finnish fr - French fy - Frisian ga - Irish Gaelic gd - Scottish Gaelic he - Hebrew hi - Hindi hr - Croatian hu - Hungarian hy - Armenian id - Indonesian is - Icelandic it - Italian ja - Japanese ka - Georgian | ko - Korean la - Latin lt - Lithuanian lv - Latvian mr - Marathi ms - Malay ne - Nepali nl - Dutch no - Norwegian pl - Polish pt - Portuguese qu - Quechua rm - Rhaeto-Romance ro - Romanian ru - Russian sa - Sanskrit sco - Scots sk - Slovak sl - Slovenian sq - Albanian sr - Serbian sv - Swedish sw - Swahili ta - Tamil th - Thai tl - Tagalog tr - Turkish uk - Ukrainian vi - Vietnamese yi - Yiddish zh - Chinese (both Traditional and Simplified) zh.big5 - Chinese (Traditional only) zh.gb2312 - Chinese (Simplified only) |
Further Readings
If you are using CS unix system as your mail server, there are separate instructions on how to create a rule. Please see How to Get Rid of Spam Email.