--- exim.conf-SpamBlockerTechnology-v4.2.2.txt	2014-07-23 16:09:01.000000000 -0600
+++ exim.conf-SpamBlockerTechnology-v4.2.4.txt	2014-09-11 21:48:41.000000000 -0600
@@ -1,8 +1,8 @@
-# SpamBlockerTechnology* powered exim.conf, Version 4.2.2
-# April 28, 2014  17:54 (-0700)
+# SpamBlockerTechnology* powered exim.conf, Version 4.2.4-alpha2
+# September 9, 2014 03:03 (-0700)
 # Exim configuration file for DirectAdmin
 # Requires exim.pl as distributed by DirectAdmin here:
-# http://files.directadmin.com/services/exim.pl Dated 28-Mar-2008 or later
+# http://files.directadmin.com/services/exim.pl version 19 or higher
 # New version 4.2.1 removes obsolete dnsbl.njabl.org blocklist
 # and two ahbl blocklists; see: # http://forum.directadmin.com/showthread.php?t=48774
 # Edit#42 : entire section now commented out as there is no other
@@ -67,6 +67,12 @@
 # av_scanner = clamd:/var/run/clamav/clamd
 #.include_if_exists /etc/exim.clamav.load.conf
 
+#Block Cracking variables
+.include_if_exists /etc/exim.blockcracking/variables.conf
+
+#Easy Spam Figher variables
+.include_if_exists /etc/exim.easy_spam_fighter/variables.conf
+
 #EDIT#3:
 # qualify_domain =
 
@@ -82,6 +88,7 @@
 #EDIT#7:
 daemon_smtp_ports = 25 : 587 : 465
 tls_on_connect_ports = 465
+disable_ipv6=false
 
 #EDIT#8:
 local_from_check = false
@@ -122,9 +129,13 @@
 syslog_duplication = false
 
 #EDIT#13:
+acl_not_smtp = acl_script
+acl_smtp_auth = acl_check_auth
 acl_smtp_connect = acl_connect
 acl_smtp_helo = acl_check_helo
+acl_smtp_mail = ${if ={$interface_port}{587} {accept}{acl_check_mail}}
 acl_smtp_rcpt = acl_check_recipient
+acl_smtp_dkim = ${if ={$interface_port}{587} {accept}{acl_check_dkim}}
 acl_smtp_data = acl_check_message
 
 #EDIT#14:
@@ -141,6 +152,7 @@
 hostlist bad_sender_hosts_ip = /etc/virtual/bad_sender_hosts_ip
 hostlist whitelist_hosts = lsearch;/etc/virtual/whitelist_hosts
 hostlist whitelist_hosts_ip = /etc/virtual/whitelist_hosts_ip
+BLACKLIST_USERNAMES = /etc/virtual/blacklist_usernames
 
 #EDIT#15:
 #domainlist skip_av_domains = lsearch;/etc/virtual/skip_av_domains
@@ -184,8 +196,23 @@
 
 #EDIT#24:
 acl_connect:
+  warn set acl_m_spam_assassin_has_run = 0
+  .include_if_exists /etc/exim.easy_spam_fighter/connect.conf
   accept hosts = *
 
+acl_check_mail:
+  .include_if_exists /etc/exim.easy_spam_fighter/check_mail.conf
+  accept
+
+#EDIT#24.5#
+acl_check_auth:
+  drop  set acl_m_authcount = ${eval10:0$acl_m_authcount+1}
+        condition = ${if >{$acl_m_authcount}{2}}
+        delay = 10s
+        message = Only one authentication attempt is allowed per connection
+
+  accept
+
 #EDIT#25:
 acl_check_helo:
   # accept mail originating on this server unconditionally
@@ -209,6 +236,24 @@
         hosts = ! +relay_hosts
   accept
 
+acl_script:
+  discard set acl_m_uid = ${perl{find_uid}}
+          set acl_m_username = ${perl{get_username}{$acl_m_uid}}
+          condition = ${if !eq {$acl_m_uid}{-1}{yes}{no}}
+          condition = ${if >{${perl{hit_limit_user}{$acl_m_username}}}{1}}
+          message = User account ($acl_m_username) has sent too many emails. Script delivery blocked.
+
+  discard condition = ${if !eq{$originator_uid}{$exim_uid}}
+          condition = ${if exists{BLACKLIST_USERNAMES}}
+          condition = ${lookup{$acl_m_username}lsearch{BLACKLIST_USERNAMES}{1}{0}}
+          message = User account ($acl_m_username) is not allowed to send emails.  Script delivery blocked via BLACKLIST_USERNAMES.
+
+  .include_if_exists /etc/exim.blockcracking/script.conf
+
+  accept
+
+  .include_if_exists /etc/exim.blockcracking/script.recipients.conf
+
 #EDIT#26:
 acl_check_recipient:
   # block certain well-known exploits, Deny for local domains if
@@ -230,6 +275,22 @@
         condition = ${if > {${eval:$rcpt_fail_count}}{3}{yes}{no}}
         !verify = recipient/callout=2m,defer_ok,use_sender
 
+  drop  message = The domain ${domain} is currently suspended. Try later.
+        domains = +local_domains
+        condition = ${if exists{/etc/virtual/${domain}_off}{yes}{no}}
+
+  drop  authenticated = *
+        condition = ${if exists{BLACKLIST_USERNAMES}}
+        set acl_m_uid = ${perl{find_uid_auth_id}{$authenticated_id}}
+        set acl_m_username = ${perl{get_username}{$acl_m_uid}}
+        condition = ${if !eq {$acl_m_uid}{-1}{yes}{no}}
+        condition = ${lookup{$acl_m_username}lsearch{BLACKLIST_USERNAMES}{1}{0}}
+        message = User account ($acl_m_username) is not allowed to send emails.  E-Mail delivery blocked.
+        logwrite = User account $acl_m_username is blocked via BLACKLIST_USERNAMES
+
+  #Block Cracking - https://github.com/Exim/exim/wiki/BlockCracking
+  .include_if_exists /etc/exim.blockcracking/auth.conf
+
   # restrict port 587 to authenticated users only
   # see also daemon_smtp_ports above
   accept  hosts = +auth_relay_hosts
@@ -250,6 +311,8 @@
     accept senders = :
 	   domains = +relay_domains
 
+  .include_if_exists /etc/exim.easy_spam_fighter/check_rcpt.conf
+
 #EDIT#27:
   # 1st deny checks if it's a hostname or IPV4 address with dots or IPV6 address
     deny message = R1: HELO should be a FQDN or address literal (See RFC 2821 4.1.1.1)
@@ -364,21 +427,30 @@
   accept  domains = +relay_domains
           endpass
           verify = recipient
-
 #EDIT#45:
   accept  hosts = +relay_hosts
+          add_header = X-Relay-Host: $sender_host_address
+
   accept  hosts = +auth_relay_hosts
           endpass
           message = authentication required
           authenticated = *
+
 # FINAL DENY EMAIL BEFORE DATA BEGINS HERE
   # default at end of acl causes a "deny", but line below will give
   # an explicit error message:
   deny    message = relay not permitted
 
+
+acl_check_dkim:
+  .include_if_exists /etc/exim.easy_spam_fighter/check_dkim.conf
+  accept
+
 # ACL that is used after the DATA command (ClamAV)
 acl_check_message:
 
+  .include_if_exists /etc/exim.easy_spam_fighter/check_message.conf
+
 #EDIT#46:
 #.include_if_exists /etc/exim.clamav.conf
 
@@ -455,23 +527,11 @@
 #COMMENT#49:
 #DIRECTORS CONFIGURATION
 
-#.include_if_exists /etc/exim.spamassassin.conf
+.include_if_exists /etc/exim.spamassassin.conf
 
 #EDIT#50:
 # Spam Assassin
-#spamcheck_director:
-#   driver = accept
-#   condition = "${if and { \
-#    {!def:authenticated_id} \
-#    {!eq {$received_protocol}{spam-scanned}} \
-#    {!eq {$received_protocol}{local}} \
-#    {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
-#    {<{$message_size}{100k}} \
-#    } {1}{0}}"
-#  retry_use_local_part
-#  headers_remove = X-Spam-Flag:X-Spam-Report:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version
-#  transport = spamcheck
-#  no_verify
+#spamcheck_director removed. Use the exim.spamassassin.conf
 
 majordomo_aliases:
   driver = redirect
@@ -717,7 +777,7 @@
 #COMMENT#61:
 remote_smtp:
   driver = smtp
-#.include_if_exists /etc/exim.dkim.conf
+.include_if_exists /etc/exim.dkim.conf
 
 #EDIT#62:
 address_pipe:
@@ -741,6 +801,13 @@
 address_reply:
   driver = autoreply
 
+dovecot_lmtp_udp:
+  driver = lmtp
+  socket = /var/run/dovecot/lmtp
+  #maximum number of deliveries per batch, default 1
+  batch_max = 200
+  return_path_add
+
 #EDIT#65:
 # RETRY CONFIGURATION
 # Domain               Error       Retries
