README revision 30581
1	Filtering out SPAM from your site
2
3Introduction:
4	The FreeBSD Project filters spam, unsolicited commerical
5e-mail, from its mailing lists.  The filter has two parts: databases
6and rulesets.  We have added three rulesets to /etc/sendmail.cf,
7check_relay and check_mail and xlat. (xlat is for testing only, as
8explained in /etc/mail/sendmail.cf.additions.) These rulesets use
9two databases.  The denyip, a list of IP addresses, and spamsites,
10a list of domains.  We do not accept mail from any machine that
11matches a entry in either database.
12
13Filtering at your site:
14	To filter spam at your site you need to:
15	1. modify your /etc/sendmail.cf, 
16	2. retrieve the database source files from the master site,
17	3. make the databases and 
18	4. finally signal sendmail that the configuration file has changed.
19
201. Modifying your /etc/sendmail.cf
21	Add the database declarations and the rulesets contained
22in /etc/mail/sendmail.cf.additions to your .mc file.  If you do
23not use m4 to generate your /etc/sendmail.cf, add the database
24declarations to your /etc/sendmail.cf.
25
262. Fetching the database source files:
27	The database source files are available from Gulf Coast
28Internet via anonymous FTP.  The Makefile in /etc/mail will retreive
29the source files for you: as root, type "cd /etc/mail; make" at
30the command line.  The previous version of the database source
31files is moved to <filename>.0.  Local additions should be kept in
32separate files.  We use spamsites.local and denyip.local.  You may
33want to diff the new versions of the files against the previous
34versions to see what has changed.
35
363. Make the databases:
37	As root, type "cd /etc/mail; make install" will build the
38two databases from the retrieved source files and the local additions
39files.
40
414. Signaling sendmail:
42	Sendmail will reread its configuration whenever sendmail
43receives a HUP signal.  As root, type "kill -HUP `cat
44/var/run/sendmail.pid`".  Check sendmail's log file to be sure that
45it has restarted.  /var/log/maillog should contain the line:  "Oct
4615 08:59:16 hub sendmail[6565]: restarting /usr/sbin/sendmail on
47signal".  Most likely, the date, time, hostname and process id will
48be differ.
49
50Testing the spam filter:
51
52How can I tell if its working:
53	The mail log file, /var/log/maillog, will contain a line
54for every message filtered.  The lines will be similar to one of
55these two log entries:
56
57Check_mail rejects:
58"Oct 15 02:43:26 hub sendmail[6565]: CAA06565: ruleset=check_mail,
59arg1=<announce@martianconsulate.com>, relay=xxx.isp.net [###.###.###.###],
60reject=521 <announce@martianconsulate.com>"
61
62Check_relay rejects:
63Oct 19 04:45:24 hub sendmail[3503]: NOQUEUE: ruleset=check_relay,
64arg1=imsp015.netvigator.com, arg2=205.252.144.206, relay=root@localhost,
65reject=521 blocked.contact postmaster@FreeBSD.ORG
66