diff --git a/server/plugins-available/postfix_filter_plugin.inc.php b/server/plugins-available/postfix_filter_plugin.inc.php
index 9c97ff1fa8c6bc14a327ebc782b1ac70026fd124..b8b910b64cc8bacd07318929324c1d95f032eb08 100644
--- a/server/plugins-available/postfix_filter_plugin.inc.php
+++ b/server/plugins-available/postfix_filter_plugin.inc.php
@@ -80,7 +80,7 @@ class postfix_filter_plugin {
 
 		$type = $data["new"]["type"];
 		if($type != '') {
-			$sql = "SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ?' AND active = 'y'";
+			$sql = "SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ? AND active = 'y'";
 			$rules = $app->db->queryAllRecords($sql, $conf["server_id"], $type);
 			$content = '';
 			foreach($rules as $rule) {