changeset 311:f663ea45436f

mod_auth_dovecot: Only check Dovecot major version. Bump log level from 'warn' to 'error'. (thanks Adrien Clerc)
author Matthew Wild <mwild1@gmail.com>
date Sat, 08 Jan 2011 17:08:20 +0000
parents b3bcd1913c85
children 31deafcbf623
files mod_auth_dovecot/mod_auth_dovecot.lua
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_dovecot/mod_auth_dovecot.lua	Sat Jan 08 16:54:33 2011 +0000
+++ b/mod_auth_dovecot/mod_auth_dovecot.lua	Sat Jan 08 17:08:20 2011 +0000
@@ -69,11 +69,10 @@
 			first = parts();
 			if (first == "VERSION") then
 				-- Version should be 1.1
-				local v1 = parts();
-				local v2 = parts();
+				local major_version = parts();
 				
-				if (not (v1 == "1" and v2 == "1")) then
-					log("warn", "server version is not 1.1. it is %s.%s", v1, v2);
+				if major_version ~= "1" then
+					log("error", "dovecot server version is not 1.x. it is %s.x", major_version);
 					provider:close();
 					return false;
 				end