User Guide: Set up Junk Mail Filters

Main menu | Add filters | Set up whiltelist and blacklist | Enable spam auto-filtering | Filter management ]


1 Introduction

Junk Mail Filters can be regarded as a special kind of email tool that would allow email users to discard unwanted email messages, i.e. junk or spam messages. This kind of email tool operates according to a set of user-defined Filter Rules.

Junk Mail Filters can be set up using two different kinds of methods, namely, the Client-Side Junk Mail Filter and the Server-Side Junk Mail Filter.

Client-Side Junk Mail Filters are set up on the users’ desktop machines. Outlook Express and Eudora email client programs both support the use of Client-Side Filters. These filters are activated when you retrieve your email messages from the backend email server to your desktop machines.

Server-Side Junk Mail Filters are set up on the backend email servers. They are activated whenever an email message is delivered to your mailbox on the backend email server. Normally, you do not need to initiate its operation.

Using the Server-Side Filter, you can specify 3 different types of actions:

  1. Set up Personal Whitelist. Using this function, you can specify the email messages that you always accept to your INBOX folder.
  2. Set up Personal Blacklist. Using this function, you can specify the email messages that you always reject.
  3. Enable Spam Auto-Filtering. Using this function, you can define your own Spam Level. If an incoming email message is evaluated by the backend server to have a spam level higher than your defined threshold, it will be moved to an AUTO-PURGE Folder. Messages kept in this folder will be purged automatically after 30 days.

Note for POP3 users who want to set up the Server-Side Filter: Since messages that have been moved to the AUTO-PURGE Folder cannot be retrieved by the POP3 email client, users need to use WebMail email client to access messages in the AUTO-PURGE Folder if they want to manage these messages.

Detailed information of the above functions will be elaborated in the following sections.


2 Main Menu: Server-Side Junk Mail Filters Management

You can go to the main menu of the system by the following steps:

  1. Go to the email services pages at http://email.cityu.edu.hk
  2. Click the "Set up Junk Mail Filters" link
  3. Enter your EID and Password.
  4. Click the "Enter" buttom. Then you will see the "Server-Side of Junk Mail Filters Management" menu.

There are five functions under the "Server-Side of Junk Mail Filters Management" menu:

Function Explanation
Add Filters Function to set up the 3 different types of Server-Side Junk Mail Filter Actions.
Edit Filters Function to modify the set up of any of the Filter Actions
Remove Filters Function to remove any of the defined Filter Actions.
Change Filter Orders Function to change the defined operating sequence of the Filter Actions. Note that the "Spam Auto-Filtering" action is always the last one to be executed.
Quit Function to quit the Server-Side Junk Mail Filter tool.

3 Add Server-Side Junk Mail Filters 

After clicking the "Add Filters" button of the Main Menu, you will go to the "Add Server-Side Junk Mail Filters" sub-menu.

There are four functions under the "Server-Side of Junk Mail Filters Management" menu:

Function Explanation
Set up Whitelist Function to specify the email messages that you always want to accept into your INBOX Folder.
Set up Blacklist Function to specify the email messages that you always want to either discard or move to the AUTO-PURGE Folder.
Enable Spam Auto-Filtering Function to filter the junk email messages according to your defined Spam Level and move these messages to the AUTO-PURGE Folder.
Return to Main Menu Function to return to "Server-Side Junk Mail Filters Management".

4 Set up Your Personal Whitelist and Blacklist 

This system allows you to set up your personal whitelist to specify the characteristics of email that you always want to accept. Similarly, you can also set up your personal blacklist to specify the characteristics of email that you always want to reject.

4.1 (Step 1) Go to the Set up Whitelist / Set up Blacklist menu

  1. Go to the "Server-Side Junk Mail Filters Management" menu (see Section 2).
  2. In the "Server-Side Junk Mail Filters Management" menu, click the "Add Filters" button.
  3. In the "Add Filters" menu, click the "Set up Whitelist" or the "Set up Blacklist" button.

4.2 (Step 2) Selecting the header line

This system can accept (using whitelist) or reject (using blacklist) an email based on the characteristics shown in any of the following mail headers:

From:
Reply-to:
Return-Path:
To:
Cc:
Subject:
Received:

If you want to know how to display the full headers of an email, please refer to this Email FAQ.

4.3 (Step 3) Selecting a matching condition

The matching is performed case-insensitively. That is, the phrases "Tommy", "TOMMY", and "tommy" are considered as the same.

There are three conditions to match an email header line with a user-specified phrase (string):

a) "contains". The matching is success if the header contains the user-specified phrase.

The following are some examples:

Header line User-specified Phrase Contains?
taiman.chan@dummy.org taiman.chan@dummy.org Yes
taiman.chan@dummy.org taiman.chan Yes
taiman.chan@dummy.org chan@dummy.org Yes

b) "exact matches". The matching is success only if the header line exactly matches (case-insensitively) the user-specified phrase.

The following are some examples:

Header line User-specified Phrase Exact matches?
taiman.chan@dummy.org taiman.chan@dummy.org Yes
taiman.chan@dummy.org taiman.chan No
taiman.chan@dummy.org chan@dummy.org No

c) "wildcard matches". In this case, users can use the following two wildcard characters:

  1. " * " matches zero or more characters
  2. " ? " matches a single character

The following are some examples:

Header line User-specified Phrase Wildcard matches?
taiman.chan@dummy.org taiman.chan@* Yes
taiman.chan@dummy.org taiman.????@dummy.org Yes
taiman.chan@dummy.org *@dummy.org Yes

4.4 (Step 4) Entering a Phrase to match

