Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

Adding a New Filter to Evolution 361

• Figure 47-5: Your new SpamAssassin Configuration File.

You may need to create the .spamassassin subdirectory in your home directory.

3. Click Save, and your configuration file is copied into place.

Need to tighten your configuration? Just revisit the Configuration Generator and copy the new configuration file into place over the old one. Easy!

Figure 47-6: The Evolution Filters dialog.

3.Click the Add button.

The Add Rule dialog opens, as shown in Figure 47-7.

Adding a New Filter to Evolution

After you’ve created an awesome spam filter by configuring SpamAssassin, you’ll want to apply it to your e-mail client. If you’re using Evolution, the process is simple:

1. Open your Evolution e-mail client.

2. Open your Inbox, and choose Tools Filters

from the menu bar. • Figure 47-7: Add a new rule for SpamAssassin.

The Filters dialog opens, as shown in Figure 47-6.

362 Technique 47: Stopping Spam with SpamAssassin

4. Enter a new name in the Rule Name field.

In the drop-down list box to the right of the Sender field, choose Pipe Message to Shell Command. Then to the right of that drop-down list box, enter:

spamc -c > /dev/null

5. Use the arrow to the right of the Returns field to open the drop-down list box and change the field to Returns Greater Than.

6. Click the Click Here to Select a Folder field to open the Select Folder dialog, shown in Figure 47-8.

Figure 47-8: The Select Folder dialog.

7.Click the New button to open the Create New Folder dialog, shown in Figure 47-9.

8.Enter a name for your junkmail folder in the Folder Name field.

Harry or Roger would work, but we call ours junkmail.

9.Highlight Local Folders in the Summary list, and click OK.

10.Select your new junkmail folder from the list in the Select Folder dialog. Then click OK.

• Figure 47-9: Create a new junkmail folder.

The completed rule is displayed, as shown in Figure 47-10.

• Figure 47-10: The completed rule.

The new rule is now included in the Filters list.

Serving Up a Big Bowl of the RulesDuJour 363

11. Click OK to close the dialog.

SpamAssassin is now actively protecting you and your Evolution account from spam.

Serving Up a Big Bowl

of the RulesDuJour

RulesDuJour is a neat script that downloads new SpamAssassin rule sets. Spammers are becoming more sophisticated (well, more persistent anyway) on an almost daily basis. Keeping your rule set up-to-date helps SpamAssassin screen the spam more efficiently.

To install RulesDuJour, follow these steps:

1. Open your Web browser and surf to

www.exit0.us/index.php/RulesDuJour

2. Scroll down the page and click the download link for rules du jour. When the download manager opens, save the files to your home directory.

3. Open a terminal window and edit the rules_du_jour file:

$ kedit rules_du_jour

4. Scroll down and change the entry in line 40 to this:

[“${SA_DIR}”] || SA_DIR=”/etc/mail/ spamassassin”;

5. Change the entry in line 44 to this:

[“${MAIL_ADDRESS}”] || MAIL_ADDRESS= ”example@e-mail.com”;

6. Save the file and close the editor.

7. Make the script executable with the following command:

$ chmod u+x rules_du_jour

8.To run the script, give yourself superuser privileges with the su command and then enter the following command:

./rules_du_jour

Rules Du Jour goes to work and retrieves the most recent rule set for SpamAssassin.

This task is a natural for automating. Check out Technique 20 for information about using Task Scheduler to schedule RulesDuJour to run nightly, while network usage is low.

48 Using Webmin to Simplify Sendmail

Technique Configuration

Save Time By

Installing Sendmail

Using Webmin to configure Sendmail options

Configuring Sendmail to service multiple domains

Allowing e-mail relaying for remote employees

Using Sendmail aliases to distribute e-mail

The Internet e-mail system consists of three components:

MUA (mail user agent): Evolution and Mozilla mail are both popular mail user agents (also known as e-mail clients).

MDA (mail delivery agent): The MDA moves the e-mail from Sendmail into your local mailbox. Procmail is a popular Linux MDA.

MTA (mail transfer agent): The MTA moves e-mail from one machine to another across the Internet. Sendmail is an MTA.

Most users’ interaction with e-mail stops with their mail agent, when they press the Send button. However, if you’re running the mail service for a domain (rather than having an ISP provide the mail service), you need to interact with the mail transfer agent.

Sendmail is easy to use, but also incredibly flexible and powerful. In this technique, we introduce you to Sendmail, and the easy-to-use configuration interface provided by Webmin. If you need to manage configuration files, Webmin is a definite timesaver.

Registering Your Address

Before you can send or receive e-mail with Sendmail, you need a registered domain name. You can purchase a name with a permanent address from an ISP or a name registry, or use a free Dynamic DNS service for sites that change addresses from time to time. Technique 42 has good information about using Dynamic DNS services — check it out.

Taming a Sendmail Server

Setting up an e-mail server with Sendmail is simple. The sendmail RPM packages are included in most Linux distributions, and come with a

Соседние файлы в предмете Операционные системы