# HG changeset patch # User Kim Alvefur # Date 1314917251 -7200 # Node ID abac17cb5032eb960d091a8c3c435ac2a9e95ed9 # Parent df57fa689415355e84447792fbbf15eafac15562 mod_auth_dovecot: Make appending the domain name configurable. Warning: If you depend on this behaviour, add auth_append_host = true to your config diff -r df57fa689415 -r abac17cb5032 mod_auth_dovecot/mod_auth_dovecot.lua --- a/mod_auth_dovecot/mod_auth_dovecot.lua Tue Aug 30 23:12:56 2011 +0000 +++ b/mod_auth_dovecot/mod_auth_dovecot.lua Fri Sep 02 00:47:31 2011 +0200 @@ -16,6 +16,7 @@ local prosody = prosody; local socket_path = module:get_option_string("dovecot_auth_socket", "/var/run/dovecot/auth-login"); +local append_host = module:get_option_boolean("auth_append_host", false); function new_provider(host) local provider = { name = "dovecot", request_id = 0 }; @@ -125,7 +126,9 @@ end -- Send auth data - username = username .. "@" .. module.host; -- FIXME: this is actually a hack for my server + if append_host then + username = username .. "@" .. module.host; + end local b64 = base64.encode(username .. "\0" .. username .. "\0" .. password); provider.request_id = provider.request_id + 1 % 4294967296