Is possible to override Dovecot variables or Sieve env vars and extdata lookups
Are the dovecot environment variables mutable? I'd like to override like:
set "${env.vnd.dovecot.username}" "someuser@example.org"
Or better, I prefer to override %u Dovecot variable during the userdb lookup.
Is either possible?
PS, when Sieve does extdata lookups for username key, where does username come from? %u? Does an override as above change the dict lookup key for extdata?
On 19.03.2018 06:40, MRob wrote:
Are the dovecot environment variables mutable? I'd like to override like:
set "${env.vnd.dovecot.username}" "someuser@example.org"
Or better, I prefer to override %u Dovecot variable during the userdb lookup.
Is either possible?
PS, when Sieve does extdata lookups for username key, where does username come from? %u? Does an override as above change the dict lookup key for extdata?
You could override the %u variable, but overriding it in userdb will have surprising consequences. Basically this amounts to same as changing username for the user. So don't. Please set some other thing like, my_special_var=something in userdb, then you should be able to access it as env.vnd.dovecot.my_special_var
Aki
On 2018-03-19 06:31, Aki Tuomi wrote:
On 19.03.2018 06:40, MRob wrote:
Are the dovecot environment variables mutable? I'd like to override like:
set "${env.vnd.dovecot.username}" "someuser@example.org"
Or better, I prefer to override %u Dovecot variable during the userdb lookup.
Is either possible?
PS, when Sieve does extdata lookups for username key, where does username come from? %u? Does an override as above change the dict lookup key for extdata?
You could override the %u variable, but overriding it in userdb will have surprising consequences. Basically this amounts to same as changing username for the user.
This is useful to work with a older system in my case, username should seem as a new one anyways. I accept the consequence. :)
I tried return only "u" in the passdb and usedb lookup (also "userdb_u") but it did not work. Where can I override %u? Can I do it in both passdb and userdb lookup?
On 19.03.2018 09:04, MRob wrote:
On 2018-03-19 06:31, Aki Tuomi wrote:
On 19.03.2018 06:40, MRob wrote:
Are the dovecot environment variables mutable? I'd like to override like:
set "${env.vnd.dovecot.username}" "someuser@example.org"
Or better, I prefer to override %u Dovecot variable during the userdb lookup.
Is either possible?
PS, when Sieve does extdata lookups for username key, where does username come from? %u? Does an override as above change the dict lookup key for extdata?
You could override the %u variable, but overriding it in userdb will have surprising consequences. Basically this amounts to same as changing username for the user.
This is useful to work with a older system in my case, username should seem as a new one anyways. I accept the consequence. :)
I tried return only "u" in the passdb and usedb lookup (also "userdb_u") but it did not work. Where can I override %u? Can I do it in both passdb and userdb lookup?
https://wiki.dovecot.org/PasswordDatabase/ExtraFields/
Aki
participants (2)
-
Aki Tuomi
-
MRob