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

Step 1: Back up important files

cd /etc/mail
cp sendmail.mc sendmail.mc.old
cp sendmail.cf sendmail.cf.old

Step 2: Install needed packages:

cd /etc/yum.repos.d
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
wget http://centos.karan.org/kbsingh-CentOS-Misc.repo
yum install clamav* spamass-milter pyzor perl-Razor-agent

Step 3: Edit /etc/mail/sendmail.mc

Paste these lines of code toward the end of the file before the line that says: MAILER(smtp)dnl

#DNS Black Lists

dnl FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} " refused. Rejected for bad WHOIS info on IP of your SMTP server - see http://www.rfc-ignorant.org/"')

dnl FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to OPEN PROXY SERVER "$&{client_name}" by easynet.nl DNSBL (http://proxies.blackholes.easynet.nl/errors.html)"', `')

dnl FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')

dnl FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml"')

#Spamassassin and Clam Anti-virus Filter (milter)

INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter/spamass-milter.sock, F=,T=C:15m;S:4m;R:4m;E:10m')dnl

INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=T, T=S:4m;R:4m')

Note: These lines are really long, so I added an extra line break in between to improve clarity.

Step 4: Rebuild the Sendmail Config file

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Step 5: Turn on Virus Filtering

Open /etc/freshclam.conf and look for the Line that starts with the word: EXAMPLE  Please just comment it out by prepending a # to make the line read: #EXAMPLE

Open /etc/clam.d/milter.conf and look for the Line that starts with the word: EXAMPLE  Please just comment it out by prepending a # to make the line read: #EXAMPLE

Spam Configuration - Part 2 ->

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


del.icio.us

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