diff --git a/install/tpl/mysql-virtual_policy_greylist.cf.master b/install/tpl/mysql-virtual_policy_greylist.cf.master
index 00f504e082248898d578186da975e696db73603a..55378b29cae4ebbe59815fedfed235c61632a4a1 100644
--- a/install/tpl/mysql-virtual_policy_greylist.cf.master
+++ b/install/tpl/mysql-virtual_policy_greylist.cf.master
@@ -1,6 +1,10 @@
 user = {mysql_server_ispconfig_user}
 password = {mysql_server_ispconfig_password}
 dbname = {mysql_server_database}
-query = SELECT 'greylisting' FROM (SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s' UNION SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s' UNION SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' ORDER BY `prio` ASC LIMIT 1) as rules WHERE rules.greylisting = 'y'
+query = SELECT 'greylisting' FROM
+  (SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s' 
+  UNION SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s' 
+  UNION SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' ORDER BY `prio` ASC LIMIT 1) as rules 
+  WHERE rules.greylisting = 'y'
 
-hosts = {mysql_server_ip}
\ No newline at end of file
+hosts = {mysql_server_ip}