From 6d7544067a8d4a6ebbd83c1e93a36d27f3e1b43c Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Fri, 24 Apr 2015 14:45:42 +0200 Subject: [PATCH] [fix] 1646 transport sql is not using indexes --- debian/changelog | 1 + etc/alternc/templates/postfix/mytransport.cf | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 75b669ed..31a363e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ alternc (3.1.4) oldstable; urgency=low * fix removal of awstats-package crontab in favor of AlternC's one * fix unzip/untar/ungzip of files from the browser (double escapeshellarg) * fix catchall management (bugguy & crappy error messages) + * fix #1646 transport sql is not using indexes -- Benjamin Sonntag Mon, 20 Apr 2015 18:00:12 +0200 diff --git a/etc/alternc/templates/postfix/mytransport.cf b/etc/alternc/templates/postfix/mytransport.cf index 31e0d68e..a379ca59 100644 --- a/etc/alternc/templates/postfix/mytransport.cf +++ b/etc/alternc/templates/postfix/mytransport.cf @@ -7,7 +7,6 @@ password = %%db_mail_pwd%% hosts =%%dbhost%% dbname = %%dbname%% -query = select delivery from mailbox join address on address.id = mailbox.address_id join domaines on domaines.id = address.domain_id where concat(address.address,'@',domaines.domaine) ='%s' +query = SELECT delivery FROM mailbox JOIN address ON address.id = mailbox.address_id JOIN domaines ON domaines.id = address.domain_id WHERE address.address=SUBSTRING_INDEX('%s','@',1) AND domaines.domaine=SUBSTRING_INDEX('%s','@',1) -