diff --git a/lib/configfiles/bionic.xml b/lib/configfiles/bionic.xml index 30fe1d6f..fac95592 100644 --- a/lib/configfiles/bionic.xml +++ b/lib/configfiles/bionic.xml @@ -1504,7 +1504,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/buster.xml b/lib/configfiles/buster.xml index 2775632b..092a5011 100644 --- a/lib/configfiles/buster.xml +++ b/lib/configfiles/buster.xml @@ -1463,7 +1463,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/gentoo.xml b/lib/configfiles/gentoo.xml index 87424ed7..e84a4439 100644 --- a/lib/configfiles/gentoo.xml +++ b/lib/configfiles/gentoo.xml @@ -1474,7 +1474,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/jessie.xml b/lib/configfiles/jessie.xml index 98f22751..9339c6c8 100644 --- a/lib/configfiles/jessie.xml +++ b/lib/configfiles/jessie.xml @@ -1504,7 +1504,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/rhel_centos.xml b/lib/configfiles/rhel_centos.xml index 0e3682f9..a31b2dfa 100644 --- a/lib/configfiles/rhel_centos.xml +++ b/lib/configfiles/rhel_centos.xml @@ -95,7 +95,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/stretch.xml b/lib/configfiles/stretch.xml index 6dab29fc..ea88e2d0 100644 --- a/lib/configfiles/stretch.xml +++ b/lib/configfiles/stretch.xml @@ -1493,7 +1493,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/trusty.xml b/lib/configfiles/trusty.xml index 9613a357..512cc921 100644 --- a/lib/configfiles/trusty.xml +++ b/lib/configfiles/trusty.xml @@ -502,7 +502,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]> diff --git a/lib/configfiles/xenial.xml b/lib/configfiles/xenial.xml index 8df99edf..62f7ccd5 100644 --- a/lib/configfiles/xenial.xml +++ b/lib/configfiles/xenial.xml @@ -1504,7 +1504,7 @@ user = password = dbname = hosts = -query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> '' +query = SELECT destination FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s' AND trim(v.destination) <> '' ]]>