In this step, you need to input the phrase you want match with the mail headers. Currently, only English phrases (ASCII characters) are allowed. Double-byte characters like Chinese characters are NOT allowed.

4.5 (Step 5) Action after matching

For whitelist filters, if the matching condition success, then the email will be moved into your INBOX. No further actions will be performed.

For blacklist filters, you can choose either of the following actions:

  1. Discard the message: The message will be removed silently. Both you and the the sender will not be notified and there is no way to retrieve the message once it is discarded.
  2. File the message into the AUTO-PURGE folder. The message will be moved into a special folder named "AUTO-PURGE". Please refer to Section 4.6 for the details of the AUTO-PURGE folder.

4.6 Information about the AUTO-PURGE folder

The "AUTO-PURGE" folder is a special folder. Any email messages in the AUTO-PURGE folder will be permanently removed by the system after 30 days.

Note for POP3 users: Because the POP3 protocol can only retrieve email in the INBOX/Newmail folder, any messages moved to the AUTO-PURGE folder cannot be retrieved by POP3 email clients. If your mail client (e.g. Eudora) is using the POP3 configuration, you need to use an IMAP email client, such as the WebMail, to access these messages For details, please refer to this Email FAQ.


5 Enable Spam Auto-Filtering 

All external incoming emails are scanned by spam-detection software. Each email is tagged with the "spam level", which is a number representing the likelihood that the email is spam, in its mail headers.

The "spam level" is indicated in the "X-Spam-Level" header line of an email. A greater value (e.g. 9) means that the email has a higher probability of being spam. Conversely, a smaller value (e.g. 1) means that the email has a relatively lower probability of being spam. (If you want to know how to display the full headers of an email, please refer to this Email FAQ)

If you want to make use of this automatic spam-detection mechanism to filter your junk mail, you can use the "Enable Spam Auto-Filtering" function (under the "Add Filters" menu) of the system.

Please be aware that no spam-detection software can be 100% accurate. Unlike virus scanning that can use exact pattern matching; there is no exact pattern for spam. Moreover, in order to avoid being identified, spammers may disguise their spam by sophisticated techniques. Hence, two types of errors may occur in any automatic spam identification system:

  1. False positives. It means that some legitimate email is erroneously marked as spam. Usually it is because that email has certain spam-like characteristics.
  2. False negatives. It means that a mail you considered as spam is not marked as spam by the system.

Users can reduce the probability of false positives by (a) set up your personal whitelist, and/or (b) increase your personal spam threshold.

Similarly, Users can reduce the probability of false negative by (a) set up your personal blacklist, and/or (b) decrease your personal spam threshold.

5.1 (Step 1) Go to the "Enable Spam Auto-Filtering" menu

  1. Go to the "Server-Side Junk Mail Filters Management" menu (see Section 2)
  2. In the "Server-Side Junk Mail Filters Management" menu, click the "Add Filters" button
  3. In the "Add Filters" menu, click the "Enable Spam Auto-Filtering" button.

5.2 (Step 2) Select your Personal Spam Threshold

Users only need to choose their personal spam threshold. The spam threshold is an integer. The spam level ranges from 3 to 10. A smaller threshold (e.g. 3) filters more mail while a larger threshold (e.g. 10) filters less mail. The system will automatically move the email with spam level greater than or equals to your personal spam threshold to the AUTO-PURGE folder. The system will remove messages in this folder after 30 days. (Please refer to Section 4.6 for details about the AUTO-PURGE folder).


6 Filter Management 

Besides adding the filters for whitelist, blacklist, and spam auto-filtering, the system has provided three functions for filter management.

6.1 Edit filters

Users can use the following steps to modify their existing mail filters:

  1. Go to the "Server-Side Junk Mail Filters Management" menu (see Section 2).
  2. In the "Server-Side Junk Mail Filters Management" menu, click the "Edit Filters" button.
  3. In the "Edit Filters" menu, first select (by clicking on its corresponding radio button) the filter you want to modify;
  4. Then, click the "Edit Filter" button.

6.2 Remove filters

Users can use the following steps to delete their existing mail filters:

  1. Go to the "Server-Side Junk Mail Filters Management" menu (see Section 2).
  2. In the "Server-Side Junk Mail Filters Management" menu, click the "Remove Filters" button.
  3. In the "Remove Filters" menu, first select (by clicking on its corresponding radio button) the filter you want to modify;
  4. Then, click the "Remove Filter" button.
  5. Confirm the removal operation.

6.3 Change filters order

The order of the filters is important because when the filters are invoked, each message is matched against each filter in order from top to bottom. If the message meets a filter’s criteria, the specified action is done, and the filter process ends without matching subsequent filters (if any).

Example:
For example if you have two filters:

X: Accept all mail from "tommy@dummy.org" (whitelist)
Y: Discard all mail from "*@dummy.org" (blacklist, with wildcard matches)

If you place filter X before filter Y, then email from "tommy@dummy.org" will always be accepted. However, if you please filter Y before filter X, then email from "tommy@dummy.org" will always be discarded.

The "spam auto-filtering" filter, once created, will always be placed at the bottom of your filter list by the system automatically. Users cannot change the order of such filter.

Users can use the following steps to modify the order of their existing mail filters:

  1. Go to the "Server-Side Junk Mail Filters Management" menu (see Section 2).
  2. In the "Server-Side Junk Mail Filters Management" menu, click the "Change filters order" button.
  3. In the "Change Filters Order" menu, first select (by clicking on its corresponding radio button) the filter you want to move up or move down;
  4. Then, click the "Move Up Filter Order" or the "Move Down Filter Order" button.

Return to University In-house Email Service FAQ page

IT.ServiceDesk@cityu.edu.hk