This file contains several "HACK"s for sendmail 8.8 to reject e-mails
from spammers and to prevent the abuse of your machine as a mail
relay.

An explanation can be found at:
<URL: http://www.informatik.uni-kiel.de/%7Eca/email/check.html >

The HACKs are:
check_mail.m4
check_mail2.m4
check_rcpt.m4
check_rcpt3.m4
check_rcpt4.m4
spamdoms.m4
spammers.m4
use_ip.m4
use_names.m4
use_relayto.m4

and are used as follows:
1a) check_mail (uses plain files for matching):
HACK(spammers)
HACK(spamdoms)
Both take an optional argument (the file to use).
The default filenames are listed below.

HACK(check_mail)

1b) check_mail2 (uses databases for matching):
HACK(check_mail2)

2a) check_rcpt4:
HACK(use_ip)
HACK(use_names)
HACK(use_relayto)

HACK(check_rcpt4)

2b) check_rcpt (old version, use check_rcpt4):
HACK(use_ip)
HACK(use_names)
HACK(use_relayto)

HACK(check_rcpt)

The first ones may have a parameter to define the name of the file to
be used.

1a)
If you want to use check_mail, do the following: Put

HACK(spammers)
HACK(spamdoms)
HACK(check_mail)

in your .mc file. Put addresses of well-known spammers (e-mail addresses,
domains) in the appropriate files [default]:
spammers	[/etc/mail/Spammer]	
spamdomains	[/etc/mail/SpamDomains]	

1b)
If you want to use check_mail2, do the following: Put

HACK(check_mail2)
This has also an optional argument, the default is given below.

in your .mc file. Put addresses of well-known spammers (e-mail addresses,
domains) in the appropriate database [default]:
junk	[dbm /etc/mail/junk]	

The format is:
junk.domain JUNK
spammer@address.domain SPAMMER
Create the database (man makemap) in the chosen format.

2a)
If you want to use check_rcpt, do the following: Decide whether you
wan to use the check for local machines by IP number (use_ip) or by
name (use_names). Next, decide whether you want also allow relay to
several machines in addition to those you accept as local (class w).
Depending on your selection, put some of the first three HACKs into
your .mc file, and always use the last one.
HACK(use_ip)
HACK(use_names)
HACK(use_relayto)
All take an optional argument (the file to use).
The default filenames are listed below.

HACK(check_rcpt4)

Put the appropriate values in the files:
use_ip		[/etc/mail/LocalIP]	
use_names	[/etc/mail/LocalNames]	
use_relayto	[/etc/mail/RelayTo]	

1997-03-16: check_rcpt4 can now make use of use_ip and use_names.
It replaces check_rcpt3, which is still available if there is
a problem with the new version.

Make sure you understand what you do and you test this stuff
before you use it on a production machine!
I don't guarantee for anything!
If you have any suggestions, comments, enhancements,
please let me know.

Claus Assmann	<ca@informatik.uni-kiel.de>
Last update: 1997-05-08
