comparison mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua @ 838:c9e2beec4ef6

mod_auth_dovecot: Improved error reporting.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 28 Sep 2012 08:31:27 +0500
parents 881ec9919144
children bd88728b0d95
comparison
equal deleted inserted replaced
837:0ef11dee7050 838:c9e2beec4ef6
35 } 35 }
36 ); 36 );
37 end 37 end
38 38
39 do 39 do
40 local s = new_sasl(module.host) 40 local s, err = new_sasl(module.host)
41 if not s then
42 log("error", "%s", tostring(err));
43 end
41 assert(s, "Could not create a new SASL object"); 44 assert(s, "Could not create a new SASL object");
42 assert(s.mechanisms, "SASL object has no mechanims method"); 45 assert(s.mechanisms, "SASL object has no mechanims method");
43 local m, _m = {}, s:mechanisms(); 46 local m, _m = {}, s:mechanisms();
44 assert(not append_host or _m.PLAIN, "auth_append_host requires PLAIN, but it is unavailable"); 47 assert(not append_host or _m.PLAIN, "auth_append_host requires PLAIN, but it is unavailable");
45 for k in pairs(_m) do 48 for k in pairs(_m) do