From eb7d9ed5ff3f8b589c1c25ff8be4bea42fb9fd68 Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 3 Feb 2021 12:41:18 -0700
Subject: [PATCH] 'Enable receiving' should check disablesmtp

---
 install/tpl/mysql-virtual_email2email.cf.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master
index 1ae7f9addc..f420a104d9 100644
--- a/install/tpl/mysql-virtual_email2email.cf.master
+++ b/install/tpl/mysql-virtual_email2email.cf.master
@@ -2,8 +2,8 @@ user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
 hosts = {mysql_server_ip}
-query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND postfix = 'y' AND server_id = {server_id}
+query = SELECT email FROM mail_user WHERE email = '%s' AND forward_in_lda = 'n' AND disabledeliver = 'n' AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
         UNION
-        SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND postfix = 'y' AND server_id = {server_id}
+        SELECT cc AS email FROM mail_user WHERE email = '%s' AND cc != '' AND (forward_in_lda = 'n' OR disabledeliver = 'y') AND disablesmtp = 'n' AND server_id = {server_id}
            AND EXISTS (SELECT domain_id FROM mail_domain WHERE domain = SUBSTRING_INDEX('%s', '@', -1) AND active = 'y' AND server_id = {server_id})
-- 
GitLab