Sendmail anti-spam modifications

The sendmail modifications below replace and supercede the procmail-based filtering I was working on earlier.
LICENSE TERMS:

This code is Copyright Graham Toal, 1997.  I reserve all rights
to this code and accompanying data files except those granted
explicitly here.

I grant paid-up members of the Texas ISP Association (TISPA) a license
to use this code within their own organisations.  They may modify the
software for their own internal use, but modifying the software does not
create any rights to the underlying code that extend beyond this limited
license

This license does not grant the licensees the right to sell or convey the
software or data files to any persons who are not members of TISPA,
although they may pass on any binaries they generate and/or any
documentation they create on how to build the necessary data files.

The right to use this current release of code by a TISPA member
cannot be revoked by me.  However TISPA members have no automatic
right to receive further developments of this code which I may
create for commercial sale or otherwise.

This code was written entirely in my own time and my employer
has no rights in it; however I grant my employer (Valley Tech)
the same rights as Tispa members as listed above.

Anyone who uses this code MUST inform me that they are doing
so.  email to gtoal@gtoal.com will suffice.

Anyone else who is not a Tispa member who wishes to use this code
must request and be given explicit permission from me.  Anyone who
is interested in using this code in or adopting this code for a
commercial program for sale must negotiate licensing terms with me.

This limited license for TISPA members is not transferrable.

By downloading the code pointed to on these pages you agree to these terms.

You may not put pointers to the code anywhere that bypasses this license.

This software is provided on an as is basis, without warranty of any kind,
express or implied.

Graham Toal, 28 May 1997.
There. I'm not a lawyer but I think the intent is obvious enough to hold up in court. Basically I'm just trying to protect my interests if there's a chance I can sell this stuff to a big organisation like Netscape, Microsoft or maybe Cyber Patrol. SpamNOTS anyone?

I am currently working on a replacement for the checkcompat() function in conf.c in the sendmail source which both stops third-party spam and can reject or tag junk mail. Although fairly complex, it is safe to apply this patch to your sendmail because the default behaviour is not to bounce or filter. These features are enabled when appropriate files are created and pointed to in sendmail.cf; also they are not enabled site-wide but per-user according to the presence or otherwise of a ".spamfilter" file in the user's home directory.

This is the first release of the code and does not have all the features that the procmail-based code had, but it is cleaner code, it is datafile-driven and it implements scoring so that the risk of mail being falsely identified as spam is now minimal.

Among the missing features are: user-customizable additions/exceptions to the spam-detection rules; making some of the spam scoring values that are implemented in the C code soft rather than hard-wired.

Here is how to upgrade your sendmail:

Now, if you want to block third-party spam, you must Test the patch by going to a system not listed in localips and sending mail to user%external_host@patched_host
Alternatively, use this test program If it doesn't work for you, change the /usr/bin/perl in the script to point to your local perl5

If you want to turn off blocking of third-party mail, rename the file blocking-YES to blocking-NO


To enable spam filtering for a user, you need to do the following:

STOP PRESS: it has been pointed out to me that there are some missing files in the above distribution, including a critical Makefile and the fastmap source: you can get ALL the files here in dist.tar.
This page is maintained by Graham Toal