Web linux-server.50webs.com

Linux Mail Server

Filtering Out Spam at the Mailer (Part 3):

All of the lines in the filter-rules file have the same basic format:

if (condition) then action

The condition can test the contents of the From:, To:, Subject:, and Sender: headers. The content string, which is enclosed in quotes, can be a partial string and can use wildcard characters to match more than a single case (*.gov is an example). The action can delete the message, save it in a mail folder, forward it to another address, or pass it to another program for further processing.

filter is easy for users to understand and use. However, filter is not delivered with all Linux systems because elm is no longer widely used. Most users tend to use the filtering mechanism that comes with the mail reader they use.

Filtering with Netscape

Many users use Netscape to read their e-mail. They can, of course, use the filter program or procmail (which is discussed next) to filter mail, even if they then read the mail with the Netscape mail reader. However, Netscape provides its own mail-filter capability, which is particularly suited to those users who prefer a graphical interface.

Note:
For these examples, we use the version of Netscape delivered with Red Hat 7.2.

From the Edit menu in the Netscape Messenger window, select Message Filters and then click on New in the Message Filters window to open the Filter Rules window shown in the figure below.

Defining Netscape filter rules

Next: Filtering Out Spam at the Mailer (Part 4)

.