--- 4.5.14/exim.conf-SpamBlockerTechnology-v4.5.14.txt	2019-05-02 15:29:40.018175428 -0600
+++ 4.5.15/exim.conf-SpamBlockerTechnology-v4.5.15.txt	2019-05-31 17:23:27.585621625 -0600
@@ -1,5 +1,5 @@
-# SpamBlockerTechnology* powered exim.conf, Version 4.5.14
-# April 17, 2019
+# SpamBlockerTechnology* powered exim.conf, Version 4.5.15
+# August 15, 2018
 # Exim configuration file for DirectAdmin
 # Requires exim.pl as distributed by DirectAdmin here:
 # http://files.directadmin.com/services/exim.pl version 21 or higher
@@ -128,7 +128,8 @@
 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_mail = ${if ={$interface_port}{587} {accept} {${if ={$interface_port}{10025} {acl_smtp_mail_proxy}{acl_check_mail}}}}
+acl_smtp_mailauth = smtp_mailauth
 acl_smtp_rcpt = acl_check_recipient
 acl_smtp_dkim = ${if ={$interface_port}{587} {accept}{acl_check_dkim}}
 acl_smtp_data = acl_check_message
@@ -150,6 +151,7 @@
 hostlist bad_sender_hosts_ip = /etc/virtual/bad_sender_hosts_ip
 hostlist whitelist_hosts = nwildlsearch;/etc/virtual/whitelist_hosts
 hostlist whitelist_hosts_ip = /etc/virtual/whitelist_hosts_ip
+hostlist proxy_hosts_ip = ${if exists{/etc/virtual/proxy_hosts_ip}{/etc/virtual/proxy_hosts_ip}}
 BLACKLIST_USERNAMES = /etc/virtual/blacklist_usernames
 BLACKLIST_SMTP_USERNAMES = /etc/virtual/blacklist_smtp_usernames
 BLACKLIST_SCRIPT_USERNAMES = /etc/virtual/blacklist_script_usernames
@@ -196,9 +198,8 @@
 ######################################
 #EDIT#24:
 acl_connect:
-  warn set acl_m_spam_assassin_has_run = 0
+  warn set acl_c_spam_assassin_has_run = 0
   warn set acl_m_is_whitelisted = 0
-  warn set acl_c_accept_recipient_if_whitelisted = 1
   .include_if_exists /etc/exim.easy_spam_fighter/connect.conf
   accept hosts = *
 
@@ -231,6 +232,23 @@
 ######################################
 # ACL CHECK AUTH
 ######################################
+
+smtp_mailauth:
+ accept
+   hosts          = <; 127.0.0.1 ; ::1
+   condition      = ${if eq{$interface_port}{10025}}
+   log_message    = Will accept MAIL AUTH parameter for $authenticated_sender
+ deny
+ 
+acl_smtp_mail_proxy:
+ deny
+   condition      = ${if eq{$interface_port}{10025}}
+   condition      = ${if eq{$authenticated_sender}{}}
+   message        = All connections on port $interface_port need MAIL AUTH sender
+
+######################################
+# ACL CHECK AUTH
+######################################
 #EDIT#24.5#
 acl_check_auth:
   drop  set acl_m_authcount = ${eval10:0$acl_m_authcount+1}
@@ -354,13 +372,9 @@
         message = USER_ON_BLACKLIST_SMTP
         logwrite = User account $acl_m_username is blocked via BLACKLIST_SMTP_USERNAMES
 
-  # Deny if the recipient doesn't exist:
-    deny message = NO_SUCH_RECIPIENT
-         domains = +local_domains
-	 !verify = recipient
+  .include_if_exists /etc/exim.easy_spam_fighter/check_rcpt.mid.conf
 
-  accept  condition = ${if eq{$acl_m_is_whitelisted}{1}}
-          condition = ${if eq{$acl_c_accept_recipient_if_whitelisted}{1}}
+  accept  condition = ${if eq{$acl_m_is_whitelisted}{1}{1}{0}}
 
   .include_if_exists /etc/exim.acl_check_recipient.mid.conf
 
@@ -380,6 +394,10 @@
        domains = !+relay_domains
 	   !authenticated = *
 
+  # Deny if the recipient doesn't exist:
+    deny message = NO_SUCH_RECIPIENT
+         domains = +local_domains
+	 !verify = recipient
   # Remaining Mailer-Daemon messages must be for us
     accept senders = :
 	   domains = +relay_domains
@@ -533,6 +551,9 @@
 # ACL that is used after the DATA command (ClamAV)
 acl_check_message:
 
+  warn
+    set acl_c_spam_assassin_has_run = 0
+
   .include_if_exists /etc/exim.acl_check_message.pre.conf
 
 #EDIT#46.1#T9653
@@ -713,6 +734,7 @@
   driver = accept
   condition = ${if exists{/etc/virtual/${domain}/passwd}{1}{0}}
   condition = ${lookup{$local_part}lsearch{/etc/virtual/${domain}/aliases}{1}{0}}
+  condition = ${lookup{$local_part}lsearch{/etc/virtual/${domain}/aliases}{${if eq{$value}{$local_part}{0}{1}}}{0}}
   condition = ${perl{save_virtual_user}}
   domains = lsearch;/etc/virtual/domainowners
   group = mail
