Skip to content

Commit 5b70bc4

Browse files
author
Dominik
committed
optimized sql-query for greylisting-check
1 parent f665ce7 commit 5b70bc4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

install/lib/installer_base.lib.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,10 +854,6 @@ public function configure_postfix($options = '') {
854854

855855
}
856856

857-
public function configure_postgrey() {
858-
859-
}
860-
861857
public function configure_saslauthd() {
862858
global $conf;
863859

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
user = {mysql_server_ispconfig_user}
22
password = {mysql_server_ispconfig_password}
33
dbname = {mysql_server_database}
4-
query = SELECT DISTINCT('greylisting') FROM mail_forwarding mf, mail_user mu where (mf.source='%s' and mf.greylisting='y' and mf.server_id = {server_id}) or (mu.email='%s' and mu.greylisting='y' and mu.server_id = {server_id})
4+
query = SELECT 'greylisting' FROM (SELECT greylisting, source AS email FROM mail_forwarding WHERE server_id = {server_id} UNION SELECT greylisting, email FROM mail_user WHERE server_id = {server_id}) addresses WHERE addresses.email='%s' AND addresses.greylisting='y'
55
hosts = {mysql_server_ip}

0 commit comments

Comments
 (0)