[Dovecot] Authentication using native MySQL PASSWORD() function

Tom Sommer ts at dreamcoder.dk
Thu Oct 27 18:36:14 EEST 2005


Timo Sirainen wrote:
> On Thu, 2005-10-27 at 17:02 +0200, Jakob Hirsch wrote:
> 
>>Maybe it would be even better/cleaner to be able to use something like
>>
>>SELECT userid AS user, 1 AS password_ok FROM users WHERE userid = '%u' AND
>>password = PASSWORD('%p')
> 
> 
> Actually I think this already works:
> 
> SELECT userid AS user, NULL as password WHERE userid = '%u' AND password = PASSWORD('%p')
> 
> NULL passwords accept any password. This was needed for proxying but
> works nicely elsewhere too.

Excellent, I will try this

--
Tom Sommer


More information about the dovecot mailing list