0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

fix query fields etc

This commit is contained in:
David Goodwin 2018-12-28 19:17:17 +00:00
parent 77b87107f9
commit 5bc6e93347

View File

@ -19,7 +19,7 @@ Execute the attached SQL script (password_expiration.sql) that will add the requ
**Changes in Postfix Admin :
To enable password expiration, add the following to your config.inc.php file:
$CONF['password_expiration_enabled'] = 'YES';
$CONF['password_expiration'] = 'YES';
All my tests are performed using $CONF['encrypt'] = 'md5crypt';
@ -37,7 +37,7 @@ All my tests are performed using $config['password_algorithm'] = 'md5-crypt';
Edit dovecot-mysql.conf file, and replace the user_query (and only this one) by this query:
password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as userdb_var, concat('maildir:/var/vmail/', maildir) as userdb_mail, 20001 as userdb_uid, 20001 as userdb_gid, m.domain FROM mailbox m, domain d where d.domain = m.domain and m.username = '%u' AND m.active = '1' AND (m.pw_expires_on > now() or d.password_expiration_value = 0)
password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as userdb_var, concat('maildir:/var/vmail/', maildir) as userdb_mail, 20001 as userdb_uid, 20001 as userdb_gid, m.domain FROM mailbox m, domain d where d.domain = m.domain and m.username = '%u' AND m.active = '1' AND (m.password_expiry > now() or d.password_expiry = 0)
Of course you may require to adapt the uid, gid, maildir and table to your setup