NetworkClue.com
NetworkClue Home PageHome Contact UsContact ConsultingConsult
Bulletin Board
Internet Services covers Secrets to hosting websites, Hosting your own web server, and using DNS Servers.Operating Systems leads you through the decision of Linux vs. Windows, ideal installations and setups to create an efficient and redundant environment for your business, and great features to make management easier.Routing & Firewalls contains articles that will allow you to take control of your router. Learn how to protect your company with access lists and advanced firewall techniques.Hardware answers the common questions about Switches vs. Hubs, recommends SysAdmin Tools, and recommendations for adequate power protection.Utilities will cover fighting spam, using Anti-Virus programs effectively and the must haves for every administrator's software toolbox.


Bulletin Board

Sendmail

Spam and Virus Filtering Con't

Step 8: Configure Spamassassin

This Spamassassin configuration file is what I have merged from the references at the bottom.  Please paste this content in your /etc/mail/spamassassin/local.cf file

# SpamAssassin config file for version 3.x
# NOTE: NOT COMPATIBLE WITH VERSIONS 2.5 or 2.6
# Partially Generated by http://www.yrex.com/spam/spamconfig.php
# (version 1.50)
# Partially taken from:
# http://www.stearns.org/doc/spamassassin-setup.current.html
# Partially added my own

# How many hits before a message is considered spam.
required_score 7.5

# Change the subject of suspected spam
rewrite_subject 1
rewrite_header subject [SPAM]

# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 0

# Enable the Bayes System
use_bayes 1
bayes_path /home/sharedspam/.spamassassin/bayes
auto_whitelist_path /home/sharedspam/.spamassassin/auto-whitelist
bayes_file_mode 777
auto_whitelist_file_mode 777
bayes_ignore_header ReSent-Date
bayes_ignore_header ReSent-From
bayes_ignore_header ReSent-Message-ID
bayes_ignore_header ReSent-Subject
bayes_ignore_header ReSent-To
bayes_ignore_header Resent-Date
bayes_ignore_header Resent-From
bayes_ignore_header Resent-Message-ID
bayes_ignore_header Resent-Subject
bayes_ignore_header Resent-To

# Enable Bayes auto-learning
bayes_auto_learn 1
auto_learn 1

# Enable or disable network checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
# - english
ok_languages en

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales en

report_header 1
use_terse_report 1
defang_mime 0
report_safe 0

######### End Spamassassin Config File

Step 9: Configure Spam and Ham learning

You need to feed your Bayesian filter immediately to get accurate results.  In your local mail account make a folder called spam.  Then use the script below so that spamassassin can learn about spam the gets through.

touch /etc/cron.weekly/spam-learning
chmod 755  /etc/cron.weekly/spam-learning

Edit this file to contain:

-- Customer e-mail learning in cron.weekly --

sa-learn --dbpath /home/sharedspam/.spamassassin --showdots --mbox
--spam /home/user/Spam

sa-learn --dbpath /home/sharedspam/.spamassassin --showdots --mbox
--ham --local /home/user/Sent

rm /home/user/Spam

touch /home/user/Spam

chmod 775 /home/user/Spam

chown user:user /home/user/Spam

Of course please replace the word: user with your actual username.

You can then execute this script as soon as you get some spam in your spam folder and some ham in your Sent items folder.

Spam Configuration - Part 4 ->

References:

Sample Sendmail configuration file

Spam proof and Virus Filtering e-mail server -
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=4938

Centralized Spam Filtering:
http://www.stearns.org/doc/spamassassin-setup.current.html#sitewide

Spam Assassin Configurator:
http://www.yrex.com/spam/spamconfig.php

Article last reviewed: 12/29/2006

Created by: Digital Foundation, inc.

Copyright © 2002-2005 Digital Foundation, inc. www.networkclue.com

All content of the NetworkClue website is copyrighted. Articles, notes, outlines, and all other materials may not be stored on the Internet or sold or placed by themselves or with other material in any electronic or printed format in whole or part. However materials may be referenced by links to the site.

 

Related Articles:
SMTP Manual TestSMTP Manual Testing
Spam Filtering for Exchange 2003Spam Filtering for Exchange
SMTP AUTH for SendmailSMTP AUTH for Sendmail

Books:



Search Amazon.com for
Books on SMTP Servers