# HG changeset patch # User Javier Torres # Date 1288474762 -7200 # Node ID 05ea4abb664d09e590f4e14984240124bf437ad4 # Parent 853ae6ae87bfec28b7c6ada5ef209f04c3a2edd2 mod_auth_dovecot: Load dovecot socket path form config diff -r 853ae6ae87bf -r 05ea4abb664d mod_auth_dovecot/mod_auth_dovecot.lua --- a/mod_auth_dovecot/mod_auth_dovecot.lua Sat Oct 30 23:39:06 2010 +0200 +++ b/mod_auth_dovecot/mod_auth_dovecot.lua Sat Oct 30 23:39:22 2010 +0200 @@ -14,6 +14,7 @@ local pposix = require "util.pposix"; local prosody = _G.prosody; +local socket_path = module:get_option_string("dovecot_auth_socket", "/var/run/dovecot/auth-login"); function new_default_provider(host) local provider = { name = "dovecot", c = nil }; @@ -35,10 +36,9 @@ provider.c = socket.unix(); -- Create a connection to dovecot socket - local socket = "/var/run/dovecot/auth-login"; - local r, e = provider.c:connect(socket); + local r, e = provider.c:connect(socket_path); if (not r) then - log("warn", "error connecting to dovecot socket at '%s'. error was '%s'. check permissions", socket, e); + log("warn", "error connecting to dovecot socket at '%s'. error was '%s'. check permissions", socket_path, e); provider:close(); return false; end