Password database extra fields and SQL
Matthias Fechner
idefix at fechner.net
Fri Apr 29 13:57:32 UTC 2016
Am 29.04.2016 um 15:49 schrieb Dave:
>
> For example, say you have a query like:
>
> password_query = SELECT hash AS password, NULLIF(active = 1, 'y') AS
> nologin FROM users WHERE name = '%u'
why not using a logic like this to block users that are not active:
password_query = SELECT username as user, password as password, \
homedir AS userdb_home, maildir AS userdb_mail, \
concat('*:bytes=', quota) as userdb_quota_rule, uid as
userdb_uid, gid as userdb_gid \
FROM mailbox \
WHERE username = '%Lu' AND active = '1' \
AND ( access_restriction = 'ALL' OR LOCATE( '%Us',
access_restriction ) > 0 )
Gruß
Matthias
--
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
More information about the dovecot
mailing list