Easy Spam Fighter 1.0
Credit to http://olicomber.co.uk/blog/b/Easy,_reliable_spam_fighting_with_Exim

this version has been modified for use with a DirectAdmin System.
It requires a minimum of exim.conf 4.2.4 and exim.pl 19

It also requires exim be compiled with dnsdb, which can be confirmed with:
exim -bV | grep ^Lookups
The default Makefile in CB has been updated to include this lookup, so just recompile exim to get it:
http://help.directadmin.com/item.php?id=125

====================================
Installation:

cd /etc
wget -O exim.easy_spam_fighter.tar.gz http://files1.directadmin.com/services/exim.easy_spam_fighter.tar.gz
tar xvzf exim.easy_spam_fighter.tar.gz
cd exim.easy_spam_fighter
cp variables.conf.default variables.conf

and ensure you have
/etc/exim.conf 4.2.4+
/etc/exim.pl 19+
dnsdb in exim -bV Lookups

Make sure you have this binary:
/usr/bin/spfquery

====================================
About:

The Easy Spam Fighter (simplied wording from "Easy, Reliable, Spam Fighting, with Exim")
is a set of exim ACLs that do various checks, and any check that returns a result (possible spam)
it then increases the score (saved and incremented in $acl_m_easy69)
At the end of the DATA ACL, if the score is below the limit, run a basic smtp-time SpamAssassin call
and add the "int_score to acl_m_easy69. (eg: 2.7 has int score of 27)
If already above the limit, don't bother running SpamAssassin, as it will be spam already.
This last skip will save CPU processing.

After all that, if the score is above a threshold, the message is rejected, at SMTP-time, and it never enters your queue.
If it's below the threshold, multiple headers are added to explain each score.

====================================
Files:

-- variables.conf.default
This file should be renamed to variables.conf.
set the values in this file as desired.
EASY_LIMIT = 55			- max score before an email is considered spam before SA is rung (main purpose is just to decide if SpamAssassin run is needed)
EASY_IS_SPAM = 20		- this is a nudge score. If SpamAssass determines it's spam (based on the User threshold), this extra score is added, on top of the spam_score_int
EASY_HIGH_SCORE_DROP = 100	- very high scoring spam is dropped at this score, and not allowed to enter.
EASY_MX_NOT_A = 20		- score given to an email where the sending IP is not an MX record.  I'm not 100% sold on this rule, set to 0 if you don't like it.
EASY_SPF_PASS = -30		- If the SPF passes, the score drops by this amount
EASY_DKIM_PASS = -20		- If the DKIM Passes, the score drops by this amount
EASY_NO_REVERSE_IP = 30		- Sender IP must have a reverse IP lookup, or this score is added.
EASY_DNS_BLACKLIST = 50		- IP that is in a dns black list (RBL) gets this score
EASY_SPAMASSASSIN_MAX_SIZE = 200K	- max size that SpamAssassin will scan.

-- check_mail.conf
Does the MX dns checks, SPF record checks, and reverse IP check.

-- check_rcpt.conf
Check on the RBLs and add score

-- check_message.conf
will run SpamAssassin if the score is low enough, but above that score, it doesn't bother.
If run, the int spam score is added.
After, the message is decided if it should be dropped.

