From 5bc6e933471e927ac93ec279a926bbfa9f2e5c25 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Fri, 28 Dec 2018 19:17:17 +0000 Subject: [PATCH] fix query fields etc --- README.password_expiration | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.password_expiration b/README.password_expiration index 38144690..0f38174e 100644 --- a/README.password_expiration +++ b/README.password_expiration @@ -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