"client_id" in lua script
Hi,
I'm trying to block specific MUAs, like e.g. Outlook-App for iOS and Android or Xiaomi Mail / MiMail using a lua script. While implementing this, I noticed that "client_id" is always nil in the lua script or I am doing something wrong. This is part of the postfix config:
imap_id_retain = yes imap_id_log = * passdb { driver = lua args = file=/etc/dovecot/lua/badimapid.lua blocking=yes }
Logging (imap_id_log = *) works, the dovecot log has entries like:
imap(user@domain)<226>
Here is the content of the lua-script file:
function auth_passdb_lookup(req) req.log_info('badimapid info: user="'..req.user..'", client_id="'..req.client_id..'"') return dovecot.auth.PASSDB_RESULT_NEXT, "" end function script_init() return 0 end function script_deinit() end
In principle, "req.client_id" should contain the client id string according to https://doc.dovecot.org/2.3/configuration_manual/authentication/lua_based_au...
However, dovecot log reads:
auth-worker(163): Error: conn unix:auth-worker (pid=162,uid=401): auth-worker<27>: lua(user@domain): db-lua: lua_pcall(auth_passdb_lookup, 1, 2) failed: /etc/dovecot/lua/badimapid.lua:2: attempt to concatenate a nil value (field 'client_id')
Why is client_id nil?
Thanks, Thorsten
participants (1)
-
ecdlguy@gmail.com