user password in mail-filter plugin

Timo Sirainen tss at iki.fi
Fri Feb 5 09:38:55 UTC 2016


> On 05 Feb 2016, at 00:54, Thomas Möhle <thomas at bitkomplex.de> wrote:
> 
>>> So, do I get this right? During login the content of dovecots %w
>>> variable is supposed to be stored in a userdb field, called userdb_pass,
>>> and the %{x} is supposed to get the content of that field?
>> 
>> Mostly, yes. You need the "pass" field to be in userdb to access it in mail processes. The password is only available in passdb though, so you need to store it with userdb_ prefix to get it saved into userdb extra fields instead of passdb extra fields.
>> 
> 
> Unfortunately it still doesn't work. The filter-script does not recieve
> any data from that variable.
> I tried replacing the %w with %u, to see, if the filter-script would at
> least recieve the username then, but that doesn't work, either. So I'm
> not sure, if %{userdb:pass} isn't read correctly, or if "override_fields
> = userdb_pass=%w" doesn't set it right.

Check with:

doveadm auth login user at domain password

In the output there's supposed to be the "pass" field in userdb extra fields. If not, try adding before your first userdb:

userdb {
  driver = prefetch
  result_success = continue
}

I don't think that was supposed to be necessary though.



More information about the dovecot mailing